UpdateSnowflakeTable 2025.10.9.21

Bundle

com.snowflake.openflow.runtime | runtime-snowflake-processors-nar

Description

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”: <only for numeric type>, “scale”: <only for numeric type> }, … ], “primaryKeys”: [“<name of first primary key column>”, “<name of second primary key column>”, …] } This processor supports table-only operations: creating, altering, and dropping tables.

Tags

alter, columns, create, ddl, drop, preview, snowflake, table, update

Input Requirement

REQUIRED

Supports Sensitive Dynamic Properties

false

Properties

PropertyDescription
Add Column StrategyThe strategy to use when the incoming schema has a column that is not present in the existing table
Add Not Null StrategyThe strategy to use when the incoming schema has a not-null constraint that is not present in the existing table
Alter Column Type StrategyThe strategy to use when the existing table has a column with a different type than the incoming schema.
Column Name TransformationAn optional transformation that can be applied to the names of columns defined in the schema. This transformation is applied to the column names before they are compared to the existing columns in the table. This property can reference the following variables via Expression Language, in addition to attributes: column.name, column.type, column.nullable, column.precision, column.scale, column.primaryKey.The result of applying transformations based on this property will be treated according to the setting of Object Name Handling property.
Column Removal StrategyThe strategy to use when the existing table has a column that is not present in the incoming schema
Connection PoolThe connection pool to use to connect to Snowflake
Creation ParametersAdditional parameters to include in the CREATE TABLE statement. For example, ‘CLUSTER BY (column_name)’
Desired SchemaThe desired schema / table definition
Drop Column StrategyThe strategy to use when the existing table has a column that is not present in the incoming schema
Drop Not Null StrategyThe strategy to use when the existing table has a not-null constraint that is not present in the incoming schema
Include Default ValuesWhether or not to include DEFAULT values in CREATE TABLE or ALTER TABLE ADD COLUMN statements
Include Not Null ConstraintsWhether or not to include NOT NULL constraints in CREATE TABLE or ALTER TABLE ADD COLUMN statements
Include Primary Key ConstraintsWhether or not to include primary key constraints in the creation statement
Max Batch SizeThe maximum number of FlowFiles that can be processed in a single execution for a given table.
Modify Primary Key StrategyThe strategy to use when the incoming schema has a primary key that differs from the existing primary key. Modifying the Primary Key requires dropping the existing one, if any, and adding a new one.
Object Identifier ResolutionControls how source object identifiers (schemas, tables, columns) are stored and queried in Snowflake. This setting determines whether you will need to use double quotes in your SQL queries.
Record ReaderRecord Reader to use for obtaining the desired schema
Removed Column Name SuffixThe suffix to append to a column that was removed. For example, to rename column ‘foo’ to ‘foo__deleted’, the property can be set to __deleted. This property value will behave differently depending on the value of Object Name Handling property, i.e. If Object Name Handling is set to Case Sensitive Name, then the suffix will be appended as-is. If Object Name Handling is set to SQL Identifier, then the suffix and must consist of only letters, numbers, dollar sign ($), and underscore (_) characters, additionally it will be appended as case-insensitive or case-sensitive depending on the column name it is being appended to is case-insensitive (not double-quoted) or case-sensitive (double-quoted) respectively.
Schema NameThe name of the schema containing the table
Table Metadata Cache Expiration TimeThe time in seconds after which the cache entry will be removed
Table NameThe name of the table to update
Table Schema StrategySpecifies how to obtain the desired schema / table definition
Update TypeThe type of table update to perform
Use Table Metadata CacheWhether to cache table’s metadata instead of reading it directly from Snowflake. Applies to [Create Table If Not Exists, Alter Table]

Relationships

NameDescription
failureThe incoming FlowFile is routed to this relationship if the table cannot be updated
successThe incoming FlowFile is routed to this relationship after the table has been updated successfully

Writes attributes

NameDescription
schema.hashA SHA-256 hash of the final table schema after all updates have been completed. Can be used for change detection and caching purposes.