Search code examples
google-bigquerydatasetbq

List all objects in a dataset using bq ls command in BigQuery


I am trying to list all the objects present in a dataset in BigQuery.

I tried using bq ls projectID:dataset_name command in Google SDK shell. However this returned only the list of tables present in the dataset. I am interested in listing all the stored procedures present in the same dataset.


Solution

  • It is possible to get the list of functions with a query:

    bq query --nouse_legacy_sql \
    'SELECT
       *
     FROM
       mydataset.INFORMATION_SCHEMA.ROUTINES'