Skip to content

Bigquery plugin to support custom source - #363

Open
trangkramp wants to merge 3 commits into
dbt-labs:mainfrom
trangkramp:bigquery_plugin_support_custom_macros
Open

Bigquery plugin to support custom source#363
trangkramp wants to merge 3 commits into
dbt-labs:mainfrom
trangkramp:bigquery_plugin_support_custom_macros

Conversation

@trangkramp

@trangkramp trangkramp commented Jul 30, 2025

Copy link
Copy Markdown

Description & motivation

At my company, we have a custom source macro to override the builtins source macro of dbt to limit the data processing (this is the era before --sample flag and we have more logic there than the --sample flag can provide).

We also would like to make use of dbt-external-tables to onboard/manage data from Google Sheets to Google BigQuery via dbt. However, our custom source macro returns a string, hence, we got this error Encountered an error while running operation: Database Error 'str' object has no attribute 'database' when running command:

dbt run-operation stage_external_sources

Hence, in this PR, I would like to explicitly declare the source function from builtins instead of following the macro namespace's search order defined in the dbt_project.yml, so that dbt-external-tables package will make use of the builtins source macro instead of custom source macro.

Checklist

  • I have verified that these changes work locally

@trangkramp
trangkramp requested a review from jeremyyeo as a code owner July 30, 2025 13:33
@trangkramp

Copy link
Copy Markdown
Author

@jeremyyeo can you help me take a look at the PR please? I got an error on the run_tests for snowflake, which is related to the setup of Snowflake I think

Database Error
    250001 (08001): Failed to connect to DB: ***.snowflakecomputing.com:443. Incorrect username or password was specified.

@trangkramp trangkramp changed the title feat: bigquery plugin to support custom source Bigquery plugin to support custom source Jul 30, 2025
@github-actions

Copy link
Copy Markdown

This PR has been marked as Stale because it has been open with no activity as of late. If you would like the PR to remain open, please comment on the PR or else it will be closed in 7 days.

@github-actions github-actions Bot added the Stale label Jan 27, 2026
@boxysean

Copy link
Copy Markdown
Member

Hey @jeremyyeo, I am chatting with @trangkramp and wants to see if this change will be accepted?

I'm of two minds about it: on one hand, it will fix @trangkramp's issue, but it could also break other people's work. What do you think? Should this be moved forward, or perhaps not close it to not merge?

@github-actions github-actions Bot removed the Stale label Apr 17, 2026
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.

2 participants