Skip to main content
Version: 5.6

Snowflake Insert

The Snowflake Insert transfer object inserts new records into a table or database view in the Snowflake AI Data Cloud during data transfer. The transfer object thus acts as a transfer destination.

Dialog Overview

Configuration dialog for the “Snowflake Insert” transfer object

General Properties

PropertyDescription
Data SourceAll Snowflake connections created in the Plug-ins section are available for selection here. If the desired connection does not yet exist, you can make it available in the Plug-ins section as the “Snowflake AI Data Cloud” plug-in.
TableTable or database view into which records are inserted.
Available ColumnsColumns in the table that have not yet been used.
Used ColumnsColumns that are displayed as elements of the transfer object and are therefore used for the insert operation.

Move columns by double-clicking the column name or using the <, >, <<, and >> buttons. You can add manual columns using the +User-defined button. These must be present in the target table at runtime—which is helpful, for example, in templates when the columns are not yet known during project configuration.

Behavior When Adding

During an insert, incomplete arrays are filled in. For example, if a single timestamp is to be inserted along with multiple array values, the timestamp is automatically reused multiple times until all array elements have been inserted. Therefore, the highest InsertCount is always determined during an insert. Entries with a lower count are expanded accordingly so that the table is completely filled.

Checking the Expected Number of Incoming Records

Optionally, you can check at runtime whether the expected number of records has been provided for the insert. For example, you can specify the minimum, maximum, or exact number of records that must be present for the insert operation to be executed.

Notes

note

The transfer object can also be selected for database views.

Example

The OPC Router writes a data record collected from the machine to the MACHINE_TELEMETRY table so that it can be analyzed in the Snowflake AI Data Cloud. The transfer object shown above is configured for this example.

SettingValue
TableMACHINE_TELEMETRY
Columns UsedMACHINE_ID, PRODUCT_ID, CURRENT_AMOUNT, TEMPERATURE, PRESSURE – the values are connected as targets

The OPC Router generates the following SQL statement based on this:

INSERT INTO MACHINE_TELEMETRY (MACHINE_ID, PRODUCT_ID, CURRENT_AMOUNT, TEMPERATURE, PRESSURE) VALUES (?, ?, ?, ?, ?)