On this Page
Table of Contents | ||||
---|---|---|---|---|
|
Snap type: | Write | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description: | This Snap allows you to load data into BigQuery easily leveraging the jobs and query APIs. A complete list of supported queries as well as examples are documented here: https://cloud.google.com/bigquery/query-reference.
| |||||||||||||
Prerequisites: | [None] | |||||||||||||
Support and limitations:, limitations, and known issues | Works in Ultra Task Pipelines. Known Issue If you copy data by creating the same table after immediately deleting it, may cause a loss of data. This behavior is expected due to the way the tables are cached and the internal table ID is propagated throughout the system. It is recommended to avoid rewriting in Big Query. Workaround
| |||||||||||||
Account: | This Snap uses account references created on the Accounts page of SnapLogic Manager to handle access to this endpoint. See Google BigQuery Account for information on the type of account to use. | |||||||||||||
Views: |
| |||||||||||||
Settings | ||||||||||||||
Label |
| |||||||||||||
Project ID | Required. This drop-down shows you a list of all the available projects that your user Account has access to. Clicking on the drop-down always pulls the latest list of available projects. The project on which the query should be executed should be selected. | |||||||||||||
Dataset ID | Required. After selecting the project, this drop-down will be populated with the list of available datasets in the Project. | |||||||||||||
Table ID | Required. After selecting the dataset, this drop-down will be populated with the list of available tables in the project. All the tables in BigQuery can also be viewed from the BigQuery console and entered directly into this field. | |||||||||||||
Create table if not present | Whether the table should be automatically created if not already present. Default value: Not selected | |||||||||||||
|
|
Note | |||||||||
---|---|---|---|---|---|---|---|---|---|
| |||||||||
Google BigQuery tables support columns with NUMERIC data type to allow storing big decimal numbers (up to 38 digits with nine decimal places). But Snaps in Google BigQuery Snap Pack that load data into tables cannot create numeric columns. When the Create table if not present check box is selected, the Snaps create the required table schema, but map big decimals to a FLOAT64 column. So, to store the data into numeric columns using these Snaps, we recommend the following actions:
The Google API converts this string into a number with full precision and saves it in the numeric column. Example:
|
Example
The sample pipeline is as shown below that writes data into a BigQuery table.
The input record is passed from the JSON Generator. Its contents are shown below.
The BigQuery Write Snap with Project ID, Dataset ID and Table ID completed is shown as below.
The number of records inserted into the BigQuery table are shown in the output view.
Insert excerpt | ||||||
---|---|---|---|---|---|---|
|