Database Reference
In-Depth Information
presented in the examples, it is convenient to copy them into the editor and
modify them. Some of the examples refer to additional options available
when running queries. Many of these options can be controlled in the
advanced options panel opened by clicking Enable Options. These options
will be covered in Chapter 7.
Loading Data
BigQuery only permits loading data into projects that have billing enabled.
If you have not set up billing, you can skip this section. If you have enabled
billing try the commands in this section to verify that billing is correctly set
up for your project.
First, you need to create a dataset in your project. Again, open up the project
menu by clicking the icon next to the project title. Select the option Create
new dataset. You see a dialog asking only for the name of the dataset;
enter reference and click OK. Under the project title you can see an entry
for reference appear. Hovering over this entry displays two icons, a plus
and a drop-down arrow. Clicking the drop-down icon displays a menu for
managing the dataset. Now you want to create a table, so select Create new
table. The plus icon is a shortcut for creating a table. This launches the Table
Creation Wizard. Follow these steps to complete the wizard:
1. Specify the table to be created ( Figure 3.7 ). Set the table name to
zip_codes .
2. Set the source location for the data ( Figure 3.8 ). As part of the
supporting material on this topic's website, you can use a file containing
ZIP code information made available in Google Cloud Storage. To use
this data select the Google Storage option, and set the location to
gs://bigquery-e2e/data/zip_code_data.csv .
3. Describe the data contained in the file ( Figure 3.9 ). This is a string
describing the fields present in the data. The string is somewhat long, so
it is best copied from the download materials for this chapter. Just look
for Zip codes schema in queries.txt . Be sure not to submit at this
point because there is one advanced option that still needs to be
specified. Click Next to see these options.
4. Indicate that the data has a header row ( Figure 3.10 ) . Set Header Rows
to Skip to 1. Now click Submit on the wizard.
 
 
 
 
Search WWH ::




Custom Search