Method: sdlConnectors.execute

Full name: projects.locations.instances.sdlConnectors.execute

Execute Query executes the given query in the request and returns the response.

HTTP request

POST https://chronicle.googleapis.com/v1alpha/{parent}/sdlConnectors:execute

Path parameters

Parameters
parent

string

Required. The parent, which points to the customer. Format: projects/{project}/locations/{region}/instances/{instance}/sdlconnector

Request body

The request body contains data with the following structure:

JSON representation
{
  "query": string
}
Fields
query

string

Required. query is the google sql query which is to be executed.

Response body

ExecuteQueryResponse contains the details of the query output.

If successful, the response body contains data with the following structure:

JSON representation
{
  "columns_metadata": [
    {
      object (ColumnMetadata)
    }
  ],
  "query_results": [
    {
      object (QueryResult)
    }
  ]
}
Fields
columns_metadata[]

object (ColumnMetadata)

columnName and datatype returned in result. Repeats for every column

query_results[]

object (QueryResult)

result of query , repeats for every row

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

ColumnMetadata

ColumnMetadata contains details about the column like name and type.

JSON representation
{
  "name": string,
  "datatype": enum (ColumnDataType)
}
Fields
name

string

name of column returned in result

datatype

enum (ColumnDataType)

Datatype of column returned

ColumnDataType

ColumnDataType mentions the data type of the column.

Enums
COLUMN_DATA_TYPE_UNSPECIFIED Default value. This value is unused.
COLUMN_DATA_TYPE_STRING String type
COLUMN_DATA_TYPE_INTEGER Integer type
COLUMN_DATA_TYPE_FLOAT Float type
COLUMN_DATA_TYPE_BOOLEAN Boolean type
COLUMN_DATA_TYPE_SIGNEDINT Signed int type
COLUMN_DATA_TYPE_UNSIGNEDINT Unsigned int type
COLUMN_DATA_TYPE_DATE Date type
COLUMN_DATA_TYPE_TIMESTAMP Timestamp type
COLUMN_DATA_TYPE_OBJECT Object type

QueryResult

Query result contains the result of the query executed.

JSON representation
{
  "columns_value": [
    string
  ]
}
Fields
columns_value[]

string

repeats for every column value