August 15, 2023

tSnowflakeOutput – Docs for ESB 6.x

tSnowflakeOutput

Uses the data incoming from its preceding component to insert, update, upsert or
delete data in a Snowflake table.

It uses the bulk loader provided by Snowflake for high performance database
operations.

tSnowflakeOutput Standard properties

These properties are used to configure tSnowflakeOutput running in the Standard Job framework.

The Standard
tSnowflakeOutput component belongs to the
Cloud family.

The component in this framework is generally available.

Basic settings

Property Type

Select the way the connection details
will be set.

  • Built-In: The connection details will be set
    locally for this component. You need to specify the values for all
    related connection properties manually.

  • Repository: The connection details stored
    centrally in Repository > Metadata will be reused by this component. You need to click
    the […] button next to it and in the pop-up
    Repository Content dialog box, select the
    connection details to be reused, and all related connection
    properties will be automatically filled in.

This property is not available when other connection component is selected
from the Connection Component drop-down list.

Connection Component

Select the way you want this component to connect to Snowflake:

  • Use this component: define the
    Snowflake connection locally and only for this component.

  • tSnowflakeConnection: reuse the
    connection defined in a given tSnowflakeConnection.

Account

In the Account field, enter, within
double quotation marks, the name that has been assigned to you by Snowflake.

User Id and Password

Enter, within double quotation marks, your authentication information to
log in Snowflake.

  • In the User ID field,
    enter, within double quotation marks, your login name that has been defined
    in Snowflake using the LOGIN_NAME parameter of
    Snowflake. For details, ask the administrator of your Snowflake system.

  • To enter the password, click the […] button next to the
    password field, and then in the pop-up dialog box enter the password between double quotes
    and click OK to save the settings.

Warehouse

Enter, within double quotation marks, the name of the Snowflake warehouse
to be used. This name is case-sensitive and is normally upper case in Snowflake.

Schema

Enter, within double quotation marks, the name of the database schema to
be used. This name is case-sensitive and is normally upper case in Snowflake.

Database

Enter, within double quotation marks, the name of the Snowflake database
to be used. This name is case-sensitive and is normally upper case in Snowflake.

Table

Click the […] button and in the
displayed wizard, select the Snowflake table to be used.

Schema and Edit Schema

A schema is a row description. It defines the number of fields (columns) to
be processed and passed on to the next component. The schema is either Built-In or stored remotely in the Repository.

Built-In: You create and store the
schema locally for this component only. Related topic: see
Talend Studio

User Guide.

Repository: You have already created
the schema and stored it in the Repository. You can reuse it in various projects and
Job designs. Related topic: see
Talend Studio

User Guide.

If the Snowflake data type to be handled is
VARIANT,
OBJECT or ARRAY, while defining the schema in the
component, select String for the corresponding
data in the Type column of the schema editor
wizard.

Click Edit schema to make changes to the schema.
If the current schema is of the Repository type, three
options are available:

  • View schema: choose this option to view the
    schema only.

  • Change to built-in property: choose this
    option to change the schema to Built-in for
    local changes.

  • Update repository connection: choose this
    option to change the schema stored in the repository and decide whether to propagate
    the changes to all the Jobs upon completion. If you just want to propagate the
    changes to the current Job, you can select No
    upon completion and choose this schema metadata again in the [Repository Content] window.

Note that if the input value of any non-nullable primitive
field is null, the row of data including that field will be rejected.

This component offers the
advantage of the dynamic schema feature. This allows you to retrieve unknown columns
from source files or to copy batches of columns from a source without mapping each
column individually. For further information about dynamic schemas, see
Talend Studio

User Guide.

This dynamic schema
feature is designed for the purpose of retrieving unknown columns of a table and is
recommended to be used for this purpose only; it is not recommended for the use of
creating tables.

Output Action

Select the operation to insert, delete, update or merge data in Snowflake
tables.

The Upsert operation allows you to
merge data in a Snowflake table based on the data that is incoming to tSnowflakeOutput. After selecting Upsert, select the column to be used as the join key of
this operation.

Advanced settings

Login Timeout

Specify how long to wait for a response when connecting
to Snowflake before returning an error.

Tracing

Select the log level for the Snowflake JDBC driver. If enabled, a standard
Java log is generated.

Role

Enter, within double quotation marks, the default access control role to
use to initiate the Snowflake session.

This role must already exist and has been granted to the user ID you are
using to connect to Snowflake. If this field is left empty, the PUBLIC role is
automatically granted. For further information about the Snowflake access control
model, see Snowflake documentation at Understanding the Access Control
Model
.

tStatCatcher Statistics

Select this check box to collect log data at the component
level.

Global Variables

NB_LINE

The number of rows processed. This is an After variable and it returns an
integer.

NB_SUCCESS

The number of rows successfully processed. This is an After variable and it returns
an integer.

NB_REJECT

The number of rows rejected. This is an After variable and it returns an
integer.

ERROR_MESSAGE

The error message generated by the component when an error occurs. This
is an After variable and it returns a string.

Usage

Usage rule

This component is end component of a data flow in your Job. It receives data from
other components via a Row > Main link.

It can also send error messages to other components via a Row > Rejects link. The provided information about an error could be:

  • The name of the column in error.

  • The number of the row in error.

  • The category of the error, such as a parsing error or a conversion error.

  • The character offset in the line in error.

  • The related error message.

  • The offset of the byte in error.

  • The number of the line in error.

  • SQLSTATE for the error.

  • Snowflake error code.

Related
scenario


Document get from Talend https://help.talend.com
Thank you for watching.
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x