# tSnowflakeOutput properties for Apache Spark Batch (technical preview)

[Preview](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Introduction/feature-preview-program-overview.htm)

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

The Spark Batch tSnowflakeOutput 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. |
| Snowflake Region | Select an AWS region or an Azure region from the<br>Snowflake Region dropdown 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 Key Pair option is available only<br>with the EMR 5.29 and CDH 6.1 distributions when you are using Spark v2.4 and<br>onwards in the Local Spark mode. |
| User Id 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> |
| 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 | Enter,<br>within double quotation marks, the name of the database schema to be used. This name<br>is case-sensitive and is normally upper case in Snowflake. |
| 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. |
| Table | Click the [...] button and in the displayed wizard, select the<br>Snowflake table to be used. |
| 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. |
| Output Action | Only the Insert action is supported<br>by Snowflake on Spark. |
| Connection<br>properties | Enter, in double quotation marks, a connection property and<br>the associated value in the corresponding columns. You can find the properties<br>available in [Setting Configuration Options for the<br>Connector](https://docs.snowflake.com/en/user-guide/spark-connector-use.html#setting-configuration-options-for-the-connector) from the official Snowflake documentation. |

## Usage

| Properties | Description |
| --- | --- |
| **Usage rule** | This component is used as an end component and requires an input 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. |