LakeFormation / Client / start_query_planning

start_query_planning#

LakeFormation.Client.start_query_planning(**kwargs)#

Submits a request to process a query statement.

This operation generates work units that can be retrieved with the GetWorkUnits operation as soon as the query state is WORKUNITS_AVAILABLE or FINISHED.

See also: AWS API Documentation

Request Syntax

response = client.start_query_planning(
    QueryPlanningContext={
        'CatalogId': 'string',
        'DatabaseName': 'string',
        'QueryAsOfTime': datetime(2015, 1, 1),
        'QueryParameters': {
            'string': 'string'
        },
        'TransactionId': 'string'
    },
    QueryString='string'
)
Parameters:
  • QueryPlanningContext (dict) –

    [REQUIRED]

    A structure containing information about the query plan.

    • CatalogId (string) –

      The ID of the Data Catalog where the partition in question resides. If none is provided, the Amazon Web Services account ID is used by default.

    • DatabaseName (string) – [REQUIRED]

      The database containing the table.

    • QueryAsOfTime (datetime) –

      The time as of when to read the table contents. If not set, the most recent transaction commit time will be used. Cannot be specified along with TransactionId.

    • QueryParameters (dict) –

      A map consisting of key-value pairs.

      • (string) –

        • (string) –

    • TransactionId (string) –

      The transaction ID at which to read the table contents. If this transaction is not committed, the read will be treated as part of that transaction and will see its writes. If this transaction has aborted, an error will be returned. If not set, defaults to the most recent committed transaction. Cannot be specified along with QueryAsOfTime.

  • QueryString (string) –

    [REQUIRED]

    A PartiQL query statement used as an input to the planner service.

Return type:

dict

Returns:

Response Syntax

{
    'QueryId': 'string'
}

Response Structure

  • (dict) –

    A structure for the output.

    • QueryId (string) –

      The ID of the plan query operation can be used to fetch the actual work unit descriptors that are produced as the result of the operation. The ID is also used to get the query state and as an input to the Execute operation.

Exceptions

  • LakeFormation.Client.exceptions.InternalServiceException

  • LakeFormation.Client.exceptions.InvalidInputException

  • LakeFormation.Client.exceptions.AccessDeniedException

  • LakeFormation.Client.exceptions.ThrottledException