Table of Contents

Search

  1. Preface
  2. Part 1: Getting Started with Snowflake Data Cloud Connector
  3. Part 2: Data Integration with Snowflake Data Cloud Connector
  4. Part 3: SQL ELT with Snowflake Data Cloud Connector
  5. Appendix A: Data type reference
  6. Appendix B: Additional runtime configurations
  7. Appendix C: Upgrading to Snowflake Data Cloud Connector

Snowflake Data Cloud Connector

Snowflake Data Cloud Connector

Sequence Generator transformation

Sequence Generator transformation

When you configure a Sequence Generator transformation, you can connect the NEXTVAL port to single or multiple ports in the transformations that follow the Sequence Generator transformation.
You can push a Sequence Generator transformation with the following restrictions:
  • You cannot use a shared sequence in a Sequence Generator transformation.
  • You can add only an Expression or a Target transformation after a Sequence Generator transformation in a mapping.

Guidelines for using a Sequence Generator transformation in mappings in advanced mode and SQL ELT mode

A Sequence Generator transformation in advanced mode and SQL ELT mode follows the same rules as in mappings. However, to use a Sequence Generator transformation in a mapping in advanced mode and SQL ELT mode, you need to additionally set a property in the mapping task properties, with the name of the sequence in Snowflake.
  1. On the
    Runtime Options
    tab in the task properties, navigate to the
    Advanced Session Properties
    section.
  2. Add a custom property and enter the following session property value in the following format:
    Pushdown.<Sequence transformation name in mapping>.SequenceName=<sequence name to create in Snowflake>
    For example,
    Pushdown.Seq_SF.SequenceName=snowflake_first_sequence&:Pushdown.sequence_second.SequenceName=SECOND_SEQUENCE&:Pushdown.seq_third.SequenceName=THIRD_SEQ
When you use multiple Sequence Generator transformations, the name of the sequence object to be created in the Snowflake database for each sequence must be unique. If not, the transformation runs with the CREATE SEQUENCE IF NOT EXISTS query twice using the same name. The first sequence runs as expected, but the second sequence which has the same name as the first sequence does not override it. Hence, the nextValue generated for the second sequence is incorrect. However, when the sequence runs with a unique name for the sequence object, that sequence is not updated again, irrespective of the number of times you run the mapping.
If you disable SQL ELT optimization and run the mapping, the sequence values restart from the initial start value. If you delete a mapping, you must ensure to also drop the sequences from the Snowflake database.

0 COMMENTS

We’d like to hear from you!