Data Studio
6.2K members online now
6.2K members online now
Ask questions about Data Studio
Guide Me
star_border
Reply

Can I use function with BigQuery DataSource

[ Edited ]
Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

I began to use datastudio with  BigQuery DataSource.

I wondering whether we can use dimension filtered by regular expression from BigQuery Data Source's row record.

For Example, I have a table has topic column and, we want to show the record count as bar graph where topic include 'Question' string, so I tried to input the function box bellow code.

 

CASE WHEN REGEXP_MATCH(topic,"Question*") THEN "QUESTION" ELSE "OTHERS" END

But it didn't work. Isn't BigQuery Datasource dimension supported with function?

sample2017-03-13 12.00.16.png

As I thought , There are alternative ways to use custom query or create view or table as a datasource.

But these have demerit that datasource increase as dimension does and, it's not seamless for client user especially, someone is poor of GCP or (GCP's Legacy) SQL knowledge.As my company, Those who're not Engineer uses DataStudio, so we don't  want to use them as possible.(Of course, if it is impossible, we use custom query or add datasource.)

How do I best to visualize these data? 

1 ACCEPTED SOLUTION

Accepted Solutions
Marked as Best Answer.
Solution
Accepted by topic author tkow
March 2017

Can I use function with BigQuery DataSource

[ Edited ]
Visitor ✭ ✭ ✭
# 2
Visitor ✭ ✭ ✭

This problem caused by my failure. I recreated table and unintentionally made mismatched type of column from point of recreating date before and after. I dropped  old  table and above query works. I understood above code inserted to BigQuery SQL Select clause. If there is someone who try to find solution, I apologize because the problem doesn't seem to be resolved only my provided information. 

View solution in original post

Marked as Best Answer.
Solution
Accepted by topic author tkow
March 2017

Can I use function with BigQuery DataSource

[ Edited ]
Visitor ✭ ✭ ✭
# 2
Visitor ✭ ✭ ✭

This problem caused by my failure. I recreated table and unintentionally made mismatched type of column from point of recreating date before and after. I dropped  old  table and above query works. I understood above code inserted to BigQuery SQL Select clause. If there is someone who try to find solution, I apologize because the problem doesn't seem to be resolved only my provided information.