I want the first column of the data which is present in a text file delimited by space. Is there any possible way to retrieve the column without including the whole text file as a table and filtering from that table?
You can use this command line
bq --location=US load \
--source_format=CSV \
--field_delimiter=" " \
--ignore_unknown_values \
<PROJECT_ID>:<DATASET>.<TABLE_NAME> \
./data.txt \
name:STRING
You can change the file name, and the location. It's mandatory to set the schema in the command line to skip the other column in the autodetect mechanism.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.