Skip to content
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

[ADAP-436] Update bigquery__format_column macro #656

Closed
jtcohen6 opened this issue Apr 11, 2023 · 0 comments · Fixed by #655
Closed

[ADAP-436] Update bigquery__format_column macro #656

jtcohen6 opened this issue Apr 11, 2023 · 0 comments · Fixed by #655
Assignees

Comments

@jtcohen6
Copy link
Contributor

jtcohen6 commented Apr 11, 2023

Update bigquery__format_column macro in accordance with the changes in dbt-labs/dbt-core#7319, to enable a prettier ContractError message.

Rather than just returning <column_name> <data_type> as a string, the macro should return a dictionary containing:

{
    "column_name": "<column_name>",
    "data_type": "<data_type>",
    "formatted": "<column_name> <data_type>"
}

This macro needs to be reimplemented on dbt-bigquery in order to use column.data_type, instead of column.dtype (default implementation). The former handles complex/repeated data types, e.g. ARRAY<STRING>, where the latter reports back only STRING.

@jtcohen6 jtcohen6 self-assigned this Apr 11, 2023
@github-actions github-actions bot changed the title Update bigquery__format_column macro [ADAP-436] Update bigquery__format_column macro Apr 11, 2023
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 a pull request may close this issue.

1 participant