Database Reference
In-Depth Information
job in one project but writing tables in another one—but you must have
write access to anything you are modifying. Likewise, you must have read
access to anything you are reading. If you are a member of the project's
ACL, you may have rights conferred via the default ACL inherited from the
project, but if the dataset ACL has been customized, you may not. For more
information about ACLs and access rights, see the “Datasets” section earlier
in this chapter.
BigQuery Billing and Quotas
BigQuery users are currently charged for two things: storage and queries.
Both are proportional to data size. Storage costs can be incurred even if
you're not actively using BigQuery; processing costs get incurred only when
you actually run queries. The cost models are described in more detail
next; although this topic does not mention prices because these are subject
to change. Up-to-date information about BigQuery pricing is available at
https://developers.google.com/bigquery/pricing .
Storage Costs
Storage is measured in the number of bytes stored in all your tables
multiplied by the amount of time the tables are live. The price for storage is
quoted in terabytes (for the pedantic, this is actually tebibytes, or 240 bytes)
per month. If you create a table that is 3 TB, and that table is around for 2
days before you delete it, you'll be charged for 1/5 of a TB-month [3 TB *
2 days / (30 days/month)]. If you load a big file but it fails, you will not be
charged for the failed load. You are only charged for data stored in BigQuery,
not for jobs that store data.
If you have a 10 MB CSV file and you load it into BigQuery, how much
do you actually get charged for? The answer depends on the type of data
you're loading. Numeric data types ( FLOAT , INTEGER , and TIMESTAMP ) are
charged at 8 bytes per value. String ( STRING ) values are charged at the
length of the UTF8-encoded string plus 2. (The 2 bytes at the end are for
null-termination.) BOOLEAN values are charged at one byte per value. Null
values, regardless of type, are not charged at all. You can see how many bytes
were loaded by looking at the load statistics of a successful load job.
$ JOB_ID=job_$(date +"%s")
$ echo 1,1.0,foo > temp.csv
Search WWH ::




Custom Search