GoogleCloudPlatform / bigquery-geo-viz

Visualize Google BigQuery geospatial data using Google Maps Platform APIs
https://bigquerygeoviz.appspot.com/
Apache License 2.0
112 stars 41 forks source link

Viz screen showing 0 results #5

Closed jjayadeep06 closed 5 years ago

jjayadeep06 commented 5 years ago

Hi,

When I am trying to run the BQ GIS query as mentioned here https://github.com/GoogleCloudPlatform/training-data-analyst/blob/master/blogs/bqml/taxifare_bqml.ipynb I am getting 0 results in the UI. I believe that this issue is happening because we are converting the pickup and dropoff location to Text as shown in the below lines

ST_AsText(ST_SnapToGrid(pickup, params.RES)) AS pickup_gridpt,
    ST_AsText(ST_SnapToGrid(dropoff, params.RES)) AS dropoff_gridpt

If I remove the type cast the UI returns the correct row count but then it prohibits from applying the grouping function.

When I try to to apply the casting as below it agains returns 0 rows

SELECT
  ST_AsText(dropoff_gridpt),
  COUNT(error) AS numpts,
  -- mean absolute percent error
  AVG(100 * error) AS MAPE
FROM predictions
GROUP BY ST_AsText(dropoff_gridpt)
HAVING numpts > 100
donmccurdy commented 5 years ago

Do you also get 0 results for this query in the normal BigQuery query editor? If there's something going wrong that is specific to this tool I can look into it, but I can't provide support debugging a query here sorry.

donmccurdy commented 5 years ago

Closing, as I can't help with this without more information sorry. See https://github.com/GoogleCloudPlatform/bigquery-geo-viz/issues/6 for a possibly related issue.