Skip to content

Fix marketing attribution verifier source schema on DuckDB - #13

Open
lluisinthedesert wants to merge 1 commit into
Snowflake-Labs:masterfrom
understudylabs:fix/marketing-source-schema
Open

lluisinthedesert wants to merge 1 commit into
Snowflake-Labs:masterfrom
understudylabs:fix/marketing-source-schema

Conversation

@lluisinthedesert

Copy link
Copy Markdown
Contributor

The DuckDB verifier for dbt-fix-marketing-attribution reads GA staging relations from analytics, although the supplied reference builds them in main. The shipped reference consequently fails four verifier tests with missing-table errors.

SCHEMA describes the output location: analytics on DuckDB and main on Snowflake. Assigning SOURCE_SCHEMA = SCHEMA incorrectly applies that output location to the source relations. Set SOURCE_SCHEMA = 'main' instead; output checks still use SCHEMA.

This agrees with the task's instruction.md:48, which warns that reference staging models materialize in main, and with the sibling dbt-fix-paid-search-attribution verifier, which reads main.stg_ga__sessions while checking output in analytics.

Reproduction

At a3278ad102829a6084dde086244a0ef665a8011c, run this task's reference solution/solve.sh with DB_TYPE=duckdb, then pytest tests/test_outputs.py in the prepared task environment. The reference builds successfully, but these four tests fail because analytics.stg_ga__sessions does not exist:

  • test_conversion_logic
  • test_aggregation
  • test_date_filter
  • test_matches_source_reconciliation

Validation

Backend Original verifier Patched verifier
DuckDB 1.2.2 9 passed, 4 failed 13 passed
Live Snowflake 13 passed 13 passed

Executed the shipped reference and task verifier in isolated local projects on macOS arm64 with Python 3.12, dbt-core 1.10.23, dbt-duckdb 1.10.0, and dbt-snowflake 1.10.0. Container paths were remapped locally. Snowflake pairings used separate database clones with the task's required source dependencies loaded from the pinned dataset. These are direct dbt/pytest checks, not Harbor agent runs.

One line in the verifier changes. No changes to the reference solution, instructions, source data, output schema, or revenue logic.

@lluisinthedesert
lluisinthedesert marked this pull request as ready for review October 21, 2026 04:21

@sfc-gh-dhuang sfc-gh-dhuang left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

thanks for catching this

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