import { BigQuery } from "@google-cloud/bigquery"
/**
* List Datasets
* List the datasets in the service account's BigQuery project, with their location and labels.
*/
export async function main(auth: RT.Bigquery) {
const bigquery = new BigQuery({
credentials: auth,
projectId: auth.project_id,
})
const [datasets] = await bigquery.getDatasets()
return datasets.map((d) => d.metadata)
}
Submitted by hugo989 4 hours ago