Internal documentation
This feature is currently for internal use only. This documentation page must only be shared within Matillion.
Table from Values🔗
Internal only
The Table from Values test component lets you define a fixed set of data values and output them as a new table, using columns you specify and populating them with that data. This is useful for testing scenarios when you need a small, static dataset within a test pipeline.
Note
This component is only available in Tests.
Properties🔗
Name = string
A human-readable name for the component.
Database = drop-down
The Snowflake database that the newly created table will belong to. The special value [Environment Default] uses the database defined in the environment. Read Database, Schema, and Share DDL to learn more.
Schema = drop-down
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.
Table name = string
The name of the table to create or replace. This field is case-sensitive by default, since Designer uses quoted identifiers.
Columns = dual listbox
Enter the following details for each table column:
- Name: The name of the column.
- Type: The data type of the column. Choose from the available Snowflake data types:
- VARCHAR: This type is suitable for numbers and letters. A varchar or Variable Character Field is a set of character data of indeterminate length.
- NUMBER: This type is suitable for numeric types, with or without decimals.
- FLOAT: This type is suitable for approximate numeric values with fractional components.
- BOOLEAN: This type is suitable for data that is either "true" or "false".
- DATE: This type is suitable for dates without times.
- TIMESTAMP: This type is suitable for column data values entered as a comma-separated list in the format
YYYY-MM-DD HH:MI:SS. - TIMESTAMP_NTZ: This type is suitable for column data values entered as a comma-separated list in the format
YYYY-MM-DD HH:MI:SS. - TIMESTAMP_LTZ: This type is suitable for column data values entered as a comma-separated list in the format
YYYY-MM-DD HH:MI:SS. - TIMESTAMP_TZ: This type is suitable for column data values entered as a comma-separated list in the format
YYYY-MM-DD HH:MI:SS +TZ. - TIME: This type is suitable for column data values entered as a comma-separated list in the format
HH:MI:SS. - VARIANT: This type is suitable for column data values entered as a comma-separated list in JSON format.
- Size: The size of the column, if applicable to the chosen data type.
- Scale: The scale of the column, if applicable to the chosen data type.
Click the Text mode toggle at the bottom of the dialog to open a multi-line editor that lets you add items in a single block. For more information, read Text mode.
To use grid variables, select the Use Grid Variable checkbox at the bottom of the dialog. For more information, read Grid variables.
Values = column editor
A dynamic table of values with one column for each column created above.
Click the Text mode toggle at the bottom of the dialog to open a multi-line editor that lets you add items in a single block. For more information, read Text mode.
To use grid variables, select the Use Grid Variable checkbox at the bottom of the dialog. For more information, read Grid variables.
Load strategy = drop-down
Choose how to load data into the target table.
Select one of the following options:
- Create: This is the default option. It creates a new table, and will cause an error if a table with the same name already exists. Existing data will not be affected.
-
Create If Not Exists: This option creates 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 expected the table schema to match what's defined in this component, but it doesn't.
-
Replace: If a table with the name you specify in the
Table nameproperty 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.
| Snowflake | Databricks | Amazon Redshift |
|---|---|---|
| ✅ | ❌ | ❌ |