tSnowflakeInput
query.
Depending on the Talend
product you are using, this component can be used in one, some or all of the following
Job frameworks:
-
Standard: see tSnowflakeInput Standard properties.
The component in this framework is available in all Talend products with Big Data
and in Talend Data Fabric. -
Spark Batch: see tSnowflakeInput properties for Apache Spark Batch (technical preview).
The component in this framework is available in all subscription-based Talend products with Big Data
and Talend Data Fabric.
tSnowflakeInput Standard properties
These properties are used to configure tSnowflakeInput running in the Standard Job framework.
The Standard
tSnowflakeInput component belongs to the
Cloud family.
The component in this framework is available in all Talend
products.
connector. The properties related to database settings vary depending on your database
type selection. For more information about dynamic database connectors, see Dynamic database components.
Basic settings
Database |
Select a type of database from the list and click |
Property Type |
Select the way the connection details
This property is not available when other connection component is selected |
Connection Component |
Select the component that opens the database connection to be reused by this |
Account |
In the Account field, enter, in double quotation marks, the account name |
User Id and Password |
Enter, in double quotation marks, your authentication
|
Warehouse |
Enter, in double quotation marks, the name of the |
Schema |
Enter, within double quotation marks, the name of the |
Database |
Enter, in double quotation marks, the name of the |
Table |
Click the […] button and in the displayed wizard, select the Snowflake |
Schema and Edit Schema |
A schema is a row description. It defines the number of fields Built-In: You create and store the schema locally for this component Repository: You have already created the schema and stored it in the If the Snowflake data type to Click Edit
Note that if the input value of any non-nullable primitive This This |
Manual query |
Select this check box and in the Full SQL query string field, enter, within double |
Condition |
Enter, in double quotation marks, the boolean expression |
Advanced settings
Additional JDBC Parameters |
Specify additional connection properties for the database connection you are This field is available only when you |
Use Custom Snowflake Region |
Select this check box to specify a custom
Snowflake region. This option is available only when you select Use This Component from the Connection Component drop-down list in the Basic settings view.
For more information on Snowflake Region |
Login Timeout |
Specify the timeout period (in minutes) |
Tracing |
Select the log level for the Snowflake JDBC driver. If |
Role |
Enter, in double quotation marks, the default access This role must already exist and has been granted to the |
Allow Snowflake to convert columns and tables to uppercase |
Select this check box to convert lowercase in the defined If you deselect the check box, all identifiers are This property is not available when you select the For more information on the Snowflake Identifier Syntax, |
tStatCatcher Statistics |
Select this check box to gather the Job processing metadata at the Job level |
Global Variables
NB_LINE |
The number of rows processed. 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 |
Usage
Usage rule |
This component is start component of a data flow in your Job. It sends data to |
Writing data into and reading data from a Snowflake table
create a Snowflake table, write data into the table, then read data from this table,
finally close the connection to Snowflake.

