Menu
AWS Glue
Developer Guide

CatalogConnection Class

__init__

Returns an AWS Glue catalog client from AWS boto3.

__init__(glueContext, **kwargs)

  • glueContext – The GlueContext to use.

  • **kwargs – These are the same arguments that are passed to boto3.client.

 Database Methods

create_database

create_database(**kwargs)

Returns True if the new database was successfully created, or False if it was not.

**kwargs :

  • catalogId – The ID of the catalog in which to create the database.

  • database – The database-definition object to create.

get_database

get_database(**kwargs)

Returns True if the requested database was successfully retrieved, or False if it was not.

**kwargs :

  • catalogId – The ID of the catalog from which to retrieve the database.

  • name – The name of the database to retrieve.

list_databases

list_databases(**kwargs)

Returns a list of database names.

**kwargs :

  • catalogId – The ID of the catalog from which to retrieve a list of databases.

  • pattern – A regular-expression pattern that each name must match in the list of database names that is returned (required).

drop_database

drop_database(**kwargs)

Returns True if the database was successfully dropped from the catalog, or False if it was not.

**kwargs :

  • catalogId – The ID of the catalog from which to drop the database.

  • name – The name of the database to drop (required).

  • deleteData – If True, the data in the database should be deleted and the database should be dropped from the catalog.

  • ignoreUnknownDb – If True, an unrecognized database should be treated as successfully dropped.

  • cascade – If True, dependent databases should also be dropped.

 Table Methods

create_table

create_table(**kwargs)

Returns True if the table was successfully created, or False if it was not.

**kwargs :

  • catalogId – The ID of the catalog in which to create the table.

  • databaseName – The name of the database in which to create the table.

  • name – The name of the table to create.

alter_table

alter_table(**kwargs)

Returns True if the table was successfully changed, or False if it was not.

**kwargs :

  • catalogId – The ID of the catalog in which to create the table.

  • databaseName – The name of the database where the table resides.

  • name – The name of the table to change.

get_table

get_table(**kwargs)

Returns the requested table object from the catalog.

**kwargs :

  • catalogId – The ID of the catalog from which to retrieve the table.

  • databaseName – The name of the database where the table resides.

  • name – The name of the table to retrieve.

list_tables

list_tables(**kwargs)

Returns a list of table names.

**kwargs :

  • catalogId – The ID of the catalog in which to create the table.

  • databaseName – The name of the database where the table resides.

  • pattern – A regular-expression pattern that each name must match in the list of table names that is returned (required).

  • name – The name of the table to create.

drop_table

drop_table(**kwargs)

Returns True if the table was successfully dropped, or False if it was not.

**kwargs :

  • catalogId – The ID of the catalog from which to drop the table.

  • databaseName – The name of the database from which to drop the table.

  • name – The name of the table to drop.

  • deleteData – If True, the data in the table should be deleted and the table object should be dropped from the catalog.

  • ignoreUnknownTab – If True, an unrecognized table should be treated as successfully dropped.

  • ifPurge – If True, all related data should also be purged.