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

Bigquery Array<string> being interpreted as String when source is generated #249

Open
1 of 5 tasks
cornelDono opened this issue Feb 13, 2025 · 0 comments
Open
1 of 5 tasks
Labels
bug Something isn't working triage

Comments

@cornelDono
Copy link

Describe the bug

The generate_source macro misinterprets the ARRAY type in Bigquery. And set column type to STRING

Steps to reproduce

  1. Create table in Bigquery with ARRAY column
    create table test_schema.test_table (x array<string>)
  2. Run source generation in CLI
    dbt run-operation generate_source --args '{"schema_name": "test_schema", "generate_columns": true}'

Expected results

I expect to have correct type in source definition

 - name: test_table
        columns:
          - name: x
            data_type: array<string>

Actual results

 - name: test_table
        columns:
          - name: x
            data_type: string

Screenshots and log output

System information

The contents of your packages.yml file:

packages:
  - package: dbt-labs/codegen
    version: 0.13.1
  - package: dbt-labs/dbt_utils
    version: 1.3.0
  - package: elementary-data/elementary
    version: 0.16.3
  - package: calogica/dbt_expectations
    version: 0.10.4
  - package: calogica/dbt_date
    version: 0.10.1

Which database are you using dbt with?

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

The output of dbt --version:

Core:
  - installed: 1.8.3
  - latest:    1.9.2 

Plugins:
  - bigquery: 1.8.2 

The operating system you're using:
Apple M1

The output of python --version:
Python 3.11.8

Additional context

Are you interested in contributing the fix?

It is possible

@cornelDono cornelDono added bug Something isn't working triage labels Feb 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage
Projects
None yet
Development

No branches or pull requests

1 participant