dbt-labs / dbt-bigquery

dbt-bigquery contains all of the code required to make dbt operate on a BigQuery database.
https://github.com/dbt-labs/dbt-bigquery
Apache License 2.0
217 stars 153 forks source link

[Bug] is_incremental always return False when use Project Number instead of Project ID #1307

Open chura-awashima opened 3 months ago

chura-awashima commented 3 months ago

Is this a new bug in dbt-bigquery?

Current Behavior

Maybe relate #1120 but I don't have confidence. It seems same phenomenon.

I use profile as Project Number and it's working properly without incremental model.

But when I use incremental model, this model alway create table if real table exists.

I notice this behavior is related to cache because it's working when I append --no-populate-cache flag

Expected Behavior

I have three ideas of expected behaviors but I can't decide which is better

  1. reject config project as Project Number
  2. fix around cache method when use Project Number
  3. Add some document to use Project ID

Steps To Reproduce

  1. use profile project as Project Number
  2. create increment model and run twice
  3. add --no-populate-cache and run

Relevant log output

Nothing

Environment

- OS: Mac
- Python: 3.11
- dbt-core: 1.8.4
- dbt-bigquery: 1.8.2

I can reproduce
dbt-core: 1.7.7
dbt-bigquery: 1.7.4

Additional Context

Nothing

amychen1776 commented 2 months ago

@chura-awashima Do you mean that you're using a profile id rather than a project id in your profiles.yml?

chura-awashima commented 2 months ago

Yes, and I'm using project id so I don't have any problem.

amychen1776 commented 2 months ago

@chura-awashima what are the use cases in which you would use project number rather than project id?

chura-awashima commented 1 week ago

1 good usecase is project_id can be duplicated and force changed by google from submitted by us.

but project number is not changed