sqlgoogle-bigquerytableau-prep

Tableau Custom SQL Returns None from Big Query Table


Has anyone else experienced this issue?

I have a query:

SELECT * FROM `table-in-big-query` AS t1
INNER JOIN ( SELECT unique_Field, MAX(Upload_Datetime) AS latest_Upload_Datetime FROM `table-in-big-query` GROUP BY unique_Field)
AS t2 ON (t1.unique_Field= t2.unique_Field AND t1.Upload_Datetime = t2.latest_Upload_Datetime)

This returns the most recent rows of uploaded data for the unique_Field.

When I run this in On Tableau Online in Tableaus Custom SQL Query I get now Rows in the Response. enter image description here

I also checked it in the Tableau Prep Builder Application just to make sure it wasn't Tableau Online..

I have checked if the connection works by just running

SELECT * from `table-in-big-query`

And it does so I'm not sure where the Mismatch is...


Solution

  • Thank you to nbk for providing a solution.

    I do not have an answer as to why this works but the previous option didn't.

    The solution used was:

    SELECT * FROM (SELECT *, ROW_NUMBER() OVER(PARTITION BY unique_FieldORDER BY Upload_Datetime DESC)
    AS temp_row_number
    from `table-in-big-query` )
    WHERE temp_row_number = 1