---
schema_version: "1"
id: bcd82cd6fcef9712fb80b71767c5db73c38d83f99c90a54a217f304433f374a5
title: Google BigQuery Connector 1.2 Examples
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/google-bigquery-connector/1.2/google-bigquery-connector-examples.md
canonical_url: https://docs.mulesoft.com/google-bigquery-connector/1.2/google-bigquery-connector-examples
source_site: docs.mulesoft.com
content_type: documentation
content_hash: df5b3319529437029b1374b041fb4ec55f69b8490ca2cc0e6edc04723ea61d53
description: MuleSoft Documentation Site
release: "1.2"
latest: false
---
---
product: Google BigQuery Connector
version: 1.2
---

# Google BigQuery Connector 1.2 Examples

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

The following examples show several Mule flows for Google BigQuery Connector:

- [Get a Job](#get-job)

- [Insert a Job](#insert-job)

- [Delete a Job](#delete-job)

- [Get a Query Result](#get-query-result)

- [Cancel a Job](#cancel-job)

- [List Jobs](#list-jobs)

- [Query](#query)

- [Use On Table Row](#on-table-row)

- [Authorize](#authorize)

- [Render an HTML Form](#html-form)

## Configure a Connection

To secure connections, you must specify the OAuth connection field values. To do this:

- [Create a configuration file for a connection.](#create-config-file)

- [Configure the connection global elements.](#configure-conn)

- [Configure a global element for the properties file.](#configure-global)

### Create a Configuration File for a Connection

Create a configuration file that includes properties for a connection:

1.  Create a file named `mule-app.properties` in the `/src/main/resources/` folder.

2.  In the `mule-app.properties` file, create a set of properties for the connection, similar to the
    ones that follow, replacing the bracketed text (including the brackets) with the correct values
    for your configuration:

    config.consumerKey=<consumerkey> config.consumerSecret=<consumersecret>

    This may vary depending on the selected connection configuration.

For more information about creating a properties file, refer to
[Configuring Property Placeholders](https://docs.mulesoft.com/mule-runtime/latest/mule-app-properties-to-configure).

### Configure the Connection Global Elements

Configure global elements for connection:

1.  Create a new Mule project.

2.  In the **Mule Palette** view, click **Search in Exchange** and enter `google bigquery`.

3.  Add **Google BigQuery Connector** to the **Selected modules** section and click **Finish**.

4.  Click the **Global Elements** tab and click **Create**.

5.  Select **Connector Configuration > Google BigQuery Config** and click **OK**.

6.  Enter the values to configure either JWT or OAuth2. For more information about what values to
    enter in the fields for the connector configuration, see
    [Configure a Global Element for the Connector](https://docs.mulesoft.com/google-bigquery-connector/1.2/google-bigquery-connector-studio#configure-global-element).

7.  Click the **Test Connection** button to ensure there is connectivity with the Google API. A
    successful message should pop up.

8.  Click **OK**.

9.  Open the HTTPS Listener config in **Global Element Configuration**.

10. Click the **TLS** tab and select TLS Configuration > Edit inline.

11. Specify the **Key Store Configuration** with the generated keystore details to enable HTTPS on
    this configuration.

12. Click **OK**.

### Configure a Global Element for the Properties File

Configure a global element for the `mule-app.properties` file so that Mule knows where to find it:

1.  Click the **Global Elements** tab and click **Create**.

2.  In the **Choose Global Type** dialog, select **Configuration properties** and click **OK**.

3.  In the **File** field, enter `mule.app.properties`.

4.  Click **OK**.

## Get a Job

This Mule flow retrieves a job from the given job ID.

This example uses the following operations:

- **HTTP Listener**  
  Accepts data from HTTP requests

- **Get Job**  
  Gets a job

  Enter the following values:

  <table><colgroup><col> <col></colgroup><thead><tr><th>Field</th><th>Value</th></tr></thead><tbody><tr><td><p><strong>Job Id</strong></p></td><td><div><div><p><code>attributes.queryParams.jobId</code></p></div></div></td></tr></tbody></table>

- **Logger**  
  Shows the HTTP response from the **Get Job** operation

![Studio Flow for the Get Job operation](/mulesoft/current/en-us/google-bigquery-connector/1.2/_images/get-job.png)

### XML for This Example

Paste this code into the Studio XML editor to quickly load the flow for this example into your Mule
app:

```xml
<?xml version="1.0" encoding="UTF-8"?>

<mule xmlns:ee="http://www.mulesoft.org/schema/mule/ee/core"
	  xmlns:os="http://www.mulesoft.org/schema/mule/os"
	  xmlns:http="http://www.mulesoft.org/schema/mule/http"
	  xmlns:bigquery="http://www.mulesoft.org/schema/mule/bigquery"
	  xmlns="http://www.mulesoft.org/schema/mule/core"
	  xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
	  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	  xmlns:secure-properties="http://www.mulesoft.org/schema/mule/secure-properties"
	  xsi:schemaLocation="
http://www.mulesoft.org/schema/mule/ee/core http://www.mulesoft.org/schema/mule/ee/core/current/mule-ee.xsd http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/bigquery http://www.mulesoft.org/schema/mule/bigquery/current/mule-bigquery.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.mulesoft.org/schema/mule/os http://www.mulesoft.org/schema/mule/os/current/mule-os.xsd
		http://www.mulesoft.org/schema/mule/secure-properties http://www.mulesoft.org/schema/mule/secure-properties/current/mule-secure-properties.xsd">
	<secure-properties:config name="Secure_Properties_Config_demo" doc:name="Secure Properties Config"  file="mule-artifact.properties" key="mulesoft" >
		<secure-properties:encrypt algorithm="Blowfish" />
	</secure-properties:config>

	<configuration-properties
			file="mule-artifact.properties" />
	<http:request-config
			name="HTTP_Request_configuration"
			doc:name="HTTP Request configuration"
			>
		<http:request-connection host="127.0.0.1"
								 port="8087"/>
	</http:request-config>
	<http:listener-config name="HTTP_Listener_config"
						  doc:name="HTTP Listener config"
						  >
		<http:listener-connection host="0.0.0.0"
								  port="8082" />
	</http:listener-config>
	<http:listener-config
			name="HTTP_Listener_config1_Test" doc:name="HTTP Listener config">
		<http:listener-connection host="127.0.0.1"
								  port="8087" usePersistentConnections="false"
								  connectionIdleTimeout="4000" />
	</http:listener-config>
	<bigquery:config name="BigQuery__Configuration"
					 doc:name="BigQuery  Configuration"
					 >
		<bigquery:oauth2-connection projectId="${config.projectId}">
			<bigquery:oauth-authorization-code
					consumerKey="${secure::config.consumerKey}"
					consumerSecret="${secure::config.consumerSecret}"
					resourceOwnerId="demo" />
			<bigquery:oauth-callback-config
					listenerConfig="HTTP_Listener_config1_Test" callbackPath="/callback"
					authorizePath="/authorize" />
		</bigquery:oauth2-connection>
	</bigquery:config>
	<flow name="getQueryFlow"
		  >
		<http:listener doc:name="Listener"

					   config-ref="HTTP_Listener_config" path="/get" />
		<bigquery:get-job doc:name="Get Job"

						  jobId="#[attributes.queryParams.jobId]"
						  config-ref="BigQuery__Configuration" />
		<logger level="INFO" doc:name="Logger"
				 />
	</flow>
</mule>
```

### Steps for Running This Example

1.  Verify that your connector is configured.

2.  Save the project.

3.  Click the **Authorize** button for OAuth2 authorization.

4.  From a web browser, test the application by entering `http://{app-name}.cloudhub.io`.

## Insert a Job

This Mule flow inserts a job using the input configuration.

This example uses the following operations:

- **HTTP Listener**  
  Accepts data from HTTP requests

- **Insert Job**  
  Insert a job

  Enter the following values:

  <table><colgroup><col> <col></colgroup><thead><tr><th>Field</th><th>Value</th></tr></thead><tbody><tr><td><p><strong>Job values content</strong></p></td><td><div><div><p><code>payload</code></p></div></div></td></tr></tbody></table>

- **Logger**  
  Shows the HTTP response from the **Insert Job** operation

![Studio Flow for the Insert Job operation](/mulesoft/current/en-us/google-bigquery-connector/1.2/_images/insert-job.png)

### XML for This Example

Paste this code into the Studio XML editor to quickly load the flow for this example into your Mule
app:

```xml
<?xml version="1.0" encoding="UTF-8"?>

<mule xmlns:ee="http://www.mulesoft.org/schema/mule/ee/core"
	  xmlns:os="http://www.mulesoft.org/schema/mule/os"
	  xmlns:http="http://www.mulesoft.org/schema/mule/http"
	  xmlns:bigquery="http://www.mulesoft.org/schema/mule/bigquery"
	  xmlns="http://www.mulesoft.org/schema/mule/core"
	  xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
	  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	  xmlns:secure-properties="http://www.mulesoft.org/schema/mule/secure-properties"
	  xsi:schemaLocation="
http://www.mulesoft.org/schema/mule/ee/core http://www.mulesoft.org/schema/mule/ee/core/current/mule-ee.xsd http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/bigquery http://www.mulesoft.org/schema/mule/bigquery/current/mule-bigquery.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.mulesoft.org/schema/mule/os http://www.mulesoft.org/schema/mule/os/current/mule-os.xsd
		http://www.mulesoft.org/schema/mule/secure-properties http://www.mulesoft.org/schema/mule/secure-properties/current/mule-secure-properties.xsd">
	<secure-properties:config name="Secure_Properties_Config_demo" doc:name="Secure Properties Config"  file="mule-artifact.properties" key="mulesoft" >
		<secure-properties:encrypt algorithm="Blowfish" />
	</secure-properties:config>

	<configuration-properties
			file="mule-artifact.properties" />
	<http:request-config
			name="HTTP_Request_configuration"
			doc:name="HTTP Request configuration"
			>
		<http:request-connection host="127.0.0.1"
								 port="8087"/>
	</http:request-config>
	<http:listener-config name="HTTP_Listener_config"
						  doc:name="HTTP Listener config"
						  >
		<http:listener-connection host="0.0.0.0"
								  port="8082" />
	</http:listener-config>
	<http:listener-config
			name="HTTP_Listener_config1_Test" doc:name="HTTP Listener config">
		<http:listener-connection host="127.0.0.1"
								  port="8087" usePersistentConnections="false"
								  connectionIdleTimeout="4000" />
	</http:listener-config>
	<bigquery:config name="BigQuery__Configuration"
					 doc:name="BigQuery  Configuration"
					 >
		<bigquery:oauth2-connection projectId="${config.projectId}">
			<bigquery:oauth-authorization-code
					consumerKey="${secure::config.consumerKey}"
					consumerSecret="${secure::config.consumerSecret}"
					resourceOwnerId="demo" />
			<bigquery:oauth-callback-config
					listenerConfig="HTTP_Listener_config1_Test" callbackPath="/callback"
					authorizePath="/authorize" />
		</bigquery:oauth2-connection>
	</bigquery:config>
	<flow name="insertJobFlow"
		  >
		<http:listener doc:name="Listener"

					   config-ref="HTTP_Listener_config" path="/insert" />
		<bigquery:insert-job doc:name="Insert Job"

							 config-ref="BigQuery__Configuration">
			<bigquery:job-values-content><![CDATA[#[payload]]]></bigquery:job-values-content>
		</bigquery:insert-job>
		<logger level="INFO" doc:name="Logger"
				 />
	</flow>
</mule>
```

### Steps for Running This Example

1.  Verify that your connector is configured.

2.  Save the project.

3.  Click the **Authorize** button for OAuth2 authorization.

4.  From a web browser, test the application by entering `http://{app-name}.cloudhub.io`.

## Delete a Job

This Mule flow deletes a job from the given job ID.

This example uses the following operations:

- **HTTP Listener**  
  Accepts data from HTTP requests

- **Delete Job**  
  Deletes a job

  Enter the following values:

  <table><colgroup><col> <col></colgroup><thead><tr><th>Field</th><th>Value</th></tr></thead><tbody><tr><td><p><strong>Job Id</strong></p></td><td><div><div><p><code>attributes.queryParams.jobId</code></p></div></div></td></tr></tbody></table>

- **Logger**  
  Shows the HTTP response from the **Delete Job** operation

![Studio Flow for the Delete Job operation](/mulesoft/current/en-us/google-bigquery-connector/1.2/_images/delete-job.png)

### XML for This Example

Paste this code into the Studio XML editor to quickly load the flow for this example into your Mule
app:

```xml
<?xml version="1.0" encoding="UTF-8"?>

<mule xmlns:ee="http://www.mulesoft.org/schema/mule/ee/core"
	  xmlns:os="http://www.mulesoft.org/schema/mule/os"
	  xmlns:http="http://www.mulesoft.org/schema/mule/http"
	  xmlns:bigquery="http://www.mulesoft.org/schema/mule/bigquery"
	  xmlns="http://www.mulesoft.org/schema/mule/core"
	  xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
	  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	  xmlns:secure-properties="http://www.mulesoft.org/schema/mule/secure-properties"
	  xsi:schemaLocation="
http://www.mulesoft.org/schema/mule/ee/core http://www.mulesoft.org/schema/mule/ee/core/current/mule-ee.xsd http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/bigquery http://www.mulesoft.org/schema/mule/bigquery/current/mule-bigquery.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.mulesoft.org/schema/mule/os http://www.mulesoft.org/schema/mule/os/current/mule-os.xsd
		http://www.mulesoft.org/schema/mule/secure-properties http://www.mulesoft.org/schema/mule/secure-properties/current/mule-secure-properties.xsd">
	<secure-properties:config name="Secure_Properties_Config_demo" doc:name="Secure Properties Config"  file="mule-artifact.properties" key="mulesoft" >
		<secure-properties:encrypt algorithm="Blowfish" />
	</secure-properties:config>

	<configuration-properties
			file="mule-artifact.properties" />
	<http:request-config
			name="HTTP_Request_configuration"
			doc:name="HTTP Request configuration"
			>
		<http:request-connection host="127.0.0.1"
								 port="8087"/>
	</http:request-config>
	<http:listener-config name="HTTP_Listener_config"
						  doc:name="HTTP Listener config"
						  >
		<http:listener-connection host="0.0.0.0"
								  port="8082" />
	</http:listener-config>
	<http:listener-config
			name="HTTP_Listener_config1_Test" doc:name="HTTP Listener config">
		<http:listener-connection host="127.0.0.1"
								  port="8087" usePersistentConnections="false"
								  connectionIdleTimeout="4000" />
	</http:listener-config>
	<bigquery:config name="BigQuery__Configuration"
					 doc:name="BigQuery  Configuration"
					 >
		<bigquery:oauth2-connection projectId="${config.projectId}">
			<bigquery:oauth-authorization-code
					consumerKey="${secure::config.consumerKey}"
					consumerSecret="${secure::config.consumerSecret}"
					resourceOwnerId="demo" />
			<bigquery:oauth-callback-config
					listenerConfig="HTTP_Listener_config1_Test" callbackPath="/callback"
					authorizePath="/authorize" />
		</bigquery:oauth2-connection>
	</bigquery:config>
	<flow name="deleteJobFlow">
		<http:listener doc:name="Listener"
					   config-ref="HTTP_Listener_config" path="/delete" />
		<bigquery:delete-job doc:name="Delete Job"
							 config-ref="BigQuery__Configuration"
							 jobId="#[attributes.queryParams.jobId]" />
		<logger level="INFO" doc:name="Logger" />
	</flow>
</mule>
```

### Steps for Running This Example

1.  Verify that your connector is configured.

2.  Save the project.

3.  Click the **Authorize** button for OAuth2 authorization.

4.  From a web browser, test the application by entering `http://{app-name}.cloudhub.io`.

## Get a Query Result

This Mule flow retrieves results of a query.

This example uses the following operations:

- **HTTP Listener**  
  Accepts data from HTTP requests

- **Get Query Results**  
  Get results of a query

  Enter the following values:

  <table><colgroup><col> <col></colgroup><thead><tr><th>Field</th><th>Value</th></tr></thead><tbody><tr><td><p><strong>Job Id</strong></p></td><td><div><div><p><code>attributes.queryParams.jobId</code></p></div></div></td></tr><tr><td><p><strong>Start Index</strong></p></td><td><div><div><p><code>0</code></p></div></div></td></tr><tr><td><p><strong>Max Results</strong></p></td><td><div><div><p><code>25</code></p></div></div></td></tr></tbody></table>

- **Logger**  
  Shows the HTTP response from the **Get Query Results** operation

![Studio Flow for the Get Query Results operation](/mulesoft/current/en-us/google-bigquery-connector/1.2/_images/get-query-result.png)

### XML for This Example

Paste this code into the Studio XML editor to quickly load the flow for this example into your Mule
app:

```xml
<?xml version="1.0" encoding="UTF-8"?>

<mule xmlns:ee="http://www.mulesoft.org/schema/mule/ee/core"
	  xmlns:os="http://www.mulesoft.org/schema/mule/os"
	  xmlns:http="http://www.mulesoft.org/schema/mule/http"
	  xmlns:bigquery="http://www.mulesoft.org/schema/mule/bigquery"
	  xmlns="http://www.mulesoft.org/schema/mule/core"
	  xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
	  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	  xmlns:secure-properties="http://www.mulesoft.org/schema/mule/secure-properties"
	  xsi:schemaLocation="
http://www.mulesoft.org/schema/mule/ee/core http://www.mulesoft.org/schema/mule/ee/core/current/mule-ee.xsd http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/bigquery http://www.mulesoft.org/schema/mule/bigquery/current/mule-bigquery.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.mulesoft.org/schema/mule/os http://www.mulesoft.org/schema/mule/os/current/mule-os.xsd
		http://www.mulesoft.org/schema/mule/secure-properties http://www.mulesoft.org/schema/mule/secure-properties/current/mule-secure-properties.xsd">
	<secure-properties:config name="Secure_Properties_Config_demo" doc:name="Secure Properties Config"  file="mule-artifact.properties" key="mulesoft" >
		<secure-properties:encrypt algorithm="Blowfish" />
	</secure-properties:config>

	<configuration-properties
			file="mule-artifact.properties" />
	<http:request-config
			name="HTTP_Request_configuration"
			doc:name="HTTP Request configuration"
			>
		<http:request-connection host="127.0.0.1"
								 port="8087"/>
	</http:request-config>
	<http:listener-config name="HTTP_Listener_config"
						  doc:name="HTTP Listener config"
						  >
		<http:listener-connection host="0.0.0.0"
								  port="8082" />
	</http:listener-config>
	<http:listener-config
			name="HTTP_Listener_config1_Test" doc:name="HTTP Listener config">
		<http:listener-connection host="127.0.0.1"
								  port="8087" usePersistentConnections="false"
								  connectionIdleTimeout="4000" />
	</http:listener-config>
	<bigquery:config name="BigQuery__Configuration"
					 doc:name="BigQuery  Configuration"
					 >
		<bigquery:oauth2-connection projectId="${config.projectId}">
			<bigquery:oauth-authorization-code
					consumerKey="${secure::config.consumerKey}"
					consumerSecret="${secure::config.consumerSecret}"
					resourceOwnerId="demo" />
			<bigquery:oauth-callback-config
					listenerConfig="HTTP_Listener_config1_Test" callbackPath="/callback"
					authorizePath="/authorize" />
		</bigquery:oauth2-connection>
	</bigquery:config>
	<flow name="getQueryResultFlow">
		<http:listener doc:name="Listener"
					   config-ref="HTTP_Listener_config" path="/get/results" />
		<bigquery:get-query-results doc:name="Get Query Result Paged" config-ref="BigQuery__Configuration" maxResults="25" jobId="#[attributes.queryParams.jobId]">
			<ee:repeatable-file-store-iterable inMemoryObjects="1000" />
		</bigquery:get-query-results>
		<logger level="INFO" doc:name="Logger"
			 message="#[payload]" />
	</flow>
</mule>
```

### Steps for Running This Example

1.  Verify that your connector is configured.

2.  Save the project.

3.  Click the **Authorize** button for OAuth2 authorization.

4.  From a web browser, test the application by entering `http://{app-name}.cloudhub.io`.

## Cancel a Job

This Mule flow cancels a job from the given job ID.

This example uses the following operations:

- **HTTP Listener**  
  Accepts data from HTTP requests

- **Cancel Job**  
  Cancels a job

  Enter the following values:

  <table><colgroup><col> <col></colgroup><thead><tr><th>Field</th><th>Value</th></tr></thead><tbody><tr><td><p><strong>Job Id</strong></p></td><td><div><div><p><code>attributes.queryParams.jobId</code></p></div></div></td></tr><tr><td><p><strong>Content Type</strong></p></td><td><div><div><p><code>application/json</code></p></div></div></td></tr></tbody></table>

- **Logger**  
  Shows the HTTP response from the **Cancel Job** operation

![Studio Flow for the Cancel Job operation](/mulesoft/current/en-us/google-bigquery-connector/1.2/_images/cancel-job.png)

### XML for This Example

Paste this code into the Studio XML editor to quickly load the flow for this example into your Mule
app:

```xml
<?xml version="1.0" encoding="UTF-8"?>

<mule xmlns:ee="http://www.mulesoft.org/schema/mule/ee/core"
	  xmlns:os="http://www.mulesoft.org/schema/mule/os"
	  xmlns:http="http://www.mulesoft.org/schema/mule/http"
	  xmlns:bigquery="http://www.mulesoft.org/schema/mule/bigquery"
	  xmlns="http://www.mulesoft.org/schema/mule/core"
	  xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
	  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	  xmlns:secure-properties="http://www.mulesoft.org/schema/mule/secure-properties"
	  xsi:schemaLocation="
http://www.mulesoft.org/schema/mule/ee/core http://www.mulesoft.org/schema/mule/ee/core/current/mule-ee.xsd http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/bigquery http://www.mulesoft.org/schema/mule/bigquery/current/mule-bigquery.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.mulesoft.org/schema/mule/os http://www.mulesoft.org/schema/mule/os/current/mule-os.xsd
		http://www.mulesoft.org/schema/mule/secure-properties http://www.mulesoft.org/schema/mule/secure-properties/current/mule-secure-properties.xsd">
	<secure-properties:config name="Secure_Properties_Config_demo" doc:name="Secure Properties Config"  file="mule-artifact.properties" key="mulesoft" >
		<secure-properties:encrypt algorithm="Blowfish" />
	</secure-properties:config>

	<configuration-properties
			file="mule-artifact.properties" />
	<http:request-config
			name="HTTP_Request_configuration"
			doc:name="HTTP Request configuration"
			>
		<http:request-connection host="127.0.0.1"
								 port="8087"/>
	</http:request-config>
	<http:listener-config name="HTTP_Listener_config"
						  doc:name="HTTP Listener config"
						  >
		<http:listener-connection host="0.0.0.0"
								  port="8082" />
	</http:listener-config>
	<http:listener-config
			name="HTTP_Listener_config1_Test" doc:name="HTTP Listener config">
		<http:listener-connection host="127.0.0.1"
								  port="8087" usePersistentConnections="false"
								  connectionIdleTimeout="4000" />
	</http:listener-config>
	<bigquery:config name="BigQuery__Configuration"
					 doc:name="BigQuery  Configuration"
					 >
		<bigquery:oauth2-connection projectId="${config.projectId}">
			<bigquery:oauth-authorization-code
					consumerKey="${secure::config.consumerKey}"
					consumerSecret="${secure::config.consumerSecret}"
					resourceOwnerId="demo" />
			<bigquery:oauth-callback-config
					listenerConfig="HTTP_Listener_config1_Test" callbackPath="/callback"
					authorizePath="/authorize" />
		</bigquery:oauth2-connection>
	</bigquery:config>
	<flow name="cancelJobFlow">
		<http:listener doc:name="Listener"
					   config-ref="HTTP_Listener_config" path="/cancel" />
		<bigquery:cancel-job doc:name="Cancel Job"
							 config-ref="BigQuery__Configuration"
							 jobId="#[attributes.queryParams.jobId]" />
		<logger level="INFO" doc:name="Logger" />
	</flow>
</mule>
```

### Steps for Running This Example

1.  Verify that your connector is configured.

2.  Save the project.

3.  Click the **Authorize** button for OAuth2 authorization.

4.  From a web browser, test the application by entering `http://{app-name}.cloudhub.io`.

## List Jobs

This Mule flow retrieves jobs from the project.

This example uses the following operations:

- **HTTP Listener**  
  Accepts data from HTTP requests

- **List Jobs**  
  Lists jobs

  Enter the following values:

  <table><colgroup><col> <col></colgroup><thead><tr><th>Field</th><th>Value</th></tr></thead><tbody><tr><td><p><strong>Content Type</strong></p></td><td><div><div><p><code>application/json</code></p></div></div></td></tr><tr><td><p><strong>Max Results</strong></p></td><td><div><div><p><code>30</code></p></div></div></td></tr><tr><td><p><strong>Pretty Print</strong></p></td><td><div><div><p><code>False (Default)</code></p></div></div></td></tr></tbody></table>

- **Logger**  
  Shows the HTTP response from the **List Jobs** operation

![Studio Flow for the List Jobs operation](/mulesoft/current/en-us/google-bigquery-connector/1.2/_images/list-jobs.png)

### XML for This Example

Paste this code into the Studio XML editor to quickly load the flow for this example into your Mule
app:

```xml
<?xml version="1.0" encoding="UTF-8"?>

<mule xmlns:ee="http://www.mulesoft.org/schema/mule/ee/core"
	  xmlns:os="http://www.mulesoft.org/schema/mule/os"
	  xmlns:http="http://www.mulesoft.org/schema/mule/http"
	  xmlns:bigquery="http://www.mulesoft.org/schema/mule/bigquery"
	  xmlns="http://www.mulesoft.org/schema/mule/core"
	  xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
	  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	  xmlns:secure-properties="http://www.mulesoft.org/schema/mule/secure-properties"
	  xsi:schemaLocation="
http://www.mulesoft.org/schema/mule/ee/core http://www.mulesoft.org/schema/mule/ee/core/current/mule-ee.xsd http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/bigquery http://www.mulesoft.org/schema/mule/bigquery/current/mule-bigquery.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.mulesoft.org/schema/mule/os http://www.mulesoft.org/schema/mule/os/current/mule-os.xsd
		http://www.mulesoft.org/schema/mule/secure-properties http://www.mulesoft.org/schema/mule/secure-properties/current/mule-secure-properties.xsd">
	<secure-properties:config name="Secure_Properties_Config_demo" doc:name="Secure Properties Config"  file="mule-artifact.properties" key="mulesoft" >
		<secure-properties:encrypt algorithm="Blowfish" />
	</secure-properties:config>

	<configuration-properties
			file="mule-artifact.properties" />
	<http:request-config
			name="HTTP_Request_configuration"
			doc:name="HTTP Request configuration"
			>
		<http:request-connection host="127.0.0.1"
								 port="8087"/>
	</http:request-config>
	<http:listener-config name="HTTP_Listener_config"
						  doc:name="HTTP Listener config"
						  >
		<http:listener-connection host="0.0.0.0"
								  port="8082" />
	</http:listener-config>
	<http:listener-config
			name="HTTP_Listener_config1_Test" doc:name="HTTP Listener config">
		<http:listener-connection host="127.0.0.1"
								  port="8087" usePersistentConnections="false"
								  connectionIdleTimeout="4000" />
	</http:listener-config>
	<bigquery:config name="BigQuery__Configuration"
					 doc:name="BigQuery  Configuration"
					 >
		<bigquery:oauth2-connection projectId="${config.projectId}">
			<bigquery:oauth-authorization-code
					consumerKey="${secure::config.consumerKey}"
					consumerSecret="${secure::config.consumerSecret}"
					resourceOwnerId="demo" />
			<bigquery:oauth-callback-config
					listenerConfig="HTTP_Listener_config1_Test" callbackPath="/callback"
					authorizePath="/authorize" />
		</bigquery:oauth2-connection>
	</bigquery:config>
	<flow name="listJobsFlow">
		<http:listener doc:name="Listener"
					   config-ref="HTTP_Listener_config" path="/list" />
		<bigquery:list-jobs doc:name="List Jobs"
							config-ref="BigQuery__Configuration" />
		<logger level="INFO" doc:name="Logger" />
	</flow>
</mule>
```

### Steps for Running This Example

1.  Verify that your connector is configured.

2.  Save the project.

3.  Click the **Authorize** button for OAuth2 authorization.

4.  From a web browser, test the application by entering `http://{app-name}.cloudhub.io`.

## Query

This Mule flow executes the query given in the query job values.

This example uses the following operations:

- **HTTP Listener**  
  Accepts data from HTTP requests

- **Query**  
  Executes a query

  Enter the following values:

  <table><colgroup><col> <col></colgroup><thead><tr><th>Field</th><th>Value</th></tr></thead><tbody><tr><td><p><strong>Query values content</strong></p></td><td><div><div><div><pre><code data-lang="java">%dw 2.0
  output application/json
  ---

  payload</code></pre></div></div></div></td></tr></tbody></table>

- **For Each**  
  Iterates through multiple components

  Enter the following values:

  <table><colgroup><col> <col></colgroup><thead><tr><th>Field</th><th>Value</th></tr></thead><tbody><tr><td><p><strong>Counter Variable Name</strong></p></td><td><div><div><p><code>counter</code></p></div></div></td></tr><tr><td><p><strong>Batch Size</strong></p></td><td><div><div><p><code>1</code></p></div></div></td></tr><tr><td><p><strong>Root Message Variable Name</strong></p></td><td><div><div><p><code>rootMessage</code></p></div></div></td></tr></tbody></table>
  - **Transform Message**  
    Outputs the results of the **Query** operation in JSON format

    %dw 2.0 output application/json var resultt = read(payload."output","application/json")
    ---

    ((resultt.f) map ((item, index) -> {(payload.attributes.tableSchema.fields\[index\].name as
    String) : item.v} )) reduce ((item, accumulator) -> accumulator ++ item)

  - **Logger**  
    Shows the HTTP response from the **Query** operation

![Studio Flow for the Query operation](/mulesoft/current/en-us/google-bigquery-connector/1.2/_images/query.png)

### XML for This Example

Paste this code into the Studio XML editor to quickly load the flow for this example into your Mule
app:

```xml
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns:google-drive="http://www.mulesoft.org/schema/mule/google-drive"
	  xmlns:ee="http://www.mulesoft.org/schema/mule/ee/core"
	  xmlns:os="http://www.mulesoft.org/schema/mule/os"
	  xmlns:http="http://www.mulesoft.org/schema/mule/http"
	  xmlns:bigquery="http://www.mulesoft.org/schema/mule/bigquery"
	  xmlns="http://www.mulesoft.org/schema/mule/core"
	  xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
	  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	  xmlns:secure-properties="http://www.mulesoft.org/schema/mule/secure-properties" xsi:schemaLocation="
http://www.mulesoft.org/schema/mule/ee/core http://www.mulesoft.org/schema/mule/ee/core/current/mule-ee.xsd http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/bigquery http://www.mulesoft.org/schema/mule/bigquery/current/mule-bigquery.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.mulesoft.org/schema/mule/os http://www.mulesoft.org/schema/mule/os/current/mule-os.xsd
		http://www.mulesoft.org/schema/mule/secure-properties http://www.mulesoft.org/schema/mule/secure-properties/current/mule-secure-properties.xsd
http://www.mulesoft.org/schema/mule/google-drive http://www.mulesoft.org/schema/mule/google-drive/current/mule-google-drive.xsd">
	<secure-properties:config name="Secure_Properties_Config_demo" doc:name="Secure Properties Config"  file="mule-artifact.properties" key="mulesoft" >
		<secure-properties:encrypt algorithm="Blowfish" />
	</secure-properties:config>
	<configuration-properties
			file="mule-artifact.properties" />
	<http:request-config
			name="HTTP_Request_configuration"
			doc:name="HTTP Request configuration"
			>
		<http:request-connection host="127.0.0.1"
								 port="8087"/>
	</http:request-config>
	<http:listener-config name="HTTP_Listener_config"
						  doc:name="HTTP Listener config"
						  >
		<http:listener-connection host="0.0.0.0"
								  port="8082" />
	</http:listener-config>
	<http:listener-config
			name="HTTP_Listener_config1_Test" doc:name="HTTP Listener config">
		<http:listener-connection host="127.0.0.1"
								  port="8087" usePersistentConnections="false"
								  connectionIdleTimeout="4000" />
	</http:listener-config>
	<bigquery:config name="BigQuery__Configuration"
					 doc:name="BigQuery  Configuration"
					 >
		<bigquery:oauth2-connection projectId="${config.projectId}">
			<bigquery:oauth-authorization-code
					consumerKey="${secure::config.consumerKey}"
					consumerSecret="${secure::config.consumerSecret}"
					resourceOwnerId="demo" />
			<bigquery:oauth-callback-config
					listenerConfig="HTTP_Listener_config1_Test" callbackPath="/callback"
					authorizePath="/authorize" />
		</bigquery:oauth2-connection>
	</bigquery:config>
	<flow name="queryFlow">
		<http:listener doc:name="Listener"
					   config-ref="HTTP_Listener_config" path="/query" />
		<bigquery:query doc:name="Run Query create schema" config-ref="BigQuery__Configuration" responseTimeout="300" responseTimeoutUnit="SECONDS" >
			<bigquery:query-values-content ><![CDATA[#[%dw 2.0
output application/json
---
payload]]]></bigquery:query-values-content>
		</bigquery:query>
		<foreach doc:name="For Each" >
			<ee:transform doc:name="Transform Message">
				<ee:message>
					<ee:set-payload><![CDATA[%dw 2.0
output application/json
var resultt = read(payload."output","application/json")
---
((resultt.f) map ((item, index) ->
        {(payload.attributes.tableSchema.fields[index].name as String) : item.v}
    ))
    reduce ((item, accumulator) -> accumulator ++ item)
]]></ee:set-payload>
				</ee:message>
			</ee:transform>
			<logger level="INFO" doc:name="Logger" message="#[payload]"/>
		</foreach>
	</flow>
</mule>
```

### Steps for Running This Example

1.  Verify that your connector is configured.

2.  Save the project.

3.  Click the **Authorize** button for OAuth2 authorization.

4.  From a web browser, test the application by entering `http://{app-name}.cloudhub.io`.

## Use On Table Row

This Mule flow uses the **On Table Row** source.

This example uses the following operations:

- **On Table Row**  
  Returns all rows of a table based on a watermark

  Enter the following values:

  <table><colgroup><col> <col></colgroup><thead><tr><th>Field</th><th>Value</th></tr></thead><tbody><tr><td><p><strong>Scheduling Strategy</strong></p></td><td><div><div><p><code>Fixed Frequency</code></p></div></div></td></tr><tr><td><p><strong>Frequency</strong></p></td><td><div><div><p><code>1000</code></p></div></div></td></tr><tr><td><p><strong>Start delay</strong></p></td><td><div><div><p><code>0</code></p></div></div></td></tr><tr><td><p><strong>Time unit</strong></p></td><td><div><div><p><code>MILLISECONDS (Default)</code></p></div></div></td></tr><tr><td><p><strong>Dataset name</strong></p></td><td><div><div><p><code>test124</code></p></div></div></td></tr><tr><td><p><strong>Table name</strong></p></td><td><div><div><p><code>table_data</code></p></div></div></td></tr><tr><td><p><strong>Watermark column</strong></p></td><td><div><div><p><code>id</code></p></div></div></td></tr><tr><td><p><strong>Since</strong></p></td><td><div><div><p><code>1</code></p></div></div></td></tr><tr><td><p><strong>Column id</strong></p></td><td><div><div><p><code>id</code></p></div></div></td></tr></tbody></table>

- **Logger**  
  Shows the HTTP response from the **On Table Row** source

- **Transform Message**  
  Outputs the results of the **On Table Row** source in JSON format

  %dw 2.0 output application/json
  ---

  payload

![Studio Flow for the On Table Row source](/mulesoft/current/en-us/google-bigquery-connector/1.2/_images/on-table-row.png)

### XML for This Example

Paste this code into the Studio XML editor to quickly load the flow for this example into your Mule
app:

```xml
<?xml version="1.0" encoding="UTF-8"?>

<mule xmlns:ee="http://www.mulesoft.org/schema/mule/ee/core"
	  xmlns:os="http://www.mulesoft.org/schema/mule/os"
	  xmlns:http="http://www.mulesoft.org/schema/mule/http"
	  xmlns:bigquery="http://www.mulesoft.org/schema/mule/bigquery"
	  xmlns="http://www.mulesoft.org/schema/mule/core"
	  xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
	  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	  xmlns:secure-properties="http://www.mulesoft.org/schema/mule/secure-properties"
	  xsi:schemaLocation="
http://www.mulesoft.org/schema/mule/ee/core http://www.mulesoft.org/schema/mule/ee/core/current/mule-ee.xsd http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/bigquery http://www.mulesoft.org/schema/mule/bigquery/current/mule-bigquery.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.mulesoft.org/schema/mule/os http://www.mulesoft.org/schema/mule/os/current/mule-os.xsd
		http://www.mulesoft.org/schema/mule/secure-properties http://www.mulesoft.org/schema/mule/secure-properties/current/mule-secure-properties.xsd">
	<secure-properties:config name="Secure_Properties_Config_demo" doc:name="Secure Properties Config"  file="mule-artifact.properties" key="mulesoft" >
		<secure-properties:encrypt algorithm="Blowfish" />
	</secure-properties:config>

	<configuration-properties
			file="mule-artifact.properties" />
	<http:request-config
			name="HTTP_Request_configuration"
			doc:name="HTTP Request configuration"
			>
		<http:request-connection host="127.0.0.1"
								 port="8087"/>
	</http:request-config>
	<http:listener-config name="HTTP_Listener_config"
						  doc:name="HTTP Listener config"
						  >
		<http:listener-connection host="0.0.0.0"
								  port="8082" />
	</http:listener-config>
	<http:listener-config
			name="HTTP_Listener_config1_Test" doc:name="HTTP Listener config">
		<http:listener-connection host="127.0.0.1"
								  port="8087" usePersistentConnections="false"
								  connectionIdleTimeout="4000" />
	</http:listener-config>
	<bigquery:config name="BigQuery__Configuration"
					 doc:name="BigQuery  Configuration"
					 >
		<bigquery:oauth2-connection projectId="${config.projectId}">
			<bigquery:oauth-authorization-code
					consumerKey="${secure::config.consumerKey}"
					consumerSecret="${secure::config.consumerSecret}"
					resourceOwnerId="demo" />
			<bigquery:oauth-callback-config
					listenerConfig="HTTP_Listener_config1_Test" callbackPath="/callback"
					authorizePath="/authorize" />
		</bigquery:oauth2-connection>
	</bigquery:config>
	<flow name="onTableRow">
		<bigquery:on-table-row doc:name="On Table Row"
							   config-ref="BigQuery__Configuration" datasetName="test124"
							   tableName="table_data" watermarkColumn="id" since="'1'"
							   columnId="id">
			<scheduling-strategy>
				<fixed-frequency />
			</scheduling-strategy>
		</bigquery:on-table-row>
		<logger level="INFO" doc:name="Logger" />
		<ee:transform doc:name="Transform Message">
			<ee:message>
				<ee:set-payload><![CDATA[%dw 2.0
output application/json
---
payload]]></ee:set-payload>
			</ee:message>
		</ee:transform>
	</flow>
</mule>
```

### Steps for Running This Example

1.  Verify that your connector is configured.

2.  Save the project.

3.  Click the **Authorize** button for OAuth2 authorization.

4.  From a web browser, test the application by entering `http://{app-name}.cloudhub.io`.

## Authorize

This Mule flow authorizes the connection.

This example uses the following operations:

- **HTTP Listener**  
  Accepts data from HTTP requests

- **Request**  
  Consumes an HTTP service

  Enter the following values:

  <table><colgroup><col> <col></colgroup><thead><tr><th>Field</th><th>Value</th></tr></thead><tbody><tr><td><p><strong>Method</strong></p></td><td><div><div><p><code>GET (Default)</code></p></div></div></td></tr><tr><td><p><strong>Path</strong></p></td><td><div><div><p><code>/authorize?resourceOwnerId=demo</code></p></div></div></td></tr><tr><td><p><strong>Body</strong></p></td><td><div><div><p><code>payload</code></p></div></div></td></tr></tbody></table>

- **Logger**  
  Shows the HTTP response from the **Request** operation

![Studio Flow for the Request operation](/mulesoft/current/en-us/google-bigquery-connector/1.2/_images/authorize.png)

### XML for This Example

Paste this code into the Studio XML editor to quickly load the flow for this example into your Mule
app:

```xml
<?xml version="1.0" encoding="UTF-8"?>

<mule xmlns:ee="http://www.mulesoft.org/schema/mule/ee/core"
	  xmlns:os="http://www.mulesoft.org/schema/mule/os"
	  xmlns:http="http://www.mulesoft.org/schema/mule/http"
	  xmlns:bigquery="http://www.mulesoft.org/schema/mule/bigquery"
	  xmlns="http://www.mulesoft.org/schema/mule/core"
	  xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
	  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	  xmlns:secure-properties="http://www.mulesoft.org/schema/mule/secure-properties"
	  xsi:schemaLocation="
http://www.mulesoft.org/schema/mule/ee/core http://www.mulesoft.org/schema/mule/ee/core/current/mule-ee.xsd http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/bigquery http://www.mulesoft.org/schema/mule/bigquery/current/mule-bigquery.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.mulesoft.org/schema/mule/os http://www.mulesoft.org/schema/mule/os/current/mule-os.xsd
		http://www.mulesoft.org/schema/mule/secure-properties http://www.mulesoft.org/schema/mule/secure-properties/current/mule-secure-properties.xsd">
	<secure-properties:config name="Secure_Properties_Config_demo" doc:name="Secure Properties Config"  file="mule-artifact.properties" key="mulesoft" >
		<secure-properties:encrypt algorithm="Blowfish" />
	</secure-properties:config>

	<configuration-properties
			file="mule-artifact.properties" />
	<http:request-config
			name="HTTP_Request_configuration"
			doc:name="HTTP Request configuration"
			>
		<http:request-connection host="127.0.0.1"
								 port="8087"/>
	</http:request-config>
	<http:listener-config name="HTTP_Listener_config"
						  doc:name="HTTP Listener config"
						  >
		<http:listener-connection host="0.0.0.0"
								  port="8082" />
	</http:listener-config>
	<http:listener-config
			name="HTTP_Listener_config1_Test" doc:name="HTTP Listener config">
		<http:listener-connection host="127.0.0.1"
								  port="8087" usePersistentConnections="false"
								  connectionIdleTimeout="4000" />
	</http:listener-config>
	<bigquery:config name="BigQuery__Configuration"
					 doc:name="BigQuery  Configuration"
					 >
		<bigquery:oauth2-connection projectId="${config.projectId}">
			<bigquery:oauth-authorization-code
					consumerKey="${secure::config.consumerKey}"
					consumerSecret="${secure::config.consumerSecret}"
					resourceOwnerId="demo" />
			<bigquery:oauth-callback-config
					listenerConfig="HTTP_Listener_config1_Test" callbackPath="/callback"
					authorizePath="/authorize" />
		</bigquery:oauth2-connection>
	</bigquery:config>
	<flow name="authorize">
		<http:listener doc:name="/authorize"
					   config-ref="HTTP_Listener_config" path="/authorize">
			<http:response>
				<http:headers><![CDATA[#[{'content-type' : 'text/html'}]]]></http:headers>
			</http:response>
		</http:listener>
		<http:request method="GET" doc:name="Request"
					  config-ref="HTTP_Request_configuration"
					  path="/authorize?resourceOwnerId=demo">
		</http:request>
		<logger level="INFO" doc:name="Logger"
			 message="#[payload]" />
	</flow>
</mule>
```

### Steps for Running This Example

1.  Verify that your connector is configured.

2.  Save the project.

3.  Click the **Authorize** button for OAuth2 authorization.

4.  From a web browser, test the application by entering `http://{app-name}.cloudhub.io`.

## Render an HTML Form

This Mule flow renders the HTML form.

This example uses the following operations:

- **HTTP Listener**  
  Accepts data from HTTP requests

- **Parse Template**  
  Processes a template

  Enter the following values:

  <table><colgroup><col> <col></colgroup><thead><tr><th>Field</th><th>Value</th></tr></thead><tbody><tr><td><p><strong>Location</strong></p></td><td><div><div><p><code>index.html</code></p></div></div></td></tr></tbody></table>

![Studio Flow for the Parse Template component](/mulesoft/current/en-us/google-bigquery-connector/1.2/_images/html-form.png)

### XML for This Example

Paste this code into the Studio XML editor to quickly load the flow for this example into your Mule
app:

```xml
<?xml version="1.0" encoding="UTF-8"?>

<mule xmlns:ee="http://www.mulesoft.org/schema/mule/ee/core"
	  xmlns:os="http://www.mulesoft.org/schema/mule/os"
	  xmlns:http="http://www.mulesoft.org/schema/mule/http"
	  xmlns:bigquery="http://www.mulesoft.org/schema/mule/bigquery"
	  xmlns="http://www.mulesoft.org/schema/mule/core"
	  xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
	  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	  xmlns:secure-properties="http://www.mulesoft.org/schema/mule/secure-properties"
	  xsi:schemaLocation="
http://www.mulesoft.org/schema/mule/ee/core http://www.mulesoft.org/schema/mule/ee/core/current/mule-ee.xsd http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/bigquery http://www.mulesoft.org/schema/mule/bigquery/current/mule-bigquery.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.mulesoft.org/schema/mule/os http://www.mulesoft.org/schema/mule/os/current/mule-os.xsd
		http://www.mulesoft.org/schema/mule/secure-properties http://www.mulesoft.org/schema/mule/secure-properties/current/mule-secure-properties.xsd">
	<secure-properties:config name="Secure_Properties_Config_demo" doc:name="Secure Properties Config"  file="mule-artifact.properties" key="mulesoft" >
		<secure-properties:encrypt algorithm="Blowfish" />
	</secure-properties:config>

	<configuration-properties
			file="mule-artifact.properties" />
	<http:request-config
			name="HTTP_Request_configuration"
			doc:name="HTTP Request configuration"
			>
		<http:request-connection host="127.0.0.1"
								 port="8087"/>
	</http:request-config>
	<http:listener-config name="HTTP_Listener_config"
						  doc:name="HTTP Listener config"
						  >
		<http:listener-connection host="0.0.0.0"
								  port="8082" />
	</http:listener-config>
	<http:listener-config
			name="HTTP_Listener_config1_Test" doc:name="HTTP Listener config">
		<http:listener-connection host="127.0.0.1"
								  port="8087" usePersistentConnections="false"
								  connectionIdleTimeout="4000" />
	</http:listener-config>
	<bigquery:config name="BigQuery__Configuration"
					 doc:name="BigQuery  Configuration"
					 >
		<bigquery:oauth2-connection projectId="${config.projectId}">
			<bigquery:oauth-authorization-code
					consumerKey="${secure::config.consumerKey}"
					consumerSecret="${secure::config.consumerSecret}"
					resourceOwnerId="demo" />
			<bigquery:oauth-callback-config
					listenerConfig="HTTP_Listener_config1_Test" callbackPath="/callback"
					authorizePath="/authorize" />
		</bigquery:oauth2-connection>
	</bigquery:config>
	<flow name="html-form-flow">
		<http:listener doc:name="/"
					   config-ref="HTTP_Listener_config" path="/">
			<http:response>
				<http:headers><![CDATA[#[{'content-type' : 'text/html'}]]]></http:headers>
			</http:response>
		</http:listener>
		<parse-template doc:name="Parse Template"
						location="index.html" />
	</flow>
</mule>
```

### Steps for Running This Example

1.  Verify that your connector is configured.

2.  Save the project.

3.  Click the **Authorize** button for OAuth2 authorization.

4.  From a web browser, test the application by entering `http://{app-name}.cloudhub.io`.

## See Also

- [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors)

- [Salesforce Help](https://help.salesforce.com)
