m-lab / etl-gardener

Gardener provides services for maintaining and reprocessing mlab data.
Apache License 2.0
13 stars 5 forks source link

Pass-through views cannot access materialized tables ndt.ndt7 #317

Closed stephen-soltesz closed 3 years ago

stephen-soltesz commented 4 years ago

When I try to create a pass-through view to mlab-oti.ndt.ndt7 from measurement-lab, I get an error that Cannot query over table 'mlab-oti.ndt.ndt7' without a filter over column(s) 'date' that can be used for partition elimination

I suspect that a new feature on the materialized table is incompatible with the pass-through strategy.

stephen-soltesz commented 4 years ago

For reference, the view query I'm attempting is:

SELECT * from `mlab-oti.ndt.ndt7`

This cannot be saved as a view b/c:

Cannot save invalid queries as views
stephen-soltesz commented 4 years ago

I was able to create the pass-through view from the command line using:

$ bq mk --nouse_legacy_sql --view='select * from `mlab-oti.ndt.ndt7`' measurement-lab:ndt.ndt7 

I've manually added a dataset authorized view ACL for the same; this should make the view publicly accessible.