Skip to content

[BUG] dbt-dry-run Ignoring Partitions from dbt-external-tables #53

@betosaulo-cw

Description

@betosaulo-cw

I've encountered an issue where dbt-dry-run fails to recognize the partitions defined in a YAML configuration for a BigQuery table. Despite the correct specification of partitions under the dbt-external-tables setup, the dry run process results in a BadRequest error, indicating that the partition could not be found.

Steps to Reproduce

  1. Define a table in YAML with the following structure:
version: 2

sources:
  - name: dataset_name
    tables:
      - name: table_name
        external:
          location:  "gs://bucket/path/to/table/table_name/*.json"
          options:
            format: json
            hive_partition_uri_prefix: "gs://bucket/path/to/table/table_name"
            ignore_unknown_values: true
          partitions:
            - name: ts
              data_type: STRING
        columns: 
          - name: uuid
            data_type: STRING
          - name: name
            data_type: STRING
          ...

Observe the error:
400 POST https://bigquery.googleapis.com/bigquery/v2/projects/project_id/jobs?prettyPrint=false: Name ts not found inside a at [15:9]

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions