Skip to main content
Create Table is an orchestration component that creates or replaces a table. It generates the necessary DDL to handle an existing table with the same name, followed by a CREATE TABLE statement.
This component is potentially destructive. Take care when running this component as it may remove existing data.

Properties

Name
string
required
A human-readable name for the component.
Create/Replace
drop-down
required
Select one of:
  • Create: This is the default option. This option creates a new table. Creating a new table will generate an error if a table with the same name already exists. However, existing data will not be destroyed.
  • Create if not exists: This option will only create a new table when a table of the same name does not already exist. This option will not destroy existing data. If the schema of the existing table does not match the schema defined in this component, no attempt is made to fix or correct the schema, which could lead to errors later on in the pipeline if:
    • Users did not expect a table to already exist.
    • Users did not expect to have a different schema to the one defined in this component.
  • Replace: If a table with the name you specify in the New Table Name property already exists, the existing table is replaced by a new table when the pipeline finishes. Selecting this option guarantees that after the component succeeds, the table matches the schema defined in this component. However, any data from the existing table (to be replaced) will be lost.
This component uses the CREATE OR REPLACE clause. When using the REPLACE clause, it also applies the COPY GRANTS clause. When you clone or create a new object (such as a table, view, schema, or database) from an existing one, the new object doesn’t automatically inherit the original’s grants (privileges). However, with the COPY GRANTS clause, you can seamlessly transfer object-level privileges from the source object to the new one. This helps maintain consistent access control and simplifies permission management when cloning or recreating objects. For more information, read Snowflake COPY GRANTS.
Database
drop-down
required
The Snowflake database that the newly created table will belong to. The special value [Environment Default] uses the schema defined in the environment. Read Database, Schema, and Share DDL to learn more.
Schema
drop-down
required
The Snowflake schema that the newly created table will belong to. The special value [Environment Default] uses the schema defined in the environment. Read Database, Schema, and Share DDL to learn more.
New Table Name
string
required
The name of the table to create or replace. This field is case-sensitive by default, since uses quoted identifiers.
Table Type
drop-down
required
Select the type of Snowflake table to create:
  • Permanent holds data indefinitely. This table type can be restored using Snowflake’s Time Travel.
  • Transient holds data indefinitely. This table type can’t be restored.
Columns
column editor
required
Enter the following details for each table column.Column Name: The name of the new column.Data Type: Select one of:
  • Boolean: This type is suitable for data that is either “true” or “false”. More….
  • Date: This type is suitable for dates without times. More….
  • Float: This type is for values that are approximate numeric values with fractional components. More….
  • Number: This type is suitable for numeric types, with or without decimals. More….
  • Time: This type is suitable for time, independent of a specific date and timezone. More….
  • Timestamp: This type is a timestamp left unformatted (exists as Unix/Epoch Time). More….
  • Varchar: This type is suitable for numbers and letters. A varchar or Variable Character Field is a set of character data of indeterminate length. More….
  • Variant: Variant is a tagged universal type that can hold up to 16 MB of any data type supported by Snowflake. More….
Size: For Text types, this is the maximum length. This is a limit on the number of bytes, not characters. For Numeric types, this is the total number of digits allowed, whether before or after the decimal point.Precision: The precision of the data in the column. Will be 0 (zero) for non-applicable types.Default Value: The default value under this column for any row. You can enter AUTOINCREMENT or IDENTITY as the default value for any numeric-type column and the column will automatically give an incremented value on each new row starting from 1. This feature is useful when creating a unique key on the table.Not Null: True if this column does not accept null values.Unique: Mark this column as unique, declaring that all values in it are unique with respect to one another. You may have multiple unique columns per table.Comment: A location to store descriptive VARCHAR comments against columns. Used to contextualize the content being stored in tables in your database.
Default DDL Collation
string
Set the default DDL collation. Setting this parameter forces all subsequently created columns in the affected table to have the specified collation as the default, unless the collation for the column is explicitly defined in the DDL. For more information, refer to the Snowflake documentation.
Primary Keys
dual listbox
Declare one column to be a primary key. Primary keys are, by default, unique. Users can only have one primary key per table.
Clustering Keys
dual listbox
Specify clustering key(s) to use. Defining clustering keys can allow for more efficient sorting and scanning of large tables. For more information, refer to the Snowflake documentation.
Data Retention Time in Days
integer
Set a number of days for which data is retained after deletion. For more information, refer to the Snowflake documentation.
Comment
string
Attach a comment to the table. For more information, refer to the Snowflake documentation.