/*
 * Copyright 2015 Google Inc. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

/**
 * A client to Google Cloud BigQuery.
 *
 * <p>A simple usage example:
 * <pre>{@code
 * //TODO(mziccard): add code example
 * }</pre>
 *
 * @see <a href="https://cloud.google.com/bigquery/">Google Cloud BigQuery</a>
 */
package com.google.gcloud.bigquery;

@@ -695,16 +695,17 @@
  * %3Cpre%3E
+ 
 %7B@code%0A 
@@ -710,46 +710,904 @@
 %0A * 
-//TODO(mziccard): add code example%0A * 
+BigQuery bigquery = BigQueryOptions.defaultInstance().service();%0A * TableId tableId = TableId.of(%22dataset%22, %22table%22);%0A * BaseTableInfo info = bigquery.getTable(tableId);%0A * if (info == null) %7B%0A *   System.out.println(%22Creating table %22 + tableId);%0A *   Field integerField = Field.of(%22fieldName%22, Field.Type.integer());%0A *   bigquery.create(TableInfo.of(tableId, Schema.of(integerField)));%0A * %7D else %7B%0A *   System.out.println(%22Loading data into table %22 + tableId);%0A *   LoadJobInfo loadJob = LoadJobInfo.of(tableId, %22gs://bucket/path%22);%0A *   loadJob = bigquery.create(loadJob);%0A *   while (loadJob.status().state() != JobStatus.State.DONE) %7B%0A *     Thread.sleep(1000L);%0A *     loadJob = bigquery.getJob(loadJob.jobId());%0A *   %7D%0A *   if (loadJob.status().error() != null) %7B%0A *     System.out.println(%22Job completed with errors%22);%0A *   %7D else %7B%0A *     System.out.println(%22Job succeeded%22);%0A *   %7D%0A * %7D
 %7D%3C/p

Add example to BigQuery package-info