Hi! Not sure if this is the right channel for the ...
# announcements
w
Hi! Not sure if this is the right channel for the question but what permissions does the BigQuery service account need to be used as a data source?
f
Hi! GrowthBook needs the same permissions as other BI tools. That should be the Data Viewer, Metadata Viewer, and Job User roles
👍 1
w
Yeah, thought so. Was hoping maybe there's something that's not project level.
f
I'm not too familiar with BigQuery permissions, but I thought you need a project level permission in order to run any queries. We only query the exact tables you tell us to so it will probably work with more restrictive read access than some other things like Metabase.
w
Yeah true, all tools I can think of require project level access because for some reason BQ doesn't have permissions with dataset/table level query capabilities. This has been a problem with some clients who can't share any keys that have full access to all of their data. The solution has been to create a separate project for that purpose but there should be an easier solution to this.
well, looks like this could actually work for our use case https://stackoverflow.com/a/58564834/4769218
I got the first experiment running but in the "results" section I get this error. Before I debug any further, maybe this is a known error or can someone provide a quick fix?
Copy code
No matching signature for operator >= for argument types: TIMESTAMP, DATETIME. Supported signature: ANY >= ANY at [27:9]
f
do you see the full query that it's trying? does the view queries link work?
sounds like that comparison operator that is expecting the same types on both sides, but one is a timestamp, the other is a datetime - so it doesn't know how to compare them
f
Yes, you need to cast your date columns to DATETIME in your queries.
w
thanks, the solution that worked for me was to use
DATETIME(timestamp) AS timestamp
in the source queries
f
👍