Skip to content

Fix: Ignore bigquery partition_by config when the target isn't bigquery#5280

Merged
crericha merged 4 commits intomainfrom
ignore-bq-partition-by
Sep 3, 2025
Merged

Fix: Ignore bigquery partition_by config when the target isn't bigquery#5280
crericha merged 4 commits intomainfrom
ignore-bq-partition-by

Conversation

@crericha
Copy link
Contributor

@crericha crericha commented Sep 2, 2025

dbt ignores bigquery partition_by config when not using the bigquery plugin. Have sqlmesh mimic this behavior.

@crericha crericha requested a review from a team September 2, 2025 19:08
@erindru
Copy link
Collaborator

erindru commented Sep 2, 2025

Can you add a test to validate this behaviour?

@crericha crericha force-pushed the ignore-bq-partition-by branch from 0051794 to 4c07ad3 Compare September 3, 2025 15:17
@crericha
Copy link
Contributor Author

crericha commented Sep 3, 2025

Can you add a test to validate this behaviour?

Done

@crericha crericha force-pushed the ignore-bq-partition-by branch from 4c07ad3 to c478480 Compare September 3, 2025 15:18
else:
partitioned_by.append(self._big_query_partition_by_expr(context))
optional_kwargs["partitioned_by"] = partitioned_by
elif isinstance(self.partition_by, dict):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what if neither dict nor list?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@crericha crericha force-pushed the ignore-bq-partition-by branch from 75c37f3 to 6910716 Compare September 3, 2025 16:02
@crericha crericha merged commit 110d7f2 into main Sep 3, 2025
45 of 46 checks passed
@crericha crericha deleted the ignore-bq-partition-by branch September 3, 2025 17:47
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.

3 participants