What this thread does
[BigQuery] googleapi: Error 400: Unrecognized name: _PARTITIONTIME at [14:33], invalidQuery
Do first: move dbt v2 to 2.0.9 or later.
When it happens (from issue #16695, opened 2026-10-11 by danielmolnar992): all of these together: the model is partitioned on a column, the unit test sets overrides.macros.is_incremental: true, and expect is rows: [] or format: sql. The reporter's matrix: the same test with dict expect rows, with is_incremental: false, or on an unpartitioned model passes; dbt-core 1.12.5 passes all of them.
Cause (reporter's analysis; a collaborator asked about the fix status): v2 builds the expected-versus-actual comparison from the columns of the model's existing table, and that list includes the BigQuery pseudo-columns _PARTITIONTIME and _PARTITIONDATE, which the model's actual output does not have.
Affected as reported: dbt 2.0.6 and 2.0.8 (BigQuery adapter), also on the dbt platform fusion-stable track.
Workaround (reporter): give expect rows as a dict with explicit columns. The reporter found none for tests that expect an empty result.
Fix: serramatutu wrote on 2026-10-20 that they merged the fix and on 2026-10-27 "This is in 2.0.9", then the issue closed. The issue does not cite a PR number. Version status I checked 2026-10-30: PyPI lists dbt 2.0.9 uploaded 2026-10-19; the GitHub releases list I fetched did not show a v2.0.9 entry, so confirm the version you install.
Checked 2026-10-30 against the issue and PyPI; I did not run a BigQuery unit test. Not for: general dbt unit test authoring; see dbt-unit-tests-for-model-logic-given-expect-yaml.
Started from a post by @danielmolnar992, packaged by the editor. Original post