Glue / Client / get_table_optimizer

get_table_optimizer#

Glue.Client.get_table_optimizer(**kwargs)#

Returns the configuration of all optimizers associated with a specified table.

See also: AWS API Documentation

Request Syntax

response = client.get_table_optimizer(
    CatalogId='string',
    DatabaseName='string',
    TableName='string',
    Type='compaction'
)
Parameters:
  • CatalogId (string) –

    [REQUIRED]

    The Catalog ID of the table.

  • DatabaseName (string) –

    [REQUIRED]

    The name of the database in the catalog in which the table resides.

  • TableName (string) –

    [REQUIRED]

    The name of the table.

  • Type (string) –

    [REQUIRED]

    The type of table optimizer.

Return type:

dict

Returns:

Response Syntax

{
    'CatalogId': 'string',
    'DatabaseName': 'string',
    'TableName': 'string',
    'TableOptimizer': {
        'type': 'compaction',
        'configuration': {
            'roleArn': 'string',
            'enabled': True|False
        },
        'lastRun': {
            'eventType': 'starting'|'completed'|'failed'|'in_progress',
            'startTimestamp': datetime(2015, 1, 1),
            'endTimestamp': datetime(2015, 1, 1),
            'metrics': {
                'NumberOfBytesCompacted': 'string',
                'NumberOfFilesCompacted': 'string',
                'NumberOfDpus': 'string',
                'JobDurationInHour': 'string'
            },
            'error': 'string'
        }
    }
}

Response Structure

  • (dict) –

    • CatalogId (string) –

      The Catalog ID of the table.

    • DatabaseName (string) –

      The name of the database in the catalog in which the table resides.

    • TableName (string) –

      The name of the table.

    • TableOptimizer (dict) –

      The optimizer associated with the specified table.

      • type (string) –

        The type of table optimizer. Currently, the only valid value is compaction.

      • configuration (dict) –

        A TableOptimizerConfiguration object that was specified when creating or updating a table optimizer.

        • roleArn (string) –

          A role passed by the caller which gives the service permission to update the resources associated with the optimizer on the caller’s behalf.

        • enabled (boolean) –

          Whether table optimization is enabled.

      • lastRun (dict) –

        A TableOptimizerRun object representing the last run of the table optimizer.

        • eventType (string) –

          An event type representing the status of the table optimizer run.

        • startTimestamp (datetime) –

          Represents the epoch timestamp at which the compaction job was started within Lake Formation.

        • endTimestamp (datetime) –

          Represents the epoch timestamp at which the compaction job ended.

        • metrics (dict) –

          A RunMetrics object containing metrics for the optimizer run.

          • NumberOfBytesCompacted (string) –

            The number of bytes removed by the compaction job run.

          • NumberOfFilesCompacted (string) –

            The number of files removed by the compaction job run.

          • NumberOfDpus (string) –

            The number of DPU hours consumed by the job.

          • JobDurationInHour (string) –

            The duration of the job in hours.

        • error (string) –

          An error that occured during the optimizer run.

Exceptions

  • Glue.Client.exceptions.EntityNotFoundException

  • Glue.Client.exceptions.InvalidInputException

  • Glue.Client.exceptions.AccessDeniedException

  • Glue.Client.exceptions.InternalServiceException