Glue / Client / update_database

update_database#

Glue.Client.update_database(**kwargs)#

Updates an existing database definition in a Data Catalog.

See also: AWS API Documentation

Request Syntax

response = client.update_database(
    CatalogId='string',
    Name='string',
    DatabaseInput={
        'Name': 'string',
        'Description': 'string',
        'LocationUri': 'string',
        'Parameters': {
            'string': 'string'
        },
        'CreateTableDefaultPermissions': [
            {
                'Principal': {
                    'DataLakePrincipalIdentifier': 'string'
                },
                'Permissions': [
                    'ALL'|'SELECT'|'ALTER'|'DROP'|'DELETE'|'INSERT'|'CREATE_DATABASE'|'CREATE_TABLE'|'DATA_LOCATION_ACCESS',
                ]
            },
        ],
        'TargetDatabase': {
            'CatalogId': 'string',
            'DatabaseName': 'string',
            'Region': 'string'
        },
        'FederatedDatabase': {
            'Identifier': 'string',
            'ConnectionName': 'string'
        }
    }
)
Parameters:
  • CatalogId (string) – The ID of the Data Catalog in which the metadata database resides. If none is provided, the Amazon Web Services account ID is used by default.

  • Name (string) –

    [REQUIRED]

    The name of the database to update in the catalog. For Hive compatibility, this is folded to lowercase.

  • DatabaseInput (dict) –

    [REQUIRED]

    A DatabaseInput object specifying the new definition of the metadata database in the catalog.

    • Name (string) – [REQUIRED]

      The name of the database. For Hive compatibility, this is folded to lowercase when it is stored.

    • Description (string) –

      A description of the database.

    • LocationUri (string) –

      The location of the database (for example, an HDFS path).

    • Parameters (dict) –

      These key-value pairs define parameters and properties of the database.

      These key-value pairs define parameters and properties of the database.

      • (string) –

        • (string) –

    • CreateTableDefaultPermissions (list) –

      Creates a set of default permissions on the table for principals. Used by Lake Formation. Not used in the normal course of Glue operations.

      • (dict) –

        Permissions granted to a principal.

        • Principal (dict) –

          The principal who is granted permissions.

          • DataLakePrincipalIdentifier (string) –

            An identifier for the Lake Formation principal.

        • Permissions (list) –

          The permissions that are granted to the principal.

          • (string) –

    • TargetDatabase (dict) –

      A DatabaseIdentifier structure that describes a target database for resource linking.

      • CatalogId (string) –

        The ID of the Data Catalog in which the database resides.

      • DatabaseName (string) –

        The name of the catalog database.

      • Region (string) –

        Region of the target database.

    • FederatedDatabase (dict) –

      A FederatedDatabase structure that references an entity outside the Glue Data Catalog.

      • Identifier (string) –

        A unique identifier for the federated database.

      • ConnectionName (string) –

        The name of the connection to the external metastore.

Return type:

dict

Returns:

Response Syntax

{}

Response Structure

  • (dict) –

Exceptions

  • Glue.Client.exceptions.EntityNotFoundException

  • Glue.Client.exceptions.InvalidInputException

  • Glue.Client.exceptions.InternalServiceException

  • Glue.Client.exceptions.OperationTimeoutException

  • Glue.Client.exceptions.GlueEncryptionException

  • Glue.Client.exceptions.ConcurrentModificationException

  • Glue.Client.exceptions.FederationSourceException

  • Glue.Client.exceptions.FederationSourceRetryableException

  • Glue.Client.exceptions.AlreadyExistsException