Skip to content

bigfunctions > list_scheduled_queries

list_scheduled_queries

Call or Deploy list_scheduled_queries ?

✅ You can call this list_scheduled_queries bigfunction directly from your Google Cloud Project (no install required).

  • This list_scheduled_queries function is deployed in bigfunctions GCP project in 39 datasets for all of the 39 BigQuery regions. You need to use the dataset in the same region as your datasets (otherwise you may have a function not found error).
  • Function is public, so it can be called by anyone. Just copy / paste examples below in your BigQuery console. It just works!
  • You may prefer to deploy the BigFunction in your own project if you want to build and manage your own catalog of functions. This is particularly useful if you want to create private functions (for example calling your internal APIs). Discover the framework

Public BigFunctions Datasets:

Region Dataset
eu bigfunctions.eu
us bigfunctions.us
europe-west1 bigfunctions.europe_west1
asia-east1 bigfunctions.asia_east1
... ...

Description

Signature

list_scheduled_queries(project)

Description

Returnsscheduled_queries of project project.

Result is a list of TransferConfig.

Examples

If project is null, then the current project is used

select bigfunctions.eu.list_scheduled_queries(None)
select bigfunctions.us.list_scheduled_queries(None)
select bigfunctions.europe_west1.list_scheduled_queries(None)
+---------------------------------------------------------------------------------------------------+
| scheduled_queries                                                                                 |
+---------------------------------------------------------------------------------------------------+
| [
  "bigquery-public-data.america_health_rankings",
  "bigquery-public-data.austin_311",
  ...
]
 |
+---------------------------------------------------------------------------------------------------+

Need help using list_scheduled_queries?

The community can help! Engage the conversation on Slack

For professional suppport, don't hesitate to chat with us.

Found a bug using list_scheduled_queries?

If the function does not work as expected, please

  • report a bug so that it can be improved.
  • or open the discussion with the community on Slack.

For professional suppport, don't hesitate to chat with us.

Use cases

A use case for the list_scheduled_queries function would be for an administrator or developer who needs to gain an overview of all scheduled queries within a specific Google Cloud project. Here are some more detailed scenarios:

  • Auditing and Governance: A data governance team could use this function to regularly check for any unauthorized or outdated scheduled queries. They could then disable or modify them as needed, ensuring compliance with data policies.

  • Monitoring and Performance Tuning: By listing all scheduled queries, a performance engineer can identify resource-intensive queries that might be impacting overall BigQuery performance. This allows for optimization efforts and better resource allocation.

  • Documentation and Knowledge Sharing: This function can be used to generate a list of existing scheduled queries for documentation purposes. This is useful for onboarding new team members or understanding the data pipelines within a project.

  • Dependency Management: Before making changes to underlying datasets or tables, a developer could use list_scheduled_queries to identify any scheduled queries that depend on those resources. This helps prevent unintended consequences and ensures a smooth transition during updates.

  • Troubleshooting and Debugging: When investigating issues with data freshness or unexpected results, knowing which scheduled queries are running and their configurations is crucial. This function provides that information quickly and easily.

  • Building Management Tools: You could integrate this function into a custom management tool or dashboard that provides a centralized view of all scheduled tasks within a project, including queries, data transfers, and other operations.

Example: Imagine a company that uses scheduled queries to generate daily reports. They could use list_scheduled_queries within a script to:

  1. Retrieve all scheduled queries.
  2. Filter the list based on specific criteria (e.g., queries that run on a specific dataset, or queries containing certain keywords).
  3. Generate alerts if any crucial scheduled queries are missing or disabled.
  4. Automatically enable or disable queries based on certain conditions.

This allows for programmatic control and monitoring of scheduled queries, simplifying administration and improving reliability.

Spread the word

BigFunctions is fully open-source. Help make it a success by spreading the word!

Share on Add a on