TableManager¶
- class felis.tap_schema.TableManager(engine=None, initialize_database=False, schema_name=None, table_name_postfix='')¶
Bases:
object
Manage creation of TAP_SCHEMA tables.
- Parameters:
engine (
Engine
|None
, default:None
) – The SQLAlchemy engine for reflecting the TAP_SCHEMA tables from an existing database. Ifinitialize_database
is True, this engine will be used to create the tables. If None, an in-memory SQLite database will be used.schema_name (
str
|None
, default:None
) – The name of the schema to use for the TAP_SCHEMA tables. If None, the standard name of ‘TAP_SCHEMA’ will be used.table_name_postfix (
str
, default:''
) – A string which will be appended to each of the standard table names. This needs to be used in a way such that the resultant table names map to tables existing tables within a TAP_SCHEMA database.initialize_database (
bool
, default:False
)
Attributes Summary
Get the metadata for the TAP_SCHEMA tables.
Get the TAP_SCHEMA schema.
Methods Summary
Get the standard schema name for the TAP_SCHEMA tables.
Get the standard column names for the TAP_SCHEMA tables.
Get the path to the standard TAP_SCHEMA schema resource.
Get the standard TAP_SCHEMA schema resource.
Load the standard TAP_SCHEMA schema from a Felis package resource into a Felis
Schema
.Attributes Documentation
- metadata¶
Get the metadata for the TAP_SCHEMA tables.
- Returns:
The metadata for the TAP_SCHEMA tables.
- Return type:
Methods Documentation
- classmethod get_schema_name_std()¶
Get the standard schema name for the TAP_SCHEMA tables.
- Returns:
The standard schema name for the TAP_SCHEMA tables.
- Return type:
- classmethod get_table_names_std()¶
Get the standard column names for the TAP_SCHEMA tables.
- Returns:
The standard table names for the TAP_SCHEMA tables.
- Return type:
- classmethod get_tap_schema_std_path()¶
Get the path to the standard TAP_SCHEMA schema resource.
- Returns:
The path to the standard TAP_SCHEMA schema resource.
- Return type:
- classmethod get_tap_schema_std_resource()¶
Get the standard TAP_SCHEMA schema resource.
- Returns:
The standard TAP_SCHEMA schema resource.
- Return type: