New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nested fields for BigQuery #3954
Comments
Thanks for opening this @charles-astrafy ! Have you tested using unnested structs in Lightdash as well? (e.g. if you add a dimension as one of the keys in the struct, does Lightdash complain?). I have a feeling that we don't actually unnest the structs so they still might appear as dictionaries/containers in a single column...so there might be an issue to solve before this which is handling unnested structs in Lightdash. |
Hello @TuringLovesDeathMetal , Structs are not supported by Lightdash and it throws an error when we try to use tables that have structs. Definitely a feature that would be good as well to see implemented. But here our concern is more about generating the dbt property files correctly even if the struct are not supported yet. We would like the property files to have already the good structure so we can document it. For instance if there is the following struct in BigQuery: Address: that the dbt property file generated by lightdash be as follows:
Having Lightdash being then able to handle the structs is I think more complex and would hopefully come in a later iteration. |
Is this issue still relevant? There have been no updates for 60 days, please close the issue or keep the conversation going! |
This is very interesting for us and it is blocking our adoption of lightdash, since we heavily use STRUCTS in our data warehouse. |
+1 |
+1, I have a client solution relying on structs and this would unlock migrating that client off of Looker Studio. |
Description
The "lightdash generate" CLI does not handle STRUCT fields in BigQuery. It only creates an entry in the yaml file for the top level field.
What problem does this solve?
It would allow data teams to have complete dbt properties files for their BigQuery tables that contain STRUCT fields. At the time being, those nested fields need to be added manually.
The logic to recursively go through the nested fields and adding those to a yaml file is present in the macro of this codegene package:
https://github.com/dbt-labs/dbt-codegen/blob/main/macros/generate_model_yaml.sql
The text was updated successfully, but these errors were encountered: