3 Replies Latest reply on Nov 3, 2017 11:39 AM by Tom W

    Tableau and BigQuery Errors

    Anthony Hurtado

      So I'm trying to connect BQ with Tableau. I have a connection, but whenever I try to update the connection or use certain fields an error happens. I've reached out to Tableau support and this is what they said:

      "As you suspected, this is indeed an issue with the nested queries. Basically, BigQuery doesn't allow processing of nested queries. As such, we will need to flatten the query before connecting."

      Can someone walk me through this? I've googled and read a bunch of articles, but I'm as confused as ever.

      Google says they flatten everything automatically, https://cloud.google.com/bigquery/docs/legacy-nested-repeated#flatten, but clearly it's not happening?

      I am not a technical person, but would appreciate any and all help. I want to use tableau as we already have a license and Data Studio isn't working too well.



      Here is what i did:


      Step 1) Connect data source, choose Google Bigquery. Enter credentials

      Step 2) On Data Source tab select the desired data set

      Step 3) Select Table

      Step 4) Hit Update Now

      result: Unrecognized name: event_dim.date at [1:37]

      tableau says that the problem is with the "." in between dim and date. I said that's there because it's a repeated record. They then responded with the quote I originally listed.

      If I run it in Legacy SQL, the error changes to: Cannot output multiple independently repeated fields at the same time. Found event_dim_value_in_usd and user_dim_user_properties_key

        • 1. Re: Tableau and BigQuery Errors
          Tom W

          Please provide your query.

          • 2. Re: Tableau and BigQuery Errors
            Anthony Hurtado

            I did not write one out.  I simply linked the dataset to my tableau workbook and then hit update now and then the posted errors showed up.  Steps 1-4 is all that I did.  I did not write a custom query (which is what i'll likely need to do either in a view on BigQuery and then reference that in tableau) or in tableau with its own custom sql query.

            • 3. Re: Tableau and BigQuery Errors
              Tom W

              You should unmark my previous answer as correct!


              I'm not really familiar with the BigQuery platform, but it does sound like you'll need a custom query on the Tableau side or the BigQuery side. In terms of getting help writing this, it's really hard to give you specific advice without access to that same dataset myself. I wouldn't know where to start in terms of advising you on query structure etc as I don't know what your schema sounds like.


              You might also find some helpful information on this page with regards to nested data - Google BigQuery