Forum Discussion

ROPARADISO's avatar
ROPARADISO
Regular Visitor
29 days ago
Solved

BigQuery Connection Using DEV Project Instead of PRD

I'm encountering a connection issue where my query is intended to use the production project

prj-gcp-bq-sharing-prd-rti
 

However, when the query executes, the error message shows that it is trying to access a table in the development project instead:

prj-gcp-bq-sharing-dev-rti:P_GENERAL_VIEWS.F_SUBSCRIBER_EVENTS
 

Resulting in the following error:

 

I've tried with and without the preview feature, none is working. ODBC connector works fine tho.

Any ideas?

  • Hello,

    Just check your connection string and set the default project to production, not dev. If your SQL already qualifies the table withprj-gcp-bq-sharing-prd-rti, that helps, but the connection's default often takes priority.
    Also verify your service account actually has permissions on prod, the fact that ODBC works suggests it's a config difference, so compare the connection properties between both methods

    Best regards,
    Daniele

5 Replies

  • Hello,

    Just check your connection string and set the default project to production, not dev. If your SQL already qualifies the table withprj-gcp-bq-sharing-prd-rti, that helps, but the connection's default often takes priority.
    Also verify your service account actually has permissions on prod, the fact that ODBC works suggests it's a config difference, so compare the connection properties between both methods

    Best regards,
    Daniele

    • Prince0011's avatar
      Prince0011
      Icon for Solution Sage rankSolution Sage

      Adding one thing, this is a known behavior with the native BigQuery connector, it can default to whichever project the credentials were first authenticated against, even if your SQL fully qualifies the prod project name. Since ODBC works fine, that confirms it's connector-specific, not a permissions issue.

      Try clearing cached credentials for BigQuery in Power BI (Data source settings > BigQuery > Clear permissions), then reconnect and explicitly select the prod project during the credential prompt, not just in the query itself.

      If it still defaults to dev, that's worth reporting as a bug since ODBC and the native connector clearly aren't behaving consistently for project selection.

      If this helped, feel free to give it a kudos or mark it as solution, helps others find it too.

    • ROPARADISO's avatar
      ROPARADISO
      Regular Visitor

      Hi Daniellee, of course this is how it is set I was adding the project on the project id field. I also checked the ODBC conector on my laptop, signed in on Big query, got a new tocken, selected from the dropdown the prd. 

      I also updated my version to July, previosly it was may. So far without the preview feature unticked it didnt work. I am gonna try with the preview one but im not a fan of preview features.

      I've also cleared the cache  as  Prince0011​ suggested below.

      What copilot was saying is that some tables that i am querying on prd are linked to the dev environment?

  • v-kathullac's avatar
    v-kathullac
    Icon for Community Support rankCommunity Support

    Thankyou DanieleUgoCopp​  for Addressing the issue.

     

    Hi ROPARADISO​   ,

     

    As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided for the issue worked? or Let us know if you need any further assistance?

     

    Regards,

    Chaithanya