Google BigQuery
Google BigQuery is the autonomous data to AI platform, automating the entire data life cycle, from ingestion to AI-driven insights, so you can go from data to AI to action faster.
Categories: Artificial Intelligence
Type: googleBigQuery/v1
Connections
Version: 1
OAuth2 Authorization Code
Properties
| Name | Label | Type | Description | Required |
|---|---|---|---|---|
| clientId | Client Id | STRING | true | |
| clientSecret | Client Secret | STRING | true |
Connection Setup
Create OAuth 2.0 Application
Creation of OAuth 2.0 application is documented here.
Enable BigQuery API
- In the Google Cloud Console, select your project.
- Click on APIs & Services.
- Enter bigquery into search bar and press enter.
- Click on BigQuery API.
- Click on Enable.
Actions
Query
Name: query
Runs a BigQuery SQL query synchronously and returns query results if the query completes within a specified timeout.
Properties
| Name | Label | Type | Description | Required |
|---|---|---|---|---|
| projectId | Project ID | STRING | Project ID of the query request. | true |
| query | Query | STRING | Required. A query string to execute, using Google Standard SQL or legacy SQL syntax. Example: "SELECT COUNT(f1) FROM myProjectId.myDatasetId.myTableId". | true |
| maxResults | Max Results | INTEGER | The maximum number of rows of data to return per page of results. | false |
| timeoutMs | Timeout | INTEGER | Specifies the maximum amount of time, in milliseconds, that the client is willing to wait for the query to complete. By default, this limit is 10 seconds (10,000 milliseconds). | false |
| dryRun | Dry Run | BOOLEAN Optionstrue, false | If set to true, BigQuery doesn't run the job. Instead, if the query is valid, BigQuery returns statistics about the job such as how many bytes would be processed. | false |
| createSession | Create Session | BOOLEAN Optionstrue, false | If true, creates a new session using a randomly generated sessionId. If false, runs query with an existing sessionId passed in ConnectionProperty. | false |
Example JSON Structure
{
"label" : "Query",
"name" : "query",
"parameters" : {
"projectId" : "",
"query" : "",
"maxResults" : 1,
"timeoutMs" : 1,
"dryRun" : false,
"createSession" : false
},
"type" : "googleBigQuery/v1/query"
}Output
Type: OBJECT
Properties
| Name | Type | Description |
|---|---|---|
| kind | STRING | The resource type. |
| schema | OBJECT Properties{[{STRING(name), STRING(type), STRING(mode), [](fields), STRING(description), {[STRING](names)}(policyTags), {STRING(name)}(dataPolicies), STRING(maxLength), STRING(precision), STRING(scale), STRING(roundingMode), STRING(collation), STRING(defaultValueExpression), {STRING(type)}(rangeElementType)}](fields)} | The schema of the results. Present only when the query completes successfully. |
| objectReference | OBJECT Properties{STRING(projectId), STRING(jobId), STRING(location)} | Reference to the Job that was created to run the query. |
| jobCreationReason | OBJECT Properties{STRING(code)} | The reason why a Job was created. |
| queryId | STRING | Auto-generated ID for the query. |
| location | STRING | The geographic location of the query. |
| totalRows | STRING | The total number of rows in the complete query result set, which can be more than the number of rows in this single page of results. |
| pageToken | STRING | A token used for paging results. |
| rows | ARRAY Items[{}] | An object with as many results as can be contained within the maximum permitted reply size. |
| totalBytesProcessed | STRING | The total number of bytes processed for this query. |
| jobComplete | BOOLEAN Optionstrue, false | Whether the query has completed or not. |
| errors | ARRAY Items[{STRING(reason), STRING(location), STRING(debugInfo), STRING(message)}, BOOLEAN(cacheHit), STRING\(numDmlAffectedRows), {STRING(sessionId)}(sessionInfo), {STRING\(insertedRowCount), STRING\(deletedRowCount), STRING\(updatedRowCount)}\(dmlStats), STRING(totalBytesBilled), STRING\(totalSlotMs), STRING(creationTime), STRING\(startTime), STRING($endTime)] | The first errors or warnings encountered during the running of the job. |
Output Example
{
"kind" : "",
"schema" : {
"fields" : [ {
"name" : "",
"type" : "",
"mode" : "",
"fields" : [ ],
"description" : "",
"policyTags" : {
"names" : [ "" ]
},
"dataPolicies" : {
"name" : ""
},
"maxLength" : "",
"precision" : "",
"scale" : "",
"roundingMode" : "",
"collation" : "",
"defaultValueExpression" : "",
"rangeElementType" : {
"type" : ""
}
} ]
},
"objectReference" : {
"projectId" : "",
"jobId" : "",
"location" : ""
},
"jobCreationReason" : {
"code" : ""
},
"queryId" : "",
"location" : "",
"totalRows" : "",
"pageToken" : "",
"rows" : [ { } ],
"totalBytesProcessed" : "",
"jobComplete" : false,
"errors" : [ {
"reason" : "",
"location" : "",
"debugInfo" : "",
"message" : ""
}, false, "", {
"sessionId" : ""
}, {
"insertedRowCount" : "",
"deletedRowCount" : "",
"updatedRowCount" : ""
}, "", "", "", "", "" ]
}What to do if your action is not listed here?
If this component doesn't have the action you need, you can use Custom Action to create your own. Custom Actions empower you to define HTTP requests tailored to your specific requirements, allowing for greater flexibility in integrating with external services or APIs.
To create a Custom Action, simply specify the desired HTTP method, path, and any necessary parameters. This way, you can extend the functionality of your component beyond the predefined actions, ensuring that you can meet all your integration needs effectively.
Additional Instructions
Troubleshooting
Access Blocked: Verification Process Not Completed
Documentation for how to add a test user can be found here
How is this guide?
Last updated on