Can I retrieve filename for external table data in BigQuery? -


looking implement simple datastore departmental team manage load of excel/csv files. them prepare files , drop them in csv format gcs bucket , point external bq table @ (that works great).

however, if run query , see data , want find data has been pulled from, how can find out (assuming there no contextual clues in filename) file contains row(s) in question?

you can use _file_name pseudo column @ file row belongs external tables. note pseudo column works external tables. example:

bq query --external_table_definition=externaltable::avro=gs://mybucket/f* 'select _file_name f externaltable' 

Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -