BigQuery offers a range of features:
BigQuery is designed for flexibility and ease of use. Its integration with other Google Cloud services provides a robust platform for analytics at scale. To keep up with the latest improvements and updates, it’s a good idea to monitor the BigQuery release notes.
For information on BigQuery limitations within Keboola, refer to the BigQuery Limitations section.
In some cases, you may need to abort the transformation execution and exit with an error message.
To abort the execution, set the ABORT_TRANSFORMATION
variable to any nonempty string value. The variable is already declared internally, so you only need to set its value.
This example will set the ABORT_TRANSFORMATION
variable value to 'Integrity check failed'
if the INTEGRITY_CHECK
table
contains one or more records with the RESULT
column equal to the value 'failed'
.
The transformation engine checks ABORT_TRANSFORMATION
after each successfully executed query and returns the variable’s value
as a user error, Transformation aborted: Integrity check failed.
in this case.
To create a simple BigQuery transformation, follow these steps:
source
(as expected by the BigQuery script).You can organize the script into blocks.
Keboola Storage tables store data in character types. When creating a table for output mapping in BigQuery, you can rely on implicit casting to STRING:
Alternatively, you can create the table with all columns as STRING and rely on implicit casting:
Explicit casting of columns to STRING is also an option:
For unstructured data types in BigQuery, explicit casting is often necessary:
There are two types of user-defined functions in BigQuery: persistent and temporary. Persistent UDFs are stored in a dataset and can be used by any user with access to the dataset. Temporary UDFs are only available during the session in which they are created.
Because BQ transformations always run in a new session (and new dataset), you can only use temporary UDFs. To create a temporary UDF, use the CREATE TEMP FUNCTION
statement. You can find more information about UDFs in the BigQuery documentation.