Creating a Job for writing and reading Snowflake data
the table and then read data from the table, finally close the connection to
Snowflake.
-
The Snowflake data warehouse to be used is started but not in the Suspended
status. -
The Snowflake role assigned to you has read and write permissions to the
database to be connected.
If you are not sure about these requirements, ask the administrator of your Snowflake
system.
-
In the
Integration
perspective of the Studio, create a new Job from the Job Designs node in the Repository tree view. -
Add a tSnowflakeConnection component, a
tSnowflakeRow component, a
tFixedFlowInput component, a
tSnowflakeOutput component, a
tSnowflakeInput component, a
tLogRow component, and a
tSnowflakeClose component to the Job. - Connect the tFixedFlowInput component to the tSnowflakeOutput component using a Row > Main connection.
-
Do the same to connect the tSnowflakeInput component to
the tLogRow component. - Connect the tSnowflakeConnection component to the tSnowflakeRow component using a Trigger > On Subjob Ok connection.
-
Do the same to connect the tSnowflakeRow
component to the tFixedFlowInput
component, the tFixedFlowInput component to the
tSnowflakeInput component, and the
tSnowflakeInput component to the
tSnowflakeClose component.
Connecting to Snowflake
Snowflake.
- Double-click the tSnowflakeConnection component to open its Basic settings view.
-
In the Account field, enter
the account name assigned by Snowflake. -
In the Snowflake Region field, select the region where the
Snowflake database locates. -
In the User Id and the
Password fields, enter the authentication
information accordingly.Note that this user ID is your user login name. If you do not know your user login
name yet, ask the administrator of your Snowflake system for details. -
In the Warehouse field,
enter the name of the data warehouse to be used in Snowflake. -
In the Schema field, enter
the name of the database schema to be used. -
In the Database field, enter
the name of the database to be used.
Creating a Snowflake table
table.
-
Double-click the tSnowflakeRow component to open its
Basic settings view on the
Component tab. -
From the Connection Component drop-down list, select the
tSnowflakeConnection component to reuse the
connection created by it. In this example, it is
tSnowflakeConnection_1. -
In the Query field, enter the SQL statement used to
create a new table into which the data will be written.In this example, the following SQL statement is used to create or replace a
table EMPLOYEE with four columns,
ID of INT type, NAME of
VARCHAR type, ONBOARD of DATE type, and
SALARY of VARIANT type.123456"CREATE OR REPLACE TABLE EMPLOYEE (" +"ID INT NOT NULL primary key," +"NAME VARCHAR (50), " +"ONBOARD DATE," +"SALARY VARIANT" +") COMMENT = 'Created By Doc Team'"
Writing data into Snowflake
tSnowflakeOutput component to write data into
Snowflake.
-
Double-click the tFixedFlowInput component to open its Basic settings view.
-
Click the […] button next
to Edit schema and in the pop-up schema dialog
box, define the schema by adding four columns, ID of int type,
NAME and SALARY of String type, and
ONBOARD of Date type. -
Click OK to validate these
changes and accept the propagation prompted by the pop-up dialog box. -
In the Number of rows field, enter the number of records to
be generated, 5 in this example. -
In the Mode area, select
Use Single Table and specify the value for each
column.-
ID: the automatically incremented number generated by
the routine Numeric.sequence("id",1,1). -
NAME: the random first name generated by the routine
TalendDataGenerator.getFirstName(). -
ONBOARD: the random date generated by the routine
TalendDate.getRandomDate("2007-09-01","2017-09-01"). -
SALARY: the semi-structured JSON data with the format
{"Salary": value}, where the salary value is
generated by the routine
Numeric.random(100000,200000).
-
- Double-click the tSnowflakeOutput component to open its Basic settings view.
-
From the Connection
Component drop-down list, select the tSnowflakeConnection component to reuse the connection created by
it. -
Click the […] button next
to the Table field and in the pop-up dialog
box, select the Use custom object check box and enter the name
of the table into which the data will be written in the Object
Name field. In this example, it is EMPLOYEE,
the table created by the tSnowflakeRow component. When done,
click OK to close the dialog box. -
From the Output action
drop-down list, select Insert to write data to
the table EMPLOYEE.
Reading data from Snowflake
tLogRow component to retrieve data from Snowflake and output
the data on the console.
- Double-click the tSnowflakeInput component to open its Basic settings view.
-
From the Connection
Component drop-down list, select the tSalesforceConnection component to reuse the connection created
by it. -
Click the […] button next to the
Table field and in the pop-up dialog box, select the
Use custom object check box and enter the name of the
table from which the data will be retrieved in the Object
Name field. In this example, it is
EMPLOYEE, the table created by the
tSnowflakeRow component. When done, click
OK to close the dialog box. -
Click the […] button
next to Edit schema and in the pop-up
schema dialog box, define the schema by adding four columns,
ID of int type, NAME and
SALARY of String type, and
ONBOARD of Date type. This schema is the same as the
schema of the tSnowflakeOutput component. -
Click OK to validate
these changes and accept the propagation prompted by the pop-up dialog
box. -
Double-click the tLogRow
component to open its Component
view. -
In the Mode area, select
Vertical (each row is a key/value
list) for better readability of the results.
Closing the Snowflake connection
connection to Snowflake.
-
Double-click the tSnowflakeClose
component to open the Component
tab. -
From the Connection Component drop-down list, select the
component that opens the connection you need to close,
tSnowflakeConnection_1 in this example.
Executing the Job to write and read data in Snowflake
and reading Snowflake data, you can then execute the Job and verify the Job execution
result.
-
Press Ctrl + S to save the
Job. -
Press F6 to run the Job.
As shown below, the data is written into the table EMPLOYEE in
Snowflake, then read from this table and outputted on the console in the
Run view of the Studio.
tSnowflakeInput properties for Apache Spark Batch (technical preview)
These properties are used to configure tSnowflakeInput running in the
Spark Batch Job framework.
The Spark Batch
tSnowflakeInput component belongs to the Databases family.
The component in this framework is available in all subscription-based Talend products with Big Data
and Talend Data Fabric.
Basic settings
Use an existing configuration |
Select this check box and in the Component List click the relevant connection component to |
Account |
In the Account field, enter, in double quotation marks, the account name |
Region |
Select an AWS or Azure region from the drop-down list. |
Username and Password |
Enter, in double quotation marks, your authentication
|
Database |
Enter, in double quotation marks, the name of the |
Warehouse |
Enter, in double quotation marks, the name of the |
Schema and Edit Schema |
A schema is a row description. It defines the number of fields Built-In: You create and store the schema locally for this component Repository: You have already created the schema and stored it in the If the Snowflake data type to Click Edit
Note that if the input value of any non-nullable primitive This This |
Table Name | Enter, within double quotation marks, the name of the Snowflake table to be used. This name is case-sensitive and is normally upper case in Snowflake. |
Read from | Select either Table or Query from the dropdown list. |
Advanced settings
Allow Snowflake to convert columns and tables to uppercase |
Select this check box to convert lowercase in the defined If you deselect the check box, all identifiers are This property is not available when you select the For more information on the Snowflake Identifier Syntax, |
Use Custom Region | Select this check box to use the customized Snowflake region. |
Custom Region | Enter, within double quotation marks, the name of the region to be used. This name is case-sensitive and is normally upper case in Snowflake. |
Trim all the String/Char columns |
Select this check box to remove leading and trailing whitespace from all |
Trim column | Remove the leading and trailing whitespace from the defined columns. |
Usage
Usage rule |
This component is used as a start component and requires an output Use a tSnowFlakeConfiguration: update component in the same Job to connect |
Spark Connection |
In the Spark
Configuration tab in the Run view, define the connection to a given Spark cluster for the whole Job. In addition, since the Job expects its dependent jar files for execution, you must specify the directory in the file system to which these jar files are transferred so that Spark can access these files:
This connection is effective on a per-Job basis. |