Skip to content

Metadata

These functions return metadata related to BigQuery resources.

Functions

get_dataset_ids

Attribute Value
Name get_dataset_ids
ID bqtools.[region].get_dataset_ids
Description Returns the dataset_ids for all datasets across multiple projects.
Type PROCEDURE
Arguments project_ids ARRAY<STRING>, OUT dataset_ids ARRAY<STRING>
Returns OUT dataset_ids ARRAY<STRING>
Dependencies bqtools-qb.[region].get_dataset_ids

execution: get_dataset_ids

CALL bqtools.eu.get_dataset_ids(project_ids, dataset_ids);
CALL bqtools.us.get_dataset_ids(project_ids, dataset_ids);

get_base_table_ids

Attribute Value
Name get_base_table_ids
ID bqtools.[region].get_base_table_ids
Description Returns an array of ids corresponding to every BASE TABLE in a single dataset.
Type PROCEDURE
Arguments dataset_id STRING, OUT base_table_ids ARRAY<STRING>
Returns OUT base_table_ids ARRAY<STRING>
Dependencies bqtools-qb.[region].get_base_table_ids

execution: get_base_table_ids

CALL bqtools.eu.get_base_table_ids(dataset_id, base_table_ids);
CALL bqtools.us.get_base_table_ids(dataset_id, base_table_ids);

get_view_ids

Attribute Value
Name get_view_ids
ID bqtools.[region].get_view_ids
Description Returns an array of ids corresponding to every VIEW in a single dataset.
Type PROCEDURE
Arguments dataset_id STRING, OUT view_ids ARRAY<STRING>
Returns OUT view_ids ARRAY<STRING>
Dependencies bqtools-qb.[region].get_view_ids

execution: get_view_ids

CALL bqtools.eu.get_view_ids(dataset_id, view_ids);
CALL bqtools.us.get_view_ids(dataset_id, view_ids);

get_external_table_ids

Attribute Value
Name get_external_table_ids
ID bqtools.[region].get_external_table_ids
Description Returns an array of ids corresponding to every EXTERNAL TABLE in a single dataset.
Type PROCEDURE
Arguments dataset_id STRING, OUT external_table_ids ARRAY<STRING>
Returns OUT external_table_ids ARRAY<STRING>
Dependencies bqtools-qb.[region].get_external_table_ids

execution: get_external_table_ids

CALL bqtools.eu.get_external_table_ids(dataset_id, external_table_ids);
CALL bqtools.us.get_external_table_ids(dataset_id, external_table_ids);

get_table_function_ids

Attribute Value
Name get_table_function_ids
ID bqtools.[region].get_table_function_ids
Description Returns an array of ids corresponding to every TABLE FUNCTION in a single dataset.
Type PROCEDURE
Arguments dataset_id STRING, OUT table_function_ids ARRAY<STRING>
Returns OUT table_function_ids ARRAY<STRING>
Dependencies bqtools-qb.[region].get_table_function_ids

execution: get_table_function_ids

CALL bqtools.eu.get_table_function_ids(dataset_id, table_function_ids);
CALL bqtools.us.get_table_function_ids(dataset_id, table_function_ids);

get_function_ids

Attribute Value
Name get_function_ids
ID bqtools.[region].get_function_ids
Description Returns an array of ids corresponding to every FUNCTION in a single dataset.
Type PROCEDURE
Arguments dataset_id STRING, OUT function_ids ARRAY<STRING>
Returns OUT function_ids ARRAY<STRING>
Dependencies bqtools-qb.[region].get_function_ids

execution: get_function_ids

CALL bqtools.eu.get_function_ids(dataset_id, function_ids);
CALL bqtools.us.get_function_ids(dataset_id, function_ids);

get_procedure_ids

Attribute Value
Name get_procedure_ids
ID bqtools.[region].get_procedure_ids
Description Returns an array of ids corresponding to every PROCEDURE in a single dataset.
Type PROCEDURE
Arguments dataset_id STRING, OUT procedure_ids ARRAY<STRING>
Returns OUT procedure_ids ARRAY<STRING>
Dependencies bqtools-qb.[region].get_procedure_ids

execution: get_procedure_ids

CALL bqtools.eu.get_procedure_ids(dataset_id, procedure_ids);
CALL bqtools.us.get_procedure_ids(dataset_id, procedure_ids);

get_sql

Attribute Value
Function Name get_sql
ID bqtools.[region].get_sql
Description Returns the SQL definition of a single ROUTINE or VIEW.
Type PROCEDURE
Arguments routine_or_view_id STRING, INOUT sql STRING
Returns OUT sql STRING
Dependencies bqtools-qb.[region].get_sql

execution: get_sql

CALL bqtools.eu.get_sql(routine_or_view_id, sql);
CALL bqtools.us.get_sql(routine_or_view_id, sql);