Skip to main content Skip to complementary content

Creating a Snowflake table and a Snowflake sequence

Procedure

  1. Double-click the first tJDBCRow component to open its Basic settings view.
  2. Select the Use an existing connection check box and from the Component List drop-down list displayed, select the connection component to reuse the connection created by it, tJDBCConnection_1 in this example.
  3. In the Query field, enter the SQL command used to create a new table.
    In this example, the SQL command is CREATE OR REPLACE TABLE employee (id INTEGER, name VARCHAR(50), role VARCHAR(50), salary DOUBLE, PRIMARY KEY(id)), which creates a new table employee with four columns, id of INTEGER type as the primary key, name and role of VARCHAR type, and salary of DOUBLE type. This table will be used to store the employee data.
  4. Double-click the second tJDBCRow component to open its Basic settings view.
  5. Select the Use an existing connection check box and from the Component List drop-down list displayed, select the connection component to reuse the connection created by it, tJDBCConnection_1 in this example.
  6. In the Query field, enter the SQL command used to create a Snowflake sequence.
    In this example, the SQL command is create or replace sequence employee_sequence, which creates a new sequence employee_sequence. This sequence will be used by the tJDBCSCDELT component to generate the surrogate key for SCD Type 2 method.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!