# tBigQueryInput properties for Apache Spark Batch

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

The Spark Batch tBigQueryInput 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 |
| --- | --- |
| Source type | Select the way you want tBigQueryInput to read data from<br>Google BigQuery:<br><br><ul> <li> <p> <kbd>Table</kbd>: copy the whole table.</p> </li> <li> <p> <kbd>Query</kbd>: write a query to select data.</p> </li> </ul> |
| Schema and Edit Schema | <ul> <li> <p>A schema is a row description. It defines the number of fields            (columns) to be processed and passed on to the next component. When you create a Spark            Job, avoid the reserved word <kbd>line</kbd> when naming the            fields.</p> <p>Click <span>Edit        schema</span> to make changes to the schema. If the current schema is of the <span>Repository</span> type, three options are available:</p> <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> </li> <li> <p> <span>Built-In</span>: You create and store the schema locally for this component                only.</p> </li> <li> <p> <span>Repository</span>: You have already created the schema and stored it in the                Repository. You can reuse it in various projects and Job designs.</p> </li> </ul> |

When the Source type is Table:

| Properties | Description |
| --- | --- |
| Project ID | If your Google BigQuery service uses the<br>Google Cloud Platform project ID, keep this checkbox clear to allow<br>tBigQueryInput to read this ID from the Spark<br>configuration tab or the<br>tBigQueryConfiguration component.<br><br>If the Google BigQuery service uses<br>a custom ID, select this checkbox and enter the ID.<br><br>The ID of your project can be<br>found in the URL of the Google API Console, or by hovering your mouse<br>pointer over the name of the project in the BigQuery Browser<br>Tool. |
| Dataset | Enter the name of the dataset to<br>which the table to be copied belongs.<br><br>When<br>you use Google BigQuery with Dataproc, in Google Cloud Platform, select<br>the same region for your BigQuery dataset as for the Dataproc cluster to<br>be<br>run. |
| Table | Enter the name of the table to be<br>copied. |

When the Source type is Query:

| Properties | Description |
| --- | --- |
| Query | Enter the query to be used.<br><br>When<br>you use Google BigQuery with Dataproc, in Google Cloud Platform, select<br>the same region for your BigQuery dataset as for the Dataproc cluster to<br>be<br>run.<br><br>If the<br>query to be used is the legacy SQL of BigQuery, select this Use<br>legacy SQL checkbox. For further information about this legacy<br>SQL, see [Legacy SQL query reference](https://cloud.google.com/bigquery/docs/reference/legacy-sql) in the Google Cloud<br>documentation. |

## Usage

| Usage guidance | Description |
| --- | --- |
| **Usage rule** | This is an input component. It sends data extracted from<br>BigQuery to the component that follows it.<br><br>Place a tBigQueryConfiguration<br>component in the same Job because it needs to use the BigQuery<br>configuration information provided by tBigQueryConfiguration. |
| 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. |