0
votes

I have a data of around 150 GB data and I want to store that in bigquery using DML statements.

Here is the pricing model for that.

https://cloud.google.com/bigquery/pricing#dml

According to them they will charge for deleting the table via DML.

If I create a table with retention period will I be charged for that? considering I will always insert data. I am not bothering about cost for inserting data.

2

2 Answers

2
votes

Based on the DML Specifications, Google will charge for the deletion of rows if done using DML statement (or using DELETE command in their SQL). The reason being: BigQuery will have to scan rows to delete them (like DELETE FROM mydataset.mytable WHERE id=xxx;, etc.), so you will have to pay for the number of bytes scanned before deleting the resulting rows.

You can always delete your entire table from your dataset for free by either using BigQuery UI or bq command line utility.

Also, you will be charged for the storage costs in BigQuery (irrespective of usage). Meaning: you will pay for the number of bytes your data is occupying on Google disks.

0
votes
  • BigQuery charges for deleting from a table, not deleting a table. Executing a DROP TABLE statement is free.
  • Creating tables is free, unless you create a table from the result of a table, in which case see query pricing to calculate your costs.
  • The cost of storage is based on the number of bytes stored and how long you keep the data. See storage pricing for more details.