Problem with Google BigQuery Rest API via Power BI - google-bigquery

I have a problem scheduling refresh in the Power Bi service for the google Big Query database.
It used to work fine and since last Friday Power Bi cannot connect to gbq anymore.
I tried Microsoft Support but they send me to you.
This is the error I receive:
ODBC: ERROR [HY000] [Microsoft][DriverOAuthSupport] (8701) Error interacting with REST API: Couldn't connect to server ERROR [HY000] [Microsoft][DriverOAuthSupport] (8701) Error interacting with REST API: Couldn't connect to server Table: CS_Scorecard.
Cluster URI: WABI-WEST-EUROPE-B-PRIMARY-redirect.analysis.windows.net
Activity ID: 07d42767-95e3-4bbc-81e8-6953be164caa
Request ID: f1b4b205-4228-4f16-8d6d-e98b28eec5c7
Time: 2019-12-10 12:43:12Z
I tried creating a new model with 1 gbq link and that worked fine. But my existing model is failing right now.
Any ideas on how to resolve this?

According with Power BI support page this issue is known.
Seems that the issue may be caused by a lack of permissions for the user attempting to establish a connection.
You will need to check that the account being used has the appropriate permissions, in particular "bigquery.tables.list" permission needs to be assigned.
Check the BigQuery roles and permissions.
I suggest confirming that there are no custom IAM roles or roles type set up on the dataset(s) you are trying to connect to.
Verify that you are using the last version of Simba drivers for BigQuery.
Finally you can look the following Public Issue Tracker, where this issue was reported.

thank you for your answer.
The Power Bi user has the Data Viewer role and we haven't any custom role on this dataset.
About the driver, we are trying to refresh a dataflow on the PBI Server, not in Desktop, so I guess the driver is updated.
Thank you.

Related

Power BI query is not visible in BigQuery query history

More of a curiosity question really. I load data into Power BI report from Google BigQuery (using native Google BigQuery connector in Power BI). All works fine, but for some reason I don't see this query in BigQuery's query history.
Did anyone experience something similar and knows the reason why this happens or how to change that (if at all possible)?
If I do exactly the same thing but using simba ODBC connector, I see this query in BigQuery's query history as expected.
Never seen that before. I am always able to find the query history no matter what 3rd party connection I used. Could you confirm the GCP service-account or auth-account and the GCP project for BQ job query that you used for your native Google BigQuery connector in Power BI?
Please make sure you have the access to the query history of that GCP account in that BQ job project.

Azure Synapse Analytics Error when using saveAsTable from a DataFrame which is loaded from a SQL source

