Manipulation
These functions are used to manipulate and build SQL queries. They enable robust arbitrary manipulation and evaluation of SQL queries in the native BigQuery environment.
update_cte_sql
Attribute | Value |
---|---|
Name | update_cte_sql |
ID | bqtools.[region].update_cte_sql |
Description | Replaces the SQL for a single CTE (identified by name) in a cte_profile object |
Function Type | PROCEDURE |
Arguments | INOUT cte_profile JSON, update_cte_name STRING, update_cte_sql STRING |
Returns | INOUT cte_profile JSON |
Dependencies | bqtools.[region].get_cte_profile_index |
execution: update_cte_sql
CALL bqtools.eu.update_cte_sql(cte_profile, update_cte_name, update_cte_sql);
CALL bqtools.us.update_cte_sql(cte_profile, update_cte_name, update_cte_sql);
build_sql_from_cte_profile
Attribute | Value |
---|---|
Name | build_sql_from_cte_profile |
ID | bqtools.[region].build_sql_from_cte_profile |
Description | Builds a SQL query from a cte_profile object |
Type | PROCEDURE |
Arguments | cte_profile JSON, OUT sql STRING |
Returns | OUT sql STRING |
Dependencies | bqtools.[region].get_cte_profile_index |
execution: build_sql_from_cte_profile
CALL `bqtools-qb.eu.build_sql_from_cte_profile`(cte_profile, sql);
CALL `bqtools-qb.us.build_sql_from_cte_profile`(cte_profile, sql);