> For the complete documentation index, see [llms.txt](https://trillo.gitbook.io/trillo-workbench-lessons/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://trillo.gitbook.io/trillo-workbench-lessons/begin-code-lessons/query-a-dataset-of-bigquery.md).

# Query a dataset of BigQuery

In this example, the function code accepts the query as input parameters. It executed the query and fetched the data from BigQuery.

### Code: /lessons/Query\_a\_dataset\_of\_BigQuery

**Steps**

1. Create a new function called QueryDatasetBigQuery.java.
2. Set parameters as the query.
3. Call BigQueryApi.getPage function  and pass query, start, and size.
4. Return the data fetched from BigQuery after running the query.
