Skip to content

Added support for structs and modes (repeated and required) for BigQuery - #313

Open
faahren wants to merge 2 commits into
dbt-labs:mainfrom
faahren:bigquery-schema-support
Open

Added support for structs and modes (repeated and required) for BigQuery#313
faahren wants to merge 2 commits into
dbt-labs:mainfrom
faahren:bigquery-schema-support

Conversation

@faahren

@faahren faahren commented Aug 21, 2024

Copy link
Copy Markdown

Description & motivation

The BigQuery schema declaration was not supporting nested fields (STRUCT, or RECORD) as well as the REPEATED option that gives possibilty to store an array. Those are interesting when linking external tables more complex than CSV (Json, Parquet, etc)

Also, all fields were nullable by default and we could not set them to REQUIRED.

I updated the macro to allow full support for those 3 features
I have not updated the readme but added a sample for bigquery in the dedicated file.
I can't add a test as I do not have access to the bucket containing external samples (To add a nested JSON for example)

Checklist

  • [ X] I have verified that these changes work locally
  • [X ] I have updated the README.md (if applicable ) SAMPLES ADDED TO THE SAMPLE FILE
  • I have added an integration test for my fix/feature (if applicable)

@faahren

faahren commented Sep 3, 2024

Copy link
Copy Markdown
Author

@jeremyyeo Any idea when someone can look into this ?

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant