Repository: zeppelin
Updated Branches:
  refs/heads/branch-0.6 ce6e01d09 -> 6c9a89e67


BigQuery Interpreter for Apazhe Zeppelin[ZEPPELIN-1153]

### What is this PR for?
Google BigQuery is a popular no-ops datawarehouse. This commit will enable 
Apache Zeppelin users to perform BI and Analytics on their datasets in BigQuery.

### What type of PR is it?
Feature

### Todos
* Make bigquery interpreter appear in the interpreters section in the UI
* Build SQL completion
* Authorization of non-gcp

### What is the Jira issue?
https://issues.apache.org/jira/browse/ZEPPELIN-1153

### How should this be tested?
copy conf/zeppelin-site.xml.template to conf/zeppelin-site.xml
Add org.apache.zeppelin.bigquery.bigQueryInterpreter to property 
zeppelin.interpreters in zeppelin-site.xml
Start Zeppelin
Add BigQuery Interpreter with your project ID
Create new note with %bsql.sql and run your SQL against public datasets in 
bigquery.

### Screenshots (if appropriate)
![screenshot from 2016-07-12 14 27 
30](https://cloud.githubusercontent.com/assets/4242273/16785302/31b104e2-4842-11e6-87c0-b79763dd85c0.png)

### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No

Author: Babu Prasad Elumalai <[email protected]>
Author: babupe <[email protected]>
Author: Alexander Bezzubov <[email protected]>

Closes #1170 from babupe/babupe-bigquery and squashes the following commits:

ffed801 [Babu Prasad Elumalai] pushing BQ Exception to logs and Interpreter 
error output
d3c2316 [babupe] Merge pull request #2 from bzz/babupe-add-auth-docs
64525b8 [Alexander Bezzubov] Fix typos in docs
03a777f [Alexander Bezzubov] add docs for BigQuery auth outside of GCE
fcab6b7 [babupe] Merge pull request #1 from bzz/babupe-final
6a95333 [Alexander Bezzubov] Rename Apach2.0 license for google's code to 
adhere naming conventions
7d4f40b [Alexander Bezzubov] Add exidentaly removed licenses due to merge 
conflict
3be1912 [Babu Prasad Elumalai] New changes
41e076e [Babu Prasad Elumalai] Fixed formatting with readme file
97874a4 [Babu Prasad Elumalai] Pushing cropped screenshots
64affbb [babupe] Added cropped interpreter screenshot
4a1d29c [Babu Prasad Elumalai] Removed unnecessary dependencies in pom.xml
e520b7b [Babu Prasad Elumalai] Exclude constants.json file for rat plugin since 
its static config file
69cb724 [Babu Prasad Elumalai] Fixed license header and added manual unit test 
documentation
bbf26cc [Babu Prasad Elumalai] Added path and specific wording
4a3153f [Babu Prasad Elumalai] removed bad package from import
d0c8e01 [Babu Prasad Elumalai] Added technical description to bigquery.md
b6d181c [Babu Prasad Elumalai] Trying to add screenshot in README
569757f [Babu Prasad Elumalai] Incorporated feedback
764385c [Babu Prasad Elumalai] Interpreter modification, License, doc changes
d85abd2 [Babu Prasad Elumalai] Modified code and license
17f6d89 [Babu Prasad Elumalai] ZEPPELIN-1153 comments committed
8fa647b [Babu Prasad Elumalai] BigQuery Interpreter for Apazhe Zeppelin
22e3487 [babupe] Update LICENSE
e88b017 [babupe] Created a new license file
d90e10f [babupe] Removed BigQuery from notice
aa52553 [Babu Prasad Elumalai] Merge branch 'master' of 
https://github.com/apache/zeppelin
ae096d2 [Babu Prasad Elumalai] License changes
20962d2 [Babu Prasad Elumalai] Pushing license changes
3d5f8e7 [Babu Prasad Elumalai] Modified license header
5a2e674 [Babu Prasad Elumalai] Added license info for Jackson library and added 
BQ API source
4db74c1 [Babu Prasad Elumalai] Adding license stuff
31c373f [Babu Prasad Elumalai] Fixed formatting with readme file
287744c [Babu Prasad Elumalai] Merge branch 'babupe-bigquery' of 
https://github.com/babupe/zeppelin into babupe-bigquery
f318b20 [Babu Prasad Elumalai] Pushing cropped screenshots
17fd4e8 [babupe] Added cropped interpreter screenshot
f872aa0 [Babu Prasad Elumalai] Removed unnecessary dependencies in pom.xml
5983e36 [Babu Prasad Elumalai] Exclude constants.json file for rat plugin since 
its static config file
11e88dc [Babu Prasad Elumalai] Replaced license header with formatting
4b82abd [Babu Prasad Elumalai] Fixed license header and added manual unit test 
documentation
87f5efe [Babu Prasad Elumalai] Added path and specific wording
6132d78 [Babu Prasad Elumalai] Fixing License and skipping failing tests
2254a49 [Babu Prasad Elumalai] removed bad package from import
73e3f6d [Babu Prasad Elumalai] Added technical description to bigquery.md
089820b [Babu Prasad Elumalai] Trying to add screenshot in README
a00b48e [Babu Prasad Elumalai] Incorporated feedback
17846f1 [Babu Prasad Elumalai] Interpreter modification, License, doc changes
50c41fc [Babu Prasad Elumalai] Modified code and license
75d8ee6 [Babu Prasad Elumalai] ZEPPELIN-1153 comments committed
2a2bedc [Babu Prasad Elumalai] BigQuery Interpreter for Apazhe Zeppelin

(cherry picked from commit 57c264da2d9d33452ccf9f41fb64788c911339f8)
Signed-off-by: Alexander Bezzubov <[email protected]>


Project: http://git-wip-us.apache.org/repos/asf/zeppelin/repo
Commit: http://git-wip-us.apache.org/repos/asf/zeppelin/commit/6c9a89e6
Tree: http://git-wip-us.apache.org/repos/asf/zeppelin/tree/6c9a89e6
Diff: http://git-wip-us.apache.org/repos/asf/zeppelin/diff/6c9a89e6

Branch: refs/heads/branch-0.6
Commit: 6c9a89e6786378035f1f41d113269ff4194f1118
Parents: ce6e01d
Author: Babu Prasad Elumalai <[email protected]>
Authored: Sat Jul 30 03:41:10 2016 +0000
Committer: Alexander Bezzubov <[email protected]>
Committed: Sun Jul 31 01:15:09 2016 +0900

----------------------------------------------------------------------
 LICENSE                                         |   3 +-
 NOTICE                                          |   1 -
 bigquery/README.md                              | 109 ++++++
 bigquery/pom.xml                                | 177 ++++++++++
 .../zeppelin/bigquery/BigQueryInterpreter.java  | 338 +++++++++++++++++++
 bigquery/src/main/resources/constants.json      |   5 +
 .../src/main/resources/interpreter-setting.json |  27 ++
 .../bigquery/BigQueryInterpreterTest.java       | 118 +++++++
 docs/_includes/themes/zeppelin/_navigation.html |   3 +-
 .../zeppelin/img/docs-img/bigqueryZeppelin.png  | Bin 0 -> 145298 bytes
 docs/interpreter/bigquery.md                    | 113 +++++++
 licenses/LICENSE-bigquery-interpreter-google    | 176 ++++++++++
 pom.xml                                         |   2 +
 zeppelin-distribution/src/bin_license/LICENSE   |  16 +-
 14 files changed, 1082 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/6c9a89e6/LICENSE
----------------------------------------------------------------------
diff --git a/LICENSE b/LICENSE
index 71d3c52..8b209c5 100644
--- a/LICENSE
+++ b/LICENSE
@@ -251,6 +251,7 @@ The following components are provided under the Apache 
License. See project link
 The text of each license is also included at 
licenses/LICENSE-[project]-[version].txt.
 
     (Apache 2.0) Bootstrap v3.0.2 (http://getbootstrap.com/) - 
https://github.com/twbs/bootstrap/blob/v3.0.2/LICENSE
+    (Apache 2.0) Software under ./bigquery/*  was developed at Google 
(http://www.google.com/). Licensed under the Apache v2.0 License.
 
 ========================================================================
 BSD 3-Clause licenses
@@ -270,4 +271,4 @@ BSD 2-Clause licenses
 The following components are provided under the BSD 3-Clause license.  See 
file headers and project links for details.
 
   (BSD 2 Clause) portions of SQLLine (http://sqlline.sourceforge.net/) - 
http://sqlline.sourceforge.net/#license
-   jdbc/src/main/java/org/apache/zeppelin/jdbc/SqlCompleter.java
\ No newline at end of file
+   jdbc/src/main/java/org/apache/zeppelin/jdbc/SqlCompleter.java

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/6c9a89e6/NOTICE
----------------------------------------------------------------------
diff --git a/NOTICE b/NOTICE
index bfbb627..66e4ca0 100644
--- a/NOTICE
+++ b/NOTICE
@@ -4,5 +4,4 @@ Copyright 2015 - 2016 The Apache Software Foundation
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).
 
-
 Portions of this software were developed at NFLabs, Inc. 
(http://www.nflabs.com)

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/6c9a89e6/bigquery/README.md
----------------------------------------------------------------------
diff --git a/bigquery/README.md b/bigquery/README.md
new file mode 100644
index 0000000..fc09763
--- /dev/null
+++ b/bigquery/README.md
@@ -0,0 +1,109 @@
+# Overview
+BigQuery interpreter for Apache Zeppelin
+
+# Pre requisities
+You can follow the instructions at [Apache Zeppelin on 
Dataproc](https://github.com/GoogleCloudPlatform/dataproc-initialization-actions/blob/master/apache-zeppelin/README.MD)
 to bring up Zeppelin on Google dataproc. 
+You could also install and bring up Zeppelin on Google compute Engine.
+
+# Unit Tests
+BigQuery Unit tests are excluded as these tests depend on the BigQuery 
external service. This is because BigQuery does not have a local mock at this 
point.
+
+If you like to run these tests manually, please follow the following steps:
+* [Create a new project](https://support.google.com/cloud/answer/6251787?hl=en)
+* [Create a Google Compute Engine 
instance](https://cloud.google.com/compute/docs/instances/create-start-instance)
+* Copy the project ID that you created and add it to the property "projectId" 
in `resources/constants.json`
+* Run the command mvn <options> -Dbigquery.text.exclude='' test -pl bigquery 
-am
+
+
+# Interpreter Configuration
+
+Configure the following properties during Interpreter creation.
+
+<table class="table-configuration">
+  <tr>
+    <th>Name</th>
+    <th>Default Value</th>
+    <th>Description</th>
+  </tr>
+  <tr>
+    <td>zeppelin.bigquery.project_id</td>
+    <td>  </td>
+    <td>Google Project Id</td>
+  </tr>
+  <tr>
+    <td>zeppelin.bigquery.wait_time</td>
+    <td>5000</td>
+    <td>Query Timeout in Milliseconds</td>
+  </tr>
+  <tr>
+    <td>zeppelin.bigquery.max_no_of_rows</td>
+    <td>100000</td>
+    <td>Max result set size</td>
+  </tr>
+</table>
+
+# Connection
+The Interpreter opens a connection with the BigQuery Service using the 
supplied Google project ID and the compute environment variables.
+
+# Google BigQuery API Javadoc
+[API 
Javadocs](https://developers.google.com/resources/api-libraries/documentation/bigquery/v2/java/latest/)
+[Source] 
(http://central.maven.org/maven2/com/google/apis/google-api-services-bigquery/v2-rev265-1.21.0/google-api-services-bigquery-v2-rev265-1.21.0-sources.jar)
+
+We have used the curated veneer version of the Java APIs versus [Idiomatic 
Java client] 
(https://github.com/GoogleCloudPlatform/gcloud-java/tree/master/gcloud-java-bigquery)
 to build the interpreter. This is mainly for usability reasons.
+
+# Enabling the BigQuery Interpreter
+
+In a notebook, to enable the **BigQuery** interpreter, click the **Gear** icon 
and select **bigquery**.
+
+# Using the BigQuery Interpreter
+
+In a paragraph, use `%bigquery.sql` to select the **BigQuery** interpreter and 
then input SQL statements against your datasets stored in BigQuery.
+You can use [BigQuery SQL 
Reference](https://cloud.google.com/bigquery/query-reference) to build your own 
SQL.
+
+For Example, SQL to query for top 10 departure delays across airports using 
the flights public dataset
+
+```bash
+%bigquery.sql
+SELECT departure_airport,count(case when departure_delay>0 then 1 else 0 end) 
as no_of_delays
+FROM [bigquery-samples:airline_ontime_data.flights]
+group by departure_airport
+order by 2 desc
+limit 10
+```
+
+Another Example, SQL to query for most commonly used java packages from the 
github data hosted in BigQuery
+
+```bash
+%bigquery.sql
+SELECT
+  package,
+  COUNT(*) count
+FROM (
+  SELECT
+    REGEXP_EXTRACT(line, r' ([a-z0-9\._]*)\.') package,
+    id
+  FROM (
+    SELECT
+      SPLIT(content, '\n') line,
+      id
+    FROM
+      [bigquery-public-data:github_repos.sample_contents]
+    WHERE
+      content CONTAINS 'import'
+      AND sample_path LIKE '%.java'
+    HAVING
+      LEFT(line, 6)='import' )
+  GROUP BY
+    package,
+    id )
+GROUP BY
+  1
+ORDER BY
+  count DESC
+LIMIT
+  40
+```
+
+# Sample Screenshot
+
+![Zeppelin 
BigQuery](https://cloud.githubusercontent.com/assets/10060731/16938817/b9213ea0-4db6-11e6-8c3b-8149a0bdf874.png)

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/6c9a89e6/bigquery/pom.xml
----------------------------------------------------------------------
diff --git a/bigquery/pom.xml b/bigquery/pom.xml
new file mode 100644
index 0000000..eb3f0fd
--- /dev/null
+++ b/bigquery/pom.xml
@@ -0,0 +1,177 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You 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.
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";>
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <artifactId>zeppelin</artifactId>
+    <groupId>org.apache.zeppelin</groupId>
+    <version>0.7.0-SNAPSHOT</version>
+  </parent>
+
+  <groupId>org.apache.zeppelin</groupId>
+  <artifactId>zeppelin-bigquery</artifactId>
+  <packaging>jar</packaging>
+  <version>0.7.0-SNAPSHOT</version>
+  <name>Zeppelin: BigQuery interpreter</name>
+  <url>http://www.apache.org</url>
+
+  <dependencies>
+
+    <dependency>
+        <groupId>com.google.apis</groupId>
+        <artifactId>google-api-services-bigquery</artifactId>
+        <version>v2-rev265-1.21.0</version>
+    </dependency>
+    <dependency>
+        <groupId>com.google.oauth-client</groupId>
+        <artifactId>google-oauth-client</artifactId>
+        <version>${project.oauth.version}</version>
+    </dependency>
+    <dependency>
+        <groupId>com.google.http-client</groupId>
+        <artifactId>google-http-client-jackson2</artifactId>
+        <version>${project.http.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>com.google.oauth-client</groupId>
+      <artifactId>google-oauth-client-jetty</artifactId>
+      <version>${project.oauth.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>com.google.code.gson</groupId>
+      <artifactId>gson</artifactId>
+      <version>2.6</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.zeppelin</groupId>
+      <artifactId>zeppelin-interpreter</artifactId>
+      <version>${project.version}</version>
+      <scope>provided</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-api</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-log4j12</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+
+  <properties>
+    <project.http.version>1.21.0</project.http.version>
+    <project.oauth.version>1.21.0</project.oauth.version>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    
<bigquery.test.exclude>**/BigQueryInterpreterTest.java</bigquery.test.exclude>
+  </properties>
+
+  <build>
+    <plugins>
+      <plugin>
+        <artifactId>maven-enforcer-plugin</artifactId>
+        <version>1.3.1</version>
+        <executions>
+          <execution>
+            <id>enforce</id>
+            <phase>none</phase>
+          </execution>
+        </executions>
+      </plugin>
+
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <configuration>
+          <excludes>
+            <exclude>${bigquery.test.exclude}</exclude>
+          </excludes>
+        </configuration>
+      </plugin>
+
+      <plugin>
+        <artifactId>maven-dependency-plugin</artifactId>
+        <version>2.8</version>
+        <executions>
+          <execution>
+            <id>copy-dependencies</id>
+            <phase>package</phase>
+            <goals>
+              <goal>copy-dependencies</goal>
+            </goals>
+            <configuration>
+              
<outputDirectory>${project.build.directory}/../../interpreter/bqsql</outputDirectory>
+              <overWriteReleases>false</overWriteReleases>
+              <overWriteSnapshots>false</overWriteSnapshots>
+              <overWriteIfNewer>true</overWriteIfNewer>
+              <includeScope>runtime</includeScope>
+            </configuration>
+          </execution>
+          <execution>
+            <id>copy-artifact</id>
+            <phase>package</phase>
+            <goals>
+              <goal>copy</goal>
+            </goals>
+            <configuration>
+              
<outputDirectory>${project.build.directory}/../../interpreter/bqsql</outputDirectory>
+              <overWriteReleases>false</overWriteReleases>
+              <overWriteSnapshots>false</overWriteSnapshots>
+              <overWriteIfNewer>true</overWriteIfNewer>
+              <includeScope>runtime</includeScope>
+              <artifactItems>
+                <artifactItem>
+                  <groupId>${project.groupId}</groupId>
+                  <artifactId>${project.artifactId}</artifactId>
+                  <version>${project.version}</version>
+                  <type>${project.packaging}</type>
+                </artifactItem>
+              </artifactItems>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+            <artifactId>maven-assembly-plugin</artifactId>
+            <configuration>
+                <archive>
+                    <manifest>
+                        <mainClass>
+                               
org.apache.zeppelin.bigquery.BigQueryInterpreter                            
+                        </mainClass>
+                    </manifest>
+                </archive>
+                <descriptorRefs>
+                    <descriptorRef>jar-with-dependencies</descriptorRef>
+                </descriptorRefs>
+            </configuration>
+        </plugin>
+    </plugins>
+  </build>
+</project>

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/6c9a89e6/bigquery/src/main/java/org/apache/zeppelin/bigquery/BigQueryInterpreter.java
----------------------------------------------------------------------
diff --git 
a/bigquery/src/main/java/org/apache/zeppelin/bigquery/BigQueryInterpreter.java 
b/bigquery/src/main/java/org/apache/zeppelin/bigquery/BigQueryInterpreter.java
new file mode 100644
index 0000000..33e1960
--- /dev/null
+++ 
b/bigquery/src/main/java/org/apache/zeppelin/bigquery/BigQueryInterpreter.java
@@ -0,0 +1,338 @@
+/*
+* Copyright 2016 Google Inc.
+*
+* 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.
+*/
+
+package org.apache.zeppelin.bigquery;
+
+
+import static org.apache.commons.lang.StringUtils.containsIgnoreCase;
+
+import com.google.api.client.http.HttpTransport;
+import com.google.api.client.http.javanet.NetHttpTransport;
+import com.google.api.client.json.JsonFactory;
+import com.google.api.client.googleapis.auth.oauth2.GoogleCredential;
+import com.google.api.client.json.jackson2.JacksonFactory;
+
+import com.google.api.services.bigquery.Bigquery;
+import com.google.api.services.bigquery.BigqueryScopes;
+import com.google.api.client.json.GenericJson;
+import com.google.api.services.bigquery.Bigquery.Datasets;
+import com.google.api.services.bigquery.BigqueryRequest;
+import com.google.api.services.bigquery.model.DatasetList;
+import com.google.api.services.bigquery.model.Job;
+import com.google.api.services.bigquery.model.TableCell;
+import com.google.api.services.bigquery.model.TableFieldSchema;
+import com.google.api.services.bigquery.model.TableRow;
+import com.google.api.services.bigquery.model.TableSchema;
+import com.google.api.services.bigquery.Bigquery.Jobs.GetQueryResults;
+import com.google.api.services.bigquery.model.GetQueryResultsResponse;
+import com.google.api.services.bigquery.model.QueryRequest;
+import com.google.api.services.bigquery.model.QueryResponse;
+import com.google.api.services.bigquery.model.JobCancelResponse;
+import com.google.gson.Gson;
+
+import java.io.IOException;
+import java.util.Collection;
+import java.sql.ResultSet;
+import java.sql.ResultSetMetaData;
+import java.sql.SQLException;
+import java.util.Properties;
+import java.util.Set;
+
+import org.apache.zeppelin.interpreter.Interpreter;
+import org.apache.zeppelin.interpreter.InterpreterContext;
+import org.apache.zeppelin.interpreter.InterpreterPropertyBuilder;
+import org.apache.zeppelin.interpreter.InterpreterResult;
+import org.apache.zeppelin.interpreter.InterpreterResult.Code;
+import org.apache.zeppelin.interpreter.thrift.InterpreterCompletion;
+import org.apache.zeppelin.scheduler.Scheduler;
+import org.apache.zeppelin.scheduler.SchedulerFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.google.common.base.Function;
+import com.google.common.collect.Lists;
+import com.google.common.collect.Sets;
+import com.google.common.collect.Sets.SetView;
+import java.io.PrintStream;
+import java.io.Reader;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.NoSuchElementException;
+
+/**
+ * BigQuery interpreter for Zeppelin.
+ * 
+ * <ul>
+ * <li>{@code zeppelin.bigquery.project_id} - Project ID in GCP</li>
+ * <li>{@code zeppelin.bigquery.wait_time} - Query Timeout in ms</li>
+ * <li>{@code zeppelin.bigquery.max_no_of_rows} - Max Result size</li>
+ * </ul>
+ * 
+ * <p>
+ * How to use: <br/>
+ * {@code %bigquery.sql<br/>
+ * {@code
+ *  SELECT departure_airport,count(case when departure_delay>0 then 1 else 0 
end) as no_of_delays 
+ *  FROM [bigquery-samples:airline_ontime_data.flights] 
+ *  group by departure_airport 
+ *  order by 2 desc 
+ *  limit 10
+ * }
+ * </p>
+ * 
+ */
+
+
+public class BigQueryInterpreter extends Interpreter {
+
+  private Logger logger = LoggerFactory.getLogger(BigQueryInterpreter.class);
+  private static final char NEWLINE = '\n';
+  private static final char TAB = '\t';
+  private static Bigquery service = null;
+  //Mutex created to create the singleton in thread-safe fashion.
+  private static Object serviceLock = new Object();
+
+  static final String PROJECT_ID = "zeppelin.bigquery.project_id";
+  static final String WAIT_TIME = "zeppelin.bigquery.wait_time";
+  static final String MAX_ROWS = "zeppelin.bigquery.max_no_of_rows";
+
+  private static String jobId = null;
+  private static String projectId = null;
+
+  private static final List NO_COMPLETION = new ArrayList<>();
+  private Exception exceptionOnConnect;
+
+  private static final Function<CharSequence, String> 
sequenceToStringTransformer =
+      new Function<CharSequence, String>() {
+      public String apply(CharSequence seq) {
+        return seq.toString();
+      }
+    };
+
+  public BigQueryInterpreter(Properties property) {
+    super(property);
+  }
+
+
+  //Function to return valid BigQuery Service
+  @Override
+  public void open() {
+    if (service == null) {
+      synchronized (serviceLock) {
+        if (service == null) {
+          try {
+            service = createAuthorizedClient();
+            exceptionOnConnect = null;
+            logger.info("Opened BigQuery SQL Connection");
+          } catch (IOException e) {
+            logger.error("Cannot open connection", e);
+            exceptionOnConnect = e;   
+            close();
+          }
+        }
+      }
+    }
+  }
+
+  //Function that Creates an authorized client to Google Bigquery.
+  private static Bigquery createAuthorizedClient() throws IOException {
+    HttpTransport transport = new NetHttpTransport();
+    JsonFactory jsonFactory = new JacksonFactory();
+    GoogleCredential credential =  
GoogleCredential.getApplicationDefault(transport, jsonFactory);
+
+    if (credential.createScopedRequired()) {
+      Collection<String> bigqueryScopes = BigqueryScopes.all();
+      credential = credential.createScoped(bigqueryScopes);
+    }
+
+    return new Bigquery.Builder(transport, jsonFactory, credential)
+        .setApplicationName("Zeppelin/1.0 (GPN:Apache Zeppelin;)").build();
+  }
+
+  //Function that generates and returns the schema and the rows as string
+  public static String printRows(final GetQueryResultsResponse response) {
+    StringBuilder msg = null;
+    msg = new StringBuilder();
+    try {
+      for (TableFieldSchema schem: response.getSchema().getFields()) {
+        msg.append(schem.getName());
+        msg.append(TAB);
+      }      
+      msg.append(NEWLINE);
+      for (TableRow row : response.getRows()) {
+        for (TableCell field : row.getF()) {
+          msg.append(field.getV().toString());
+          msg.append(TAB);
+        }
+        msg.append(NEWLINE);
+      }
+      return msg.toString();
+    } catch ( NullPointerException ex ) {
+      throw new NullPointerException("SQL Execution returned an error!");
+    }
+  }
+
+  //Function to poll a job for completion. Future use
+  public static Job pollJob(final Bigquery.Jobs.Get request, final long 
interval) 
+      throws IOException, InterruptedException {
+    Job job = request.execute();
+    while (!job.getStatus().getState().equals("DONE")) {
+      System.out.println("Job is " 
+          + job.getStatus().getState() 
+          + " waiting " + interval + " milliseconds...");
+      Thread.sleep(interval);
+      job = request.execute();
+    }
+    return job;
+  }
+
+  //Function to page through the results of an arbitrary bigQuery request
+  public static <T extends GenericJson> Iterator<T> getPages(
+      final BigqueryRequest<T> requestTemplate) {
+    class PageIterator implements Iterator<T> {
+      private BigqueryRequest<T> request;
+      private boolean hasNext = true;
+      public PageIterator(final BigqueryRequest<T> requestTemplate) {
+        this.request = requestTemplate;
+      }
+      public boolean hasNext() {
+        return hasNext;
+      }
+      public T next() {
+        if (!hasNext) {
+          throw new NoSuchElementException();
+        }
+        try {
+          T response = request.execute();
+          if (response.containsKey("pageToken")) {
+            request = request.set("pageToken", response.get("pageToken"));
+          } else {
+            hasNext = false;
+          }
+          return response;
+        } catch (IOException e) {
+          return null;
+        }
+      }
+
+      public void remove() {
+        this.next();
+      }
+    }
+
+    return new PageIterator(requestTemplate);
+  }
+  
+  //Function to call bigQuery to run SQL and return results to the Interpreter 
for output
+  private InterpreterResult executeSql(String sql) {
+    int counter = 0;
+    StringBuilder finalmessage = null;
+    finalmessage = new StringBuilder("%table ");
+    String projId = getProperty(PROJECT_ID);
+    long wTime = Long.parseLong(getProperty(WAIT_TIME));
+    long maxRows = Long.parseLong(getProperty(MAX_ROWS));
+    Iterator<GetQueryResultsResponse> pages;
+    try {
+      pages = run(sql, projId, wTime, maxRows);
+    } catch ( IOException ex ) {
+      logger.error(ex.getMessage());
+      return new InterpreterResult(Code.ERROR, ex.getMessage());
+    }
+    try {
+      while (pages.hasNext()) {
+        finalmessage.append(printRows(pages.next()));
+      }
+      return new InterpreterResult(Code.SUCCESS, finalmessage.toString());
+    } catch ( NullPointerException ex ) {
+      return new InterpreterResult(Code.ERROR, ex.getMessage());
+    }
+  }
+
+  //Function to run the SQL on bigQuery service
+  public static Iterator<GetQueryResultsResponse> run(final String 
queryString, 
+    final String projId, final long wTime, final long maxRows) 
+      throws IOException {
+    try {
+      QueryResponse query = service.jobs().query(
+          projId,
+          new 
QueryRequest().setTimeoutMs(wTime).setQuery(queryString).setMaxResults(maxRows))
+          .execute();
+      jobId = query.getJobReference().getJobId();
+      projectId = query.getJobReference().getProjectId();
+      GetQueryResults getRequest = service.jobs().getQueryResults(
+          projectId,
+          jobId);
+      return getPages(getRequest);
+    } catch (IOException ex) {
+      throw ex;
+    }
+  }
+
+  @Override
+  public void close() {
+
+    logger.info("Close bqsql connection!");
+
+    service = null;
+  }
+
+  @Override
+  public InterpreterResult interpret(String sql, InterpreterContext 
contextInterpreter) {
+    logger.info("Run SQL command '{}'", sql);
+    return executeSql(sql);
+  }
+
+  @Override
+  public Scheduler getScheduler() {
+    return SchedulerFactory.singleton().createOrGetFIFOScheduler(
+        BigQueryInterpreter.class.getName() + this.hashCode());
+  }
+
+  @Override
+  public FormType getFormType() {
+    return FormType.SIMPLE;
+  }
+
+  @Override
+  public int getProgress(InterpreterContext context) {
+    return 0;
+  }
+
+  @Override
+  public void cancel(InterpreterContext context) {
+
+    logger.info("Trying to Cancel current query statement.");
+
+    if (service != null && jobId != null && projectId != null) {
+      try {
+        Bigquery.Jobs.Cancel request = service.jobs().cancel(projectId, jobId);
+        JobCancelResponse response = request.execute();
+        jobId = null;
+        logger.info("Query Execution cancelled");
+      } catch (IOException ex) {
+        logger.error("Could not cancel the SQL execution");
+      }
+    } else {
+      logger.info("Query Execution was already cancelled");
+    }
+  }
+
+  @Override
+  public List<InterpreterCompletion> completion(String buf, int cursor) {
+    return NO_COMPLETION;
+  }
+}

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/6c9a89e6/bigquery/src/main/resources/constants.json
----------------------------------------------------------------------
diff --git a/bigquery/src/main/resources/constants.json 
b/bigquery/src/main/resources/constants.json
new file mode 100644
index 0000000..afd950e
--- /dev/null
+++ b/bigquery/src/main/resources/constants.json
@@ -0,0 +1,5 @@
+{
+    "projectId": "google.com:babupe-df-test",
+    "oneQuery": "select 1",
+    "wrongQuery": "select bad syntax"
+}

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/6c9a89e6/bigquery/src/main/resources/interpreter-setting.json
----------------------------------------------------------------------
diff --git a/bigquery/src/main/resources/interpreter-setting.json 
b/bigquery/src/main/resources/interpreter-setting.json
new file mode 100644
index 0000000..3e524ed
--- /dev/null
+++ b/bigquery/src/main/resources/interpreter-setting.json
@@ -0,0 +1,27 @@
+[
+  {
+    "group": "bigquery",
+    "name": "sql",
+    "className": "org.apache.zeppelin.bigquery.BigQueryInterpreter",
+    "properties": {
+      "zeppelin.bigquery.project_id": {
+        "envName": null,
+        "propertyName": "zeppelin.bigquery.project_id",
+        "defaultValue": " ",
+        "description": "Google Project ID"
+      },
+      "zeppelin.bigquery.wait_time": {
+        "envName": null,
+        "propertyName": "zeppelin.bigquery.wait_time",
+        "defaultValue": "5000",
+        "description": "Query timeout in Milliseconds"
+      },
+      "zeppelin.bigquery.max_no_of_rows": {
+        "envName": null,
+        "propertyName": "zeppelin.bigquery.max_no_of_rows",
+        "defaultValue": "100000",
+        "description": "Maximum number of rows to fetch from BigQuery"
+      }
+    }
+  }
+]

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/6c9a89e6/bigquery/src/test/java/org/apache/zeppelin/bigquery/BigQueryInterpreterTest.java
----------------------------------------------------------------------
diff --git 
a/bigquery/src/test/java/org/apache/zeppelin/bigquery/BigQueryInterpreterTest.java
 
b/bigquery/src/test/java/org/apache/zeppelin/bigquery/BigQueryInterpreterTest.java
new file mode 100644
index 0000000..add109b
--- /dev/null
+++ 
b/bigquery/src/test/java/org/apache/zeppelin/bigquery/BigQueryInterpreterTest.java
@@ -0,0 +1,118 @@
+/*
+* Copyright 2016 Google Inc.
+*
+* 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.
+*/
+
+
+package org.apache.zeppelin.bigquery;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.Properties;
+
+import org.apache.zeppelin.display.AngularObjectRegistry;
+import org.apache.zeppelin.display.GUI;
+import org.apache.zeppelin.interpreter.InterpreterContext;
+import org.apache.zeppelin.interpreter.InterpreterContextRunner;
+import org.apache.zeppelin.interpreter.InterpreterGroup;
+import org.apache.zeppelin.interpreter.InterpreterOutput;
+import org.apache.zeppelin.interpreter.InterpreterOutputListener;
+import org.apache.zeppelin.interpreter.InterpreterResult;
+import org.apache.zeppelin.interpreter.InterpreterResult.Type;
+import org.apache.zeppelin.user.AuthenticationInfo;
+import org.junit.Before;
+import org.junit.Test;
+
+import com.google.gson.Gson;
+import com.google.gson.JsonIOException;
+import com.google.gson.JsonSyntaxException;
+
+import java.io.FileNotFoundException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+
+public class BigQueryInterpreterTest {
+
+  protected static class Constants {
+    private String projectId;
+    private String oneQuery;
+    private String wrongQuery;
+
+    public String getProjectId() {
+      return projectId;
+    }
+
+    public String getOne() {
+      return oneQuery;
+    }
+
+    public String getWrong()  {
+      return wrongQuery;
+    }
+
+  }
+
+  @SuppressWarnings("checkstyle:abbreviationaswordinname")
+  protected static Constants CONSTANTS = null;
+
+  public BigQueryInterpreterTest()
+      throws JsonSyntaxException, JsonIOException, FileNotFoundException {
+    if (CONSTANTS == null) {
+      InputStream is = this.getClass().getResourceAsStream("/constants.json");
+      CONSTANTS = (new Gson()).<Constants>fromJson(new InputStreamReader(is), 
Constants.class);
+    }
+  }
+
+  private InterpreterGroup intpGroup;
+  private BigQueryInterpreter bqInterpreter;
+
+  private InterpreterContext context;
+
+  @Before
+  public void setUp() throws Exception {
+    Properties p = new Properties();
+    p.setProperty("zeppelin.bigquery.project_id", CONSTANTS.getProjectId());
+    p.setProperty("zeppelin.bigquery.wait_time", "5000");
+    p.setProperty("zeppelin.bigquery.max_no_of_rows", "100");
+
+    intpGroup = new InterpreterGroup();
+
+    bqInterpreter = new BigQueryInterpreter(p);
+    bqInterpreter.setInterpreterGroup(intpGroup);
+    bqInterpreter.open();
+
+  }
+
+  @Test
+  public void sqlSuccess() {
+    InterpreterResult ret = bqInterpreter.interpret(CONSTANTS.getOne(), 
context);
+
+    assertEquals(InterpreterResult.Code.SUCCESS, ret.code());
+    assertEquals(ret.type(), InterpreterResult.Type.TABLE);
+
+  }
+
+  @Test
+  public void badSqlSyntaxFails() {
+    InterpreterResult ret = bqInterpreter.interpret(CONSTANTS.getWrong(), 
context);
+
+    assertEquals(InterpreterResult.Code.ERROR, ret.code());
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/6c9a89e6/docs/_includes/themes/zeppelin/_navigation.html
----------------------------------------------------------------------
diff --git a/docs/_includes/themes/zeppelin/_navigation.html 
b/docs/_includes/themes/zeppelin/_navigation.html
index b5703af..c593e1b 100644
--- a/docs/_includes/themes/zeppelin/_navigation.html
+++ b/docs/_includes/themes/zeppelin/_navigation.html
@@ -48,6 +48,7 @@
                 <li role="separator" class="divider"></li>
                 <li class="title"><span><b>Available 
Interpreters</b><span></li>
                 <li><a 
href="{{BASE_PATH}}/interpreter/alluxio.html">Alluxio</a></li>
+                <li><a 
href="{{BASE_PATH}}/interpreter/bigquery.html">BigQuery</a></li>
                 <li><a 
href="{{BASE_PATH}}/interpreter/cassandra.html">Cassandra</a></li>
                 <li><a 
href="{{BASE_PATH}}/interpreter/elasticsearch.html">Elasticsearch</a></li>
                 <li><a 
href="{{BASE_PATH}}/interpreter/flink.html">Flink</a></li>
@@ -111,4 +112,4 @@
         </nav><!--/.navbar-collapse -->
       </div>
     </div>
-    
\ No newline at end of file
+    

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/6c9a89e6/docs/assets/themes/zeppelin/img/docs-img/bigqueryZeppelin.png
----------------------------------------------------------------------
diff --git a/docs/assets/themes/zeppelin/img/docs-img/bigqueryZeppelin.png 
b/docs/assets/themes/zeppelin/img/docs-img/bigqueryZeppelin.png
new file mode 100644
index 0000000..81ee4b2
Binary files /dev/null and 
b/docs/assets/themes/zeppelin/img/docs-img/bigqueryZeppelin.png differ

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/6c9a89e6/docs/interpreter/bigquery.md
----------------------------------------------------------------------
diff --git a/docs/interpreter/bigquery.md b/docs/interpreter/bigquery.md
new file mode 100644
index 0000000..1e92aa9
--- /dev/null
+++ b/docs/interpreter/bigquery.md
@@ -0,0 +1,113 @@
+---
+layout: page
+title: "BigQuery Interpreter"
+description: ""
+group: interpreter
+---
+
+# BigQuery Interpreter for Apache Zeppelin
+
+<div id="toc"></div>
+
+## Overview
+[BigQuery](https://cloud.google.com/bigquery/what-is-bigquery) is a highly 
scalable no-ops data warehouse in the Google Cloud Platform. Querying massive 
datasets can be time consuming and expensive without the right hardware and 
infrastructure. Google BigQuery solves this problem by enabling super-fast SQL 
queries against append-only tables using the processing power of Google's 
infrastructure. Simply move your data into BigQuery and let us handle the hard 
work. You can control access to both the project and your data based on your 
business needs, such as giving others the ability to view or query your data.  
+
+## Configuration
+<table class="table-configuration">
+  <tr>
+    <th>Name</th>
+    <th>Default Value</th>
+    <th>Description</th>
+  </tr>
+  <tr>
+    <td>zeppelin.bigquery.project_id</td>
+    <td>  </td>
+    <td>Google Project Id</td>
+  </tr>
+  <tr>
+    <td>zeppelin.bigquery.wait_time</td>
+    <td>5000</td>
+    <td>Query Timeout in Milliseconds</td>
+  </tr>
+  <tr>
+    <td>zeppelin.bigquery.max_no_of_rows</td>
+    <td>100000</td>
+    <td>Max result set size</td>
+  </tr>
+</table>
+
+
+## BigQuery API
+Zeppelin is built against BigQuery API version v2-rev265-1.21.0 - [API 
Javadocs](https://developers.google.com/resources/api-libraries/documentation/bigquery/v2/java/latest/)
+
+## Enabling the BigQuery Interpreter
+
+In a notebook, to enable the **BigQuery** interpreter, click the **Gear** icon 
and select **bigquery**.
+
+### Setup service account credentials
+
+In order to run BigQuery interpreter outside of Google Cloud Engine you need 
to provide authentication credentials,
+by [following this 
instructions](https://developers.google.com/identity/protocols/application-default-credentials):
+
+ - Go to the [API Console Credentials 
page](https://console.developers.google.com/project/_/apis/credentials)
+ - From the project drop-down, select your project.
+ - On the `Credentials` page, select the `Create credentials` drop-down, then 
select `Service account key`.
+ - From the Service account drop-down, select an existing service account or 
create a new one.
+ - For `Key type`, select the `JSON` key option, then select `Create`. The 
file automatically downloads to your computer.
+ - Put the `*.json` file you just downloaded in a directory of your choosing. 
This directory must be private (you can't let anyone get access to this), but 
accessible to your Zeppelin instance.
+ - Set the environment variable `GOOGLE_APPLICATION_CREDENTIALS` to the path 
of the JSON file downloaded.
+    * either though GUI: in interpreter configuration page property names in 
CAPITAL_CASE set up env vars
+    * or though `zeppelin-env.sh`: just add it to the end of the file.
+
+## Using the BigQuery Interpreter
+
+In a paragraph, use `%bigquery.sql` to select the **BigQuery** interpreter and 
then input SQL statements against your datasets stored in BigQuery.
+You can use [BigQuery SQL 
Reference](https://cloud.google.com/bigquery/query-reference) to build your own 
SQL.
+
+For Example, SQL to query for top 10 departure delays across airports using 
the flights public dataset
+
+```bash
+%bigquery.sql
+SELECT departure_airport,count(case when departure_delay>0 then 1 else 0 end) 
as no_of_delays 
+FROM [bigquery-samples:airline_ontime_data.flights] 
+group by departure_airport 
+order by 2 desc 
+limit 10
+```
+
+Another Example, SQL to query for most commonly used java packages from the 
github data hosted in BigQuery 
+
+```bash
+%bigquery.sql
+SELECT
+  package,
+  COUNT(*) count
+FROM (
+  SELECT
+    REGEXP_EXTRACT(line, r' ([a-z0-9\._]*)\.') package,
+    id
+  FROM (
+    SELECT
+      SPLIT(content, '\n') line,
+      id
+    FROM
+      [bigquery-public-data:github_repos.sample_contents]
+    WHERE
+      content CONTAINS 'import'
+      AND sample_path LIKE '%.java'
+    HAVING
+      LEFT(line, 6)='import' )
+  GROUP BY
+    package,
+    id )
+GROUP BY
+  1
+ORDER BY
+  count DESC
+LIMIT
+  40
+```
+
+## Technical description
+
+For in-depth technical details on current implementation please refer to 
[bigquery/README.md](https://github.com/apache/zeppelin/blob/master/bigquery/README.md).

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/6c9a89e6/licenses/LICENSE-bigquery-interpreter-google
----------------------------------------------------------------------
diff --git a/licenses/LICENSE-bigquery-interpreter-google 
b/licenses/LICENSE-bigquery-interpreter-google
new file mode 100644
index 0000000..9dd8af7
--- /dev/null
+++ b/licenses/LICENSE-bigquery-interpreter-google
@@ -0,0 +1,176 @@
+    Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/6c9a89e6/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index d5edff1..f615ab9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -72,6 +72,7 @@
     <module>lens</module>
     <module>cassandra</module>
     <module>elasticsearch</module>
+    <module>bigquery</module>
     <module>alluxio</module>
     <module>zeppelin-web</module>
     <module>zeppelin-server</module>
@@ -460,6 +461,7 @@
               <exclude>spark-*-bin*/**</exclude>
               <exclude>.spark-dist/**</exclude>
               <exclude>**/interpreter-setting.json</exclude>
+              <exclude>**/constants.json</exclude>
 
               <!-- bundled from bootstrap -->
               <exclude>docs/assets/themes/zeppelin/bootstrap/**</exclude>

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/6c9a89e6/zeppelin-distribution/src/bin_license/LICENSE
----------------------------------------------------------------------
diff --git a/zeppelin-distribution/src/bin_license/LICENSE 
b/zeppelin-distribution/src/bin_license/LICENSE
index 422409a..152c048 100644
--- a/zeppelin-distribution/src/bin_license/LICENSE
+++ b/zeppelin-distribution/src/bin_license/LICENSE
@@ -4,6 +4,7 @@
     (Apache 2.0) JavaEWAH v0.7.9 (https://github.com/lemire/javaewah) - 
https://github.com/lemire/javaewah/blob/master/LICENSE-2.0.txt
 
 
+
 The following components are provided under Apache License.
 
 
@@ -73,7 +74,7 @@ The following components are provided under Apache License.
     (Apache 2.0) json-flattener (com.github.wnameless:json-flattener:0.1.6 - 
https://github.com/wnameless/json-flattener)
     (Apache 2.0) Spatial4J (com.spatial4j:spatial4j:0.4.1 - 
https://github.com/spatial4j/spatial4j)
     (Apache 2.0) T-Digest (com.tdunning:t-digest:3.0 - 
https://github.com/tdunning/t-digest)
-    (Apache 2.0) Netty (io.netty:netty:3.8.0.Final - http://netty.io/)
+    (Apache 2.0) Netty (io.netty:netty:3.10.5.Final - http://netty.io/)
     (Apache 2.0) Lucene Common Analyzers 
(org.apache.lucene:lucene-analyzers-common:5.3.1 - 
http://lucene.apache.org/lucene-parent/lucene-analyzers-common)
     (Apache 2.0) Lucene Memory (org.apache.lucene:lucene-backward-codecs:5.3.1 
- http://lucene.apache.org/lucene-parent/lucene-backward-codecs)
     (Apache 2.0) Lucene Core (org.apache.lucene:lucene-core:5.3.1 - 
http://lucene.apache.org/lucene-parent/lucene-core)
@@ -102,7 +103,17 @@ The following components are provided under Apache License.
     (Apache 2.0) Roboto Font (https://github.com/google/roboto/)
     (Apache 2.0) stream (com.clearspring.analytics:stream:2.7.0) - 
https://github.com/addthis/stream-lib/blob/v2.7.0/LICENSE.txt
     (Apache 2.0) io.dropwizard.metrics:3.1.2 - 
https://github.com/dropwizard/metrics/blob/v3.1.2/LICENSE
-
+    (Apache 2.0) Google BigQuery API for Java 
(com.google.api.services.bigquery:v2-rev265-1.21.0 - 
https://cloud.google.com/bigquery/)
+    (Apache 2.0) Google APIs Client Library for Java 
(com.google.api-client:1.21.0 - 
https://github.com/google/google-api-java-client)
+    (Apache 2.0) The Guava project contains several of Google's core libraries 
that we rely on in our Java-based projects (com.google.guava:guava-jdk5:17.0 - 
https://github.com/google/guava)
+    (Apache 2.0) Google OAuth Client Library for Java 
(com.google.oauth-client:google-oauth-client:1.21.0 - 
https://github.com/google/google-oauth-java-client)
+    (Apache 2.0) Google HTTP Client Library for Java 
(com.google.http-client:google-http-client:1.21.0 - 
https://github.com/google/google-http-java-client/tree/dev/google-http-client)
+    (Apache 2.0) Google OAuth Jetty Client Library for Java 
(com.google.oauth-client:google-oauth-client-jetty:1.21.0 - 
https://github.com/google/google-oauth-java-client/tree/dev/google-oauth-client-jetty)
+    (Apache 2.0) Google OAuth Client Library for Java6 
(com.google.oauth-client:google-oauth-client-java6:1.21.0 - 
https://github.com/google/google-oauth-java-client/tree/dev/google-oauth-client-java6)
+    (Apache 2.0) The core jetty server artifact 
(org.mortbay.jetty:jetty:6.1.26 - 
http://javadox.com/org.mortbay.jetty/jetty/6.1.26/overview-tree.html)
+    (Apache 2.0) Utility classes for Jetty 
(org.mortbay.jetty:jetty-util:6.1.26 - 
http://javadox.com/org.mortbay.jetty/jetty/6.1.26/overview-tree.html)
+    (Apache 2.0) Servlet API (org.mortbay.jetty:servlet-api:2.5-20081211 - 
https://en.wikipedia.org/wiki/Jetty_(web_server))
+    (Apache 2.0) Google HTTP Client Library for Java 
(com.google.http-client:google-http-client-jackson2:1.21.0 - 
https://github.com/google/google-http-java-client/tree/dev/google-http-client-jackson2)
 
 ========================================================================
 MIT licenses
@@ -171,7 +182,6 @@ The following components are provided under the BSD-style 
License.
 
     (New BSD License) JGit 
(org.eclipse.jgit:org.eclipse.jgit:jar:4.1.1.201511131810-r - 
https://eclipse.org/jgit/)
     (New BSD License) Kryo (com.esotericsoftware.kryo:kryo:3.0.3 - 
http://code.google.com/p/kryo/)
-    (New BSD License) leveldbjni 
(org.fusesource.leveldbjni:leveldbjni-all:1.8) - 
https://github.com/fusesource/leveldbjni/blob/leveldbjni-1.8/license.txt
     (New BSD License) MinLog (com.esotericsoftware.minlog:minlog:1.3 - 
http://code.google.com/p/minlog/)
     (New BSD License) ReflectASM 
(com.esotericsoftware.reflectasm:reflectasm:1.07 - 
http://code.google.com/p/reflectasm/)
     (BSD-like) Scala Library (org.scala-lang:scala-library:2.11.7 - 
http://www.scala-lang.org/)

Reply via email to