UpdateSnowflakeDatabase 2025.10.2.19¶
捆绑包¶
com.snowflake.openflow.runtime | runtime-snowflake-processors-nar
描述¶
Updates the definition of a Snowflake table based on the schema provided in the incoming FlowFile. The schema is expected to be in JSON with the following format, regardless of whether it is provided via FlowFile content or specified as a property: { "columns": [ { "name": "<column name>", "type": "<column type>", "nullable": <true/false>, "precision": <precision, only for numeric type>, "scale": <scale, only for numeric type> }, ... ], "primaryKeys": ["<name of first primary key column>", "<name of second primary key column>", ...] }
输入要求¶
REQUIRED
支持敏感的动态属性¶
false
属性¶
属性 |
描述 |
|---|---|
添加列策略 |
当传入架构的列在现有表中不存在时使用的策略 |
Add Not Null Strategy |
当传入架构具有现有表中不存在的非空约束条件时使用的策略 |
Alter Column Type Strategy |
The strategy to use when the existing table has a column with a different type than the incoming schema. |
Column Name Transformation |
一种可选转换,可以应用于架构中定义的列的名称。在将列名称与表中的现有列进行比较之前,将此转换应用于列名称。除了属性外,此属性还可以通过表达式语言引用以下变量: |
Column Removal Strategy |
当现有表的列在传入架构中不存在时使用的策略 |
连接池 |
用于连接到 Snowflake 的连接池 |
Create Stream |
是否为表创建 Snowflake Stream |
Creation Parameters |
要包含在 CREATE TABLE 语句中的其他参数。例如,“CLUSTER BY (column_name)” |
所需架构 |
所需的架构/表定义 |
删除列策略 |
当现有表的列在传入架构中不存在时使用的策略 |
Drop Not Null Strategy |
当现有表具有传入架构中不存在的非空约束条件时使用的策略 |
包括默认值 |
Whether or not to include DEFAULT values in CREATE TABLE or ALTER TABLE ADD COLUMN statements |
Include Not Null Constraints |
是否在 CREATE TABLE 或 ALTER TABLE ADD COLUMN 语句中包含 NOT NULL 约束条件 |
Include Primary Key Constraints |
是否在创建语句中包含主键约束条件 |
最大批处理大小 |
给定表在一次执行中可以处理的最大 FlowFiles 数量。 |
Modify Primary Key Strategy |
当传入架构的主键与现有主键不同时使用的策略。修改主键需要删除现有主键(如有),然后添加一个新主键。 |
记录读取器 |
用于获取所需架构的记录读取器 |
Removed Column Name Suffix |
The suffix to append to a column that was removed. For example, to rename column 'foo' to 'foo__deleted', the property can be set to |
架构名称 |
要更新的架构的名称 |
Stream Creation Parameters |
要包含在 CREATE STREAM 语句中的其他参数。例如 'APPEND_ONLY=TRUE' |
Stream Name |
流的名称。 |
表元数据缓存到期时间 |
移除缓存条目的时间(秒) |
表名称 |
要更新或创建流的表的名称 |
表架构策略 |
指定如何获取所需的架构/表定义 |
Table Stream Creation Parameters |
要包含在 CREATE STREAM 语句中的参数。例如 'APPEND_ONLY=TRUE'。流将与作为源的表一起创建。 |
Table Stream Name |
与表一起创建的流的名称。流源将是创建的表。 |
Update Type |
要执行的更新类型 |
使用表元数据缓存 |
是否缓存表的元数据,而不是直接从 Snowflake 读取。适用于 [Create Table If Not Exists, Alter Table] |
关系¶
名称 |
描述 |
|---|---|
failure |
如果无法更新表,则传入的 FlowFile 将路由到此关系 |
success |
成功更新表后,则传入的 FlowFile 将路由到此关系 |
写入属性¶
名称 |
描述 |
|---|---|
schema.hash |
在所有更新完成后,对最终表模式进行 SHA-256 哈希。可用于变更检测和缓存。 |