To make the question simple. I create a dataset call test_dataset. And I can see it inside Bigquery after I created it.
Then I wrote the test of Dataform, like this:
Hi @hao-wang,
Welcome to Google Cloud Community!
The error "Dataset test_dataset could not be found" during a Dataform test execution indicates that Dataform is unable to locate the specified dataset when running the test. This typically happens due to a misunderstanding of how Dataform handles datasets during testing versus during the creation of tables/views.
Here are some approaches that you may try:
test_dataset
is in the same location as your Dataform project. BigQuery datasets are location-specific, and mismatched locations can cause errors.test_dataset
. Specifically, it should have bigquery.datasets.get and bigquery.tables.get permissions.defaultLocation
field in the configuration."test"
type in Dataform might have specific requirements or limitations. If it works with "table"
, it could indicate that "test"
is not fully supported for your use case.Feel free to explore the following documentations for more guidance:
Was this helpful? If so, please accept this answer as “Solution”. If you need additional assistance, reply here within 2 business days and I’ll be happy to help.
Hi, Thanks for the reply!
1. Both the dataset and Dataform project are in same location (i.e. us-east1)
2. The service account 'dataform@ava-backend.iam.gserviceaccount.com' has role Bigquery Data Editor role. So it should able to access datasets in the GCP project.
3. The dataform.json file looks like: