Skip to content

Retrieves the definitions of some or all of the tables in a given Database

Description

Retrieves the definitions of some or all of the tables in a given Database.

Usage

glue_get_tables(CatalogId, DatabaseName, Expression, NextToken,
  MaxResults, TransactionId, QueryAsOfTime, AuditContext,
  ResourceShareType, IncludeStatusDetails, AttributesToGet)

Arguments

  • CatalogId

    The ID of the Data Catalog where the tables reside. If none is provided, the Amazon Web Services account ID is used by default.

  • DatabaseName

    [required] The database in the catalog whose tables to list. For Hive compatibility, this name is entirely lowercase.

  • Expression

    A regular expression pattern. If present, only those tables whose names match the pattern are returned.

  • NextToken

    A continuation token, included if this is a continuation call.

  • MaxResults

    The maximum number of tables to return in a single response.

  • TransactionId

    The transaction ID at which to read the table contents.

  • QueryAsOfTime

    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.

  • AuditContext

    A structure containing the Lake Formation audit context.

  • ResourceShareType

    Specifies which tables the get_tables call returns. The allowable values are FEDERATED or ALL.

    • If set to FEDERATED, returns only federated tables, which reference an entity outside the Glue Data Catalog.
    • If set to ALL, returns all tables in the database, both federated and non-federated.
  • IncludeStatusDetails

    Specifies whether to include status details related to a request to create or update an Glue Data Catalog view.

  • AttributesToGet

    Specifies the table fields returned by the get_tables call. This parameter doesn’t accept an empty list. The request must include NAME.

    The following are the valid combinations of values:

    • NAME - Names of all tables in the database.
    • NAME, TABLE_TYPE - Names of all tables and the table types.

Value

A list with the following syntax:

list(
  TableList = list(
    list(
      Name = "string",
      DatabaseName = "string",
      Description = "string",
      Owner = "string",
      CreateTime = as.POSIXct(
        "2015-01-01"
      ),
      UpdateTime = as.POSIXct(
        "2015-01-01"
      ),
      LastAccessTime = as.POSIXct(
        "2015-01-01"
      ),
      LastAnalyzedTime = as.POSIXct(
        "2015-01-01"
      ),
      Retention = 123,
      StorageDescriptor = list(
        Columns = list(
          list(
            Name = "string",
            Type = "string",
            Comment = "string",
            Parameters = list(
              "string"
            )
          )
        ),
        Location = "string",
        AdditionalLocations = list(
          "string"
        ),
        InputFormat = "string",
        OutputFormat = "string",
        Compressed = TRUE|FALSE,
        NumberOfBuckets = 123,
        SerdeInfo = list(
          Name = "string",
          SerializationLibrary = "string",
          Parameters = list(
            "string"
          )
        ),
        BucketColumns = list(
          "string"
        ),
        SortColumns = list(
          list(
            Column = "string",
            SortOrder = 123
          )
        ),
        Parameters = list(
          "string"
        ),
        SkewedInfo = list(
          SkewedColumnNames = list(
            "string"
          ),
          SkewedColumnValues = list(
            "string"
          ),
          SkewedColumnValueLocationMaps = list(
            "string"
          )
        ),
        StoredAsSubDirectories = TRUE|FALSE,
        SchemaReference = list(
          SchemaId = list(
            SchemaArn = "string",
            SchemaName = "string",
            RegistryName = "string"
          ),
          SchemaVersionId = "string",
          SchemaVersionNumber = 123
        )
      ),
      PartitionKeys = list(
        list(
          Name = "string",
          Type = "string",
          Comment = "string",
          Parameters = list(
            "string"
          )
        )
      ),
      ViewOriginalText = "string",
      ViewExpandedText = "string",
      TableType = "string",
      Parameters = list(
        "string"
      ),
      CreatedBy = "string",
      IsRegisteredWithLakeFormation = TRUE|FALSE,
      TargetTable = list(
        CatalogId = "string",
        DatabaseName = "string",
        Name = "string",
        Region = "string"
      ),
      CatalogId = "string",
      VersionId = "string",
      FederatedTable = list(
        Identifier = "string",
        DatabaseIdentifier = "string",
        ConnectionName = "string",
        ConnectionType = "string"
      ),
      ViewDefinition = list(
        IsProtected = TRUE|FALSE,
        IsManaged = TRUE|FALSE,
        Definer = "string",
        ViewVersionId = 123,
        ViewVersionToken = "string",
        RefreshSeconds = 123,
        LastRefreshType = "FULL"|"INCREMENTAL",
        SubObjects = list(
          "string"
        ),
        SubObjectVersionIds = list(
          123
        ),
        SubObjectsStatistics = list(
          list(
            SourceType = "HIVE_PARQUET"|"HIVE_ORC"|"HIVE_CSV"|"HIVE_JSON"|"PLAIN_PARQUET"|"ICEBERG",
            GlueVersionId = "string",
            PartitionCount = 123,
            FileCount = 123,
            TotalFileBytes = 123
          )
        ),
        Representations = list(
          list(
            Dialect = "REDSHIFT"|"ATHENA"|"SPARK",
            DialectVersion = "string",
            ViewOriginalText = "string",
            ViewExpandedText = "string",
            ValidationConnection = "string",
            IsStale = TRUE|FALSE
          )
        ),
        SparkPipelineInfo = list(
          "string"
        )
      ),
      IsMultiDialectView = TRUE|FALSE,
      IsMaterializedView = TRUE|FALSE,
      IcebergTableMetadata = list(
        FormatVersion = "string",
        TableUuid = "string",
        Location = "string",
        Properties = list(
          "string"
        ),
        Schemas = list(
          list(
            SchemaId = 123,
            IdentifierFieldIds = list(
              123
            ),
            Type = "struct",
            Fields = list(
              list(
                Id = 123,
                Name = "string",
                Type = list(),
                Required = TRUE|FALSE,
                Doc = "string",
                InitialDefault = list(),
                WriteDefault = list()
              )
            )
          )
        ),
        CurrentSchemaId = 123,
        LastColumnId = 123,
        PartitionSpecs = list(
          list(
            Fields = list(
              list(
                SourceId = 123,
                Transform = "string",
                Name = "string",
                FieldId = 123
              )
            ),
            SpecId = 123
          )
        ),
        DefaultSpecId = 123,
        LastPartitionId = 123,
        SortOrders = list(
          list(
            OrderId = 123,
            Fields = list(
              list(
                SourceId = 123,
                Transform = "string",
                Direction = "asc"|"desc",
                NullOrder = "nulls-first"|"nulls-last"
              )
            )
          )
        ),
        DefaultSortOrderId = 123
      ),
      Status = list(
        RequestedBy = "string",
        UpdatedBy = "string",
        RequestTime = as.POSIXct(
          "2015-01-01"
        ),
        UpdateTime = as.POSIXct(
          "2015-01-01"
        ),
        Action = "UPDATE"|"CREATE",
        State = "QUEUED"|"IN_PROGRESS"|"SUCCESS"|"STOPPED"|"FAILED",
        Error = list(
          ErrorCode = "string",
          ErrorMessage = "string"
        ),
        Details = list(
          RequestedChange = list(),
          ViewValidations = list(
            list(
              Dialect = "REDSHIFT"|"ATHENA"|"SPARK",
              DialectVersion = "string",
              ViewValidationText = "string",
              UpdateTime = as.POSIXct(
                "2015-01-01"
              ),
              State = "QUEUED"|"IN_PROGRESS"|"SUCCESS"|"STOPPED"|"FAILED",
              Error = list(
                ErrorCode = "string",
                ErrorMessage = "string"
              )
            )
          )
        )
      )
    )
  ),
  NextToken = "string"
)

Request syntax

svc$get_tables(
  CatalogId = "string",
  DatabaseName = "string",
  Expression = "string",
  NextToken = "string",
  MaxResults = 123,
  TransactionId = "string",
  QueryAsOfTime = as.POSIXct(
    "2015-01-01"
  ),
  AuditContext = list(
    AdditionalAuditContext = "string",
    RequestedColumns = list(
      "string"
    ),
    AllColumnsRequested = TRUE|FALSE
  ),
  ResourceShareType = "FEDERATED"|"ALL",
  IncludeStatusDetails = TRUE|FALSE,
  AttributesToGet = list(
    "NAME"|"TABLE_TYPE"|"DEFAULT"|"LATEST_ICEBERG_METADATA"
  )
)