I'm following the guide (https://learn.microsoft.com/en-us/azure/synapse-analytics/get-started) for loading data from a SQL Pool and writing the DataFrame to a table in the metastore. However I'm getting an error:
Error : org.apache.hadoop.fs.azurebfs.contracts.exceptions.AbfsRestOperationException: Operation failed: "This request is not authorized to perform this operation using this permission.", 403, PUT, https://xxx.dfs.core.windows.net/tempdata/synapse/workspaces/xxx/sparkpools/SparkPool/sparkpoolinstances/8f3ec14a-1e59-4597-8fd9-42da0db65331?action=setAccessControl&timeout=90, AuthorizationPermissionMismatch, "This request is not authorized to perform this operation using this permission. RequestId:fe61799c-e01f-0003-119e-37fdb1000000 Time:2020-05-31T22:57:55.8271281Z"
I've replaced my resource names with xxx.
Other DataFrame saveAsTable operations work fine. From what I can see, the data is being read from the SQL Pool successfully and being staged as when I browse the data lake location specified in the error I can see the data.
/tempdata/synapse/workspaces/xxx/sparkpools/SparkPool/sparkpoolinstances/8f3ec14a-1e59-4597-8fd9-42da0db65331
The Synapse workspace managed identity has storage blob data contributor permissions and my own domain account has owner access.
Has anyone else had issues?
Thanks
Andy
Please assign yourself (account with which you're trying to run the script) a role of Storage Blob Data Contributor.
Below information is now showing up during the creation of Azure Synapse workspace.
It was a big struggle to figure this out during it's private preview.
More information related to securing synapse workspace can be found here.
Let me know if this worked.
Thank you.

Can Tableau do impersonation when connecting to Drill?

I have Tableau Server connecting to a Drill view. I want to deal with authorisation in Drill so I need Drill to know who is requesting the data from Tableau Server. For this I need impersonation to work as otherwise session_user in Drill will always be Tableau Server service account and not an actual person connecting to Tableau Server.
This link seems to suggest that impersonation in Tableau works only for SQL Server:
https://onlinehelp.tableau.com/v10.1/server/en-us/impers_requ.htm
It would be strange considering how many datasources Tableau supports... Is it really not possible? And if it is not, are there any workarounds?
My versions are: Tableau 10.1 and Drill 1.10
I think the confusion here because of Tableau doesn't mention about Drill anywhere in documentation. You can treat Drill as a SQL server and use impersonation with it. Drill supports something called inbound impersonation which allows a connection user (session_user) in drill to impersonate a Tableau end user. The corresponding parameter for connection string of Drill is delegation_uid.

How do I connect a BigQuery database based on a Google Sheet to Looker?

I'm attempting to connect BigQuery to Looker. I am pulling sample data from a Google Sheets document to a BigQuery dataset; this part is working fine, as my internal BigQuery queries are running just fine for this dataset. Using this documentation from the Looker forums, I tried to create a service account key to connect my BigQuery dataset to Looker. Unfortunately, the documentation is slightly out of date: Google now asks which service account (compute engine default service account, app engine default service account, or a new service account that can have any of multiple roles) you want to attach the key to.
Thus far, I have tried using P12 keys created for the compute engine default service account, the app engine default service account, as well as a new Project Owner service account. When I create the connection in Looker, the admin page confirms that the connection "can connect, can cancel queries, can run simple select query" (I need it to do more complex things, but am just trying to connect at all right now). Using the SQL Runner to test a simple select 10 query out, I was able to query the public datasets, e.g. hacker_news or usa_names. However, whenever I tried to run the same query on my personal sample dataset, I received this error:
Failed to retrieve data - The job encountered an internal error during execution and was unable to complete successfully.
The permissions for the base Google Sheet that the BigQuery project is pulling from are set to be viewable by my coworkers who have the link. I have also been adding each service account I test as an editor (which I assume has the highest permissions). At this point, I am creating new service accounts with each of the different possible roles to see if it's a permissions issue from the role perspective. Nothing has worked so far, so any insight would be helpful!
UPDATE: I have created a new table within the same BigQuery dataset. The new table was created using a CSV file, which was simply a download of my previous table in Google Sheets. I updated the connection to Looker. When I wrote a select 10 query pulling from the new table, it worked fine and ran very quickly. This seems to imply that the problem is something about the permissions between Google Sheets and Google BigQuery.
I've been wanting to do something like this myself for a bit, saw this question, and decided to dig in.
First thing I found was this "documentation" over in the looker discourse:
https://discourse.looker.com/t/live-spreadsheets-in-databases/2698/7
In there, it describes the steps necessary to get this working.
Two important things that you are probably missing, based on your description of events so far (since it sounds like you've already attached the sheet to your dataset and are able to query it from the BigQuery UI):
Make sure you share the Google Sheet with the service account you are using to connect Looker to BigQuery. This is the Username from the Connections tab of the Admin page in Looker.
Make sure you have enabled the Drive and Sheets APIs for your google project. You can do that via The API Library. Just search for "Drive" (or "Sheets"), click on the name, and then click on the "Enable" button from the API detail page.
Once I did the above, I had to wait a few minutes before things started working. I'll go out on a limb and guess that this was because Looker needed to cycle it's internal connection pool before the permissions would reset and work. So you may need to run a few failing queries, or wait out the connection pool before this will go into effect.
Hope that helps.

Using BigQuery for AdSense data - 403 Access Denied

I've been successfully using BigQuery to pull AdSense data, but recently all queries have started failing, with this error:
(403) Access Denied: Table
google.com:adsense-reports:Reports.DailyCustomChannelReport: The user
does not have permission to query a table in dataset
google.com:adsense-reports:Reports
Here's a sample query:
SELECT matched_ad_requests, clicks, FROM [google.com:adsense-reports:Reports.DailyCustomChannelReport] WHERE date BETWEEN '2015-02-10' AND '2015-02-11'AND custom_channel_code like 'test_18'
These query failures aren't associated with any code change to my application. They also fail in the BigQuery browser tool- even queries that ran successfully in the past. This seems to rule out a problem with the query.
Nothing has changed with regards to my account access to AdSense. I am able to log in to the dashboard and see all data.
Any ideas how I can restore my ability to query this data? Thanks.
I got internal confirmation: The AdSense experiment for BigQuery was discontinued. The team tells me they notified the experiment users some months ago, before disabling it.
Sorry for the lack of better news!