简体   繁体   中英

Bigquery insert into table select command cost

I'm trying to understand Google Bigquery pricing. I read in batch load document that load, export, copy table is free which uses shared pool. However, I'm bit confused about pricing of below sub queries in ELT jobs or UDF's. I'm thinking this will incur cost as we are reading from table.

INSERT dataset.targetTable (col1, col2, col3)
SELECT col1, col2, col3
FROM dataset.sourceTable

Reading from external table having location in google storage bucket in same region will also incur cost?

INSERT dataset.targetTable (col1, col2, col3)
SELECT col1, col2, col3
FROM dataset.external_table

If above external table query incur cost, then best option would be using load command to load data into persistent table in BigQuery where possible instead of reading from an external table?

Thanks.

As mentioned by @Samuel, querying from external tables and its storage incurs cost if the external table is stored in Cloud Storage. For external tables in Google Cloud Storage, the cost are at $1.1 per TB and the first 300 TB are free . And Batch Loading is free . But if you are looking for streaming inserts, then it will incur cost. UDF also incurs cost. For your requirement, in ELT, it will incur cost and if you opt for batch loading then it will be free of cost. For more information, you can check this document .

Posting the answer as community wiki for the benefit of the community that might encounter this use case in the future.

Feel free to edit this answer for additional information.

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM