0
votes

I am trying to connect and visualise aggregation of metrics from a wildcard table in BigQuery. This is the first time I am connecting a table from this particular Google Cloud project to Data Studio. Prior to this, I have successfully connected and visualised metrics from other BigQuery tables from other Google Cloud projects in Google Data Studio and never encountered this issue. Any ideas? Could this be something to do with project-level permissions for Google Data Studio to access a BigQuery table for the first time?

More details of this instance: the dataset itself seems to be successfully connected into Data Studio so errors were encountered. After adding some charts connected to that data source and aggregating metrics, no other Data Studio error messages were encounterd. Just the words "No data" displayed in the chart. Could this also be a formatting issue in the BigQuery table itself? The BigQuery table in question was created via pandas-gbq in a loop to split the original dataset into individual daily _YYYYMMDD tables. However, this has been done before and never presented a problem.

1
It seems that Data Studio has some issues when working with dates. Two suggestions to troubleshoot it: 1) It doesn't look like permission issues; however, you can try connecting another table from the same dataset and see if there's data. 2) Go to BigQuery console and check the Query history to see what query did Data Studio execute to extract the data - Tlaquetzal
Hey, thank you for your response. I forgot to mention this in my question but the other tables I tried from those other Google Cloud projects, they also were _YYYYMMDD wildcard tables with dates in them and they seemed to work perfectly. Although, having said that, the date column in those tables was according to the YYYYMMDD specification. However, the date column in this table follows the YYYY-MM-DD convention. Strange thing is both types are recognised by Data Studio as dates during data source import. - mrag
Yes, I have seen some related questions to this issue. The DataStudio documentation mentions that one date in format YYYYMMDD is required to work with dates, so you could try changing the format. Finally, I saw this thread where a user mentions that if you cast the column to TIMESTAMP it will work fine and this one has also good recommendations - Tlaquetzal
@Tlaquetzal I tried creating an additional column as TIMESTAMP(date). However, here's the odd thing: when I create this column for just one day's table and connect to Google Data Studio it works like a miracle. However, when I apply this to all tables nested in the wildcard table it results in the same issue. I wonder what could be going on here... - mrag
It sounds odd. Did you try going to BigQuery console and see what query is DataStudio executing? It sounds that there might be an issue with one of the tables from the wildcard, and it could be easier to find out the issue from BigQuery side - Tlaquetzal

1 Answers

2
votes

I have been struggling with the same problem for a while, and eventually I find out that, at least for my case, it is related to the date I add to the suffix (_YYYYMMDD). If I add "today" to the suffix, DataStudio won't recognize it and will display "no data", but if I change it to "yesterday" (a day earlier), it will then display the data correctly. I think it is probably related to the timezones, e.g., "today" here is not yet there in the US, so the system can't show. Hopefully it helps.