Glue / Client / get_entity_records

get_entity_records#

Glue.Client.get_entity_records(**kwargs)#

This API is used to query preview data from a given connection type or from a native Amazon S3 based Glue Data Catalog.

Returns records as an array of JSON blobs. Each record is formatted using Jackson JsonNode based on the field type defined by the DescribeEntity API.

Spark connectors generate schemas according to the same data type mapping as in the DescribeEntity API. Spark connectors convert data to the appropriate data types matching the schema when returning rows.

See also: AWS API Documentation

Request Syntax

response = client.get_entity_records(
    ConnectionName='string',
    CatalogId='string',
    EntityName='string',
    NextToken='string',
    DataStoreApiVersion='string',
    ConnectionOptions={
        'string': 'string'
    },
    FilterPredicate='string',
    Limit=123,
    OrderBy='string',
    SelectedFields=[
        'string',
    ]
)
Parameters:
  • ConnectionName (string) – The name of the connection that contains the connection type credentials.

  • CatalogId (string) – The catalog ID of the catalog that contains the connection. This can be null, By default, the Amazon Web Services Account ID is the catalog ID.

  • EntityName (string) –

    [REQUIRED]

    Name of the entity that we want to query the preview data from the given connection type.

  • NextToken (string) – A continuation token, included if this is a continuation call.

  • DataStoreApiVersion (string) – The API version of the SaaS connector.

  • ConnectionOptions (dict) –

    Connector options that are required to query the data.

    • (string) –

      • (string) –

  • FilterPredicate (string) – A filter predicate that you can apply in the query request.

  • Limit (integer) –

    [REQUIRED]

    Limits the number of records fetched with the request.

  • OrderBy (string) – A parameter that orders the response preview data.

  • SelectedFields (list) –

    List of fields that we want to fetch as part of preview data.

    • (string) –

Return type:

dict

Returns:

Response Syntax

{
    'Records': [
        {...}|[...]|123|123.4|'string'|True|None,
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) –

    • Records (list) –

      A list of the requested objects.

    • NextToken (string) –

      A continuation token, present if the current segment is not the last.

Exceptions