문제

I'm receiving this error when querying a view:

A view from this query references an old version of a table that might be incompatible. Please delete and re-create [myDataset.myTestView].

I created the view yesterday, and I'm certain that the table structure has not changed, ie no new columns, no columns were deleted and so on. However, the table was actually dropped and re-created nightly. Is this the cause of my problem?

How should/can I overcome this?

도움이 되었습니까?

해결책

BigQuery saves the internal name of your table in the view. When you delete a table and recreate it, the internal name changes, even if the external name is the same. Note that this is deliberate, so that you don't actually refer to the wrong table, or a table that has a different schema.

If you delete a table that is referenced in a view, you will need to update the view to point at the table. An empty patch operation should suffice, however.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top