# tSnowflakeInput properties for Apache Spark Batch (technical preview)

Availability-note[Beta](https://help.talend.com/r/en-US/Cloud/labels-on-talend-help-center/availability-beta)

Beta content

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.

This component is not supported with Spark 4.0.x.

## Basic settings

| Properties | Description |
| --- | --- |
| Use an existing configuration | Select this check box and in the Component<br>List drop-down list, select the desired connection component to<br>reuse the connection details you already defined. |
| Account | In the Account field, enter, in double<br>quotation marks, the account name that has been assigned to you by Snowflake. |
| Region | Select an AWS or Azure region from the drop-down list. |
| Authentication method | Set the authentication method.<br><br><ul> <li> <span>Key Pair</span>: Select this option if								key pair authentication is enabled. For more information about key								pair authentication, see <a href="https://docs.snowflake.net/manuals/user-guide/jdbc-configure.html#using-key-pair-authentication" target="_blank">Using Key Pair									Authentication</a>.</li> </ul><br><br>Information noteNote: Before selecting the Key<br>Pair option, make sure you have set the key pair authentication<br>data in the Basic settings view of the tSetKeystore<br>component as follows.<br><br><ol> <li>Leave the <span>TrustStore type</span> field unchanged.</li> <li>Set <span>TrustStore file</span> to                           <kbd>""</kbd>.</li> <li>Clear the <span>TrustStore password</span> field.</li> <li>Select <span>Need Client authentication</span>.</li> <li>Enter the path to the key store file in double quotation marks in the                              <span>KeyStore file</span> field (or click the                              <span>[…]</span> button to the right of the                              <span>KeyStore file</span> field and navigate to the key                           store file).</li> <li>Enter the key store file password in the <span>KeyStore                              password</span> field.</li> <li>Clear the <span>Check server identity</span> option.</li> </ol><br><br>Information noteNote: The<br>Key Pair option is available<br>only with the EMR 5.29 and CDH 6.1 distributions when you are using<br>Spark v2.4 and onwards in the Local Spark mode. |
| Username and Password | Enter, in double quotation marks, your authentication information to<br>log in to Snowflake.<br><br><ul> <li> <p>In the <span>User ID</span> field, enter, in                        double quotation marks, your login name that has been defined in Snowflake                        using the <em>LOGIN_NAME</em> parameter of                        Snowflake. For details, ask the administrator of your Snowflake                    system.</p> </li> <li> <p>To enter the password, click the <span>[...]</span> button         next to the password field, enter the password in double quotes in the pop-up dialog box,         and click <span>OK</span> to save the settings.</p> </li> </ul> |
| Database | Enter, in double quotation<br>marks, the name of the Snowflake database to be used. This name is case-sensitive<br>and is normally upper case in Snowflake. |
| Warehouse | Enter, in double quotation marks, the name of the<br>Snowflake warehouse to be used. This name is case-sensitive and is normally upper<br>case in Snowflake. |
| Schema and Edit Schema | A schema is a row description. It defines the number of fields<br>(columns) to be processed and passed on to the next component. When you create a Spark<br>Job, avoid the reserved word line when naming the<br>fields.<br><br><br>Built-In: You create and store the schema locally for this component<br>only.<br><br><br>Repository: You have already created the schema and stored it in the<br>Repository. You can reuse it in various projects and Job designs.<br><br>If the Snowflake data type to be handled is VARIANT, OBJECT, or ARRAY, while<br>defining the schema in the component, select String for the<br>corresponding data in the Type column of the schema editor<br>wizard.<br><br>Click Edit<br>schema to make changes to the schema. If the current schema is of the Repository type, three options are available:<br><br><ul> <li> <p> <span>View schema</span>: choose this                option to view the schema only.</p> </li> <li> <p> <span>Change to built-in property</span>:                choose this option to change the schema to <span>Built-in</span> for local changes.</p> </li> <li> <p> <span>Update repository connection</span>:                choose this option to change the schema stored in the repository and decide whether                to propagate the changes to all the Jobs upon completion.</p> <p>If you just want to                propagate the changes to the current Job, you can select <span>No</span> upon completion and choose this schema metadata                again in the <span>Repository Content</span>                window.</p> </li> </ul><br><br>Note that if the input value of any non-nullable primitive<br>field is null, the row of data including that field will be rejected.<br><br>This component offers the advantage of the<br>dynamic schema feature. This allows you to retrieve unknown columns from source<br>files or to copy batches of columns from a source without mapping each column<br>individually. For further information about dynamic schemas, see [Dynamic schema](https://help.qlik.com/talend/r/en-US/8.0/studio-user-guide/dynamic-schema).<br><br>This<br>dynamic schema feature is designed for the purpose of retrieving unknown columns of a<br>table and is recommended to be used for this purpose only; it is not recommended for the<br>use of creating tables. |
| Table Name | Enter, within double quotation marks, the name of the Snowflake table<br>to be used. This name is case-sensitive and is normally upper case in<br>Snowflake. |
| Read from | Select either Table or<br>Query from the dropdown list. |
| Connection<br>properties | Enter, in double quotation marks, a connection property<br>and the associated value in the corresponding columns. You can find the<br>properties available in [Setting Configuration Options for<br>the Connector](https://docs.snowflake.com/en/user-guide/spark-connector-use.html#setting-configuration-options-for-the-connector) from the official Snowflake documentation. |

## Advanced settings

| Properties | Description |
| --- | --- |
| Allow Snowflake to convert columns and tables to uppercase | Select this checkbox to convert lowercase in the defined table name and<br>schema column names to uppercase. Note that unquoted identifiers should match the<br>Snowflake Identifier Syntax.<br><br>If you deselect the checkbox, all identifiers are<br>automatically quoted.<br><br>This property is not available when you select the<br>Manual Query checkbox.<br><br>For more information on<br>the Snowflake Identifier Syntax, see [Identifier Syntax](https://docs.snowflake.net/manuals/sql-reference/identifiers-syntax.html). |
| Use Custom Region | Select this check box to use the customized Snowflake<br>region. |
| Custom Region | Enter, within double quotation marks, the name of the region to be<br>used. This name is case-sensitive and is normally upper case in<br>Snowflake. |
| Trim all the String/Char columns | Select this check box to remove leading and trailing whitespace from all<br>the String/Char columns. |
| Trim column | Remove the leading and trailing whitespace from the defined<br>columns. |

## Usage

| Properties | Description |
| --- | --- |
| **Usage rule** | This component is used as a start component and requires an<br>output link.<br><br>Use a tSnowflakeConfiguration:<br>update component in the same Job to connect to Snowflake. |
| Spark Connection | In the Spark<br>Configuration tab in the Run<br>view, define the connection to a given Spark cluster for the whole Job. In<br>addition, since the Job expects its dependent jar files for execution, you must<br>specify the directory in the file system to which these jar files are<br>transferred so that Spark can access these files:<br><br><ul> <li> <div> <span>Yarn mode</span> (Yarn client or Yarn cluster):<ul> <li> <p>When using Google Dataproc, specify a bucket in the                                            <span>Google Storage staging bucket</span>                                        field in the <span>Spark configuration</span>                                        tab.</p> </li> <li> <p>When using HDInsight, specify the blob to be used for Job                                        deployment in the <span>Windows Azure Storage                                            configuration</span> area in the <span>Spark                                            configuration</span> tab.</p> </li> <li>When using Altus, specify the S3 bucket or the Azure                                    Data Lake Storage for Job deployment in the <span>Spark                                        configuration</span> tab.</li> <li> <p>When using on-premises distributions, use                                        the configuration component corresponding to the file system                                        your cluster is using. Typically, this system is HDFS and so                                        use <a href="https://help.qlik.com/talend/r/en-US/8.0/components/hdfs/thdfsconfiguration">tHDFSConfiguration</a>.</p> </li> </ul> </div> </li> <li> <p> <span>Standalone mode</span>: use the                            configuration component corresponding to the file system your cluster is                            using, such as <a href="https://help.qlik.com/talend/r/en-US/8.0/components/hdfs/thdfsconfiguration-properties-for-apache-spark-batch">tHDFSConfiguration Apache Spark Batch</a> or <a href="https://help.qlik.com/talend/r/en-US/8.0/components/amazon-s3/ts3configuration-properties-for-apache-spark-batch">tS3Configuration Apache Spark Batch</a>.</p> <p>If you are using Databricks without any configuration component present                            in your Job, your business data is written directly in DBFS (Databricks                            Filesystem).</p> </li> </ul><br><br>This connection is effective on a per-Job basis. |