Skip to content

Bigquery datasets don't always get created #396

@Robin-C

Description

@Robin-C

Describe the bug

The dataset where external tables are created does not always get automatically created.

Image

Steps to reproduce

Manually create a dataset where your external table is supposed to be created in then immediately drop it, stage your external table and you should get an error saying the dataset does not exist.

I'm thinking there may be a lag between the dataset being dropped and when the data gets updated in the SCHEMATA table (which this macro uses) to determine if a dataset exists or not.

Expected results

dataset gets created before external table is created

Actual results

Image

Screenshots and log output

System information

The contents of your packages.yml file:

Which database are you using dbt with?

  • redshift
  • snowflake
  • bigquery
  • other (specify: ____________)

The output of dbt --version:

<output goes here>

The operating system you're using:

The output of python --version:

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions