Command Line Interface

felis

Felis command line tools.

Parameters

log_level

Felis log level.

log_file

Felis log file path.

Notes

These options are used to configure the logging level and file for the command line tools.

felis [OPTIONS] COMMAND [ARGS]...

Options

--version

Show the version and exit.

--log-level <log_level>

Felis log level

Options:

CRITICAL | FATAL | ERROR | WARNING | INFO | DEBUG

--log-file <log_file>

Felis log file path

Environment variables

FELIS_LOGLEVEL

Provide a default for --log-level

FELIS_LOGFILE

Provide a default for --log-file

create

Create database objects from the Felis file.

Parameters

engine_url

SQLAlchemy Engine URL.

schema_name

Alternate schema name to override Felis file.

create_if_not_exists

Create the schema in the database if it does not exist.

drop_if_exists

Drop schema if it already exists in the database.

echo

Echo database commands as they are executed.

dry_run

Dry run only to print out commands instead of executing.

output_file

Write SQL commands to a file instead of executing.

file

Felis file to read.

Notes

This command creates database objects from the Felis file. The --create-if-not-exists or --drop-if-exists flags can be used to create a new MySQL database or PostgreSQL schema if it does not exist already.

felis create [OPTIONS] FILE

Options

--engine-url <engine_url>

SQLAlchemy Engine URL

--schema-name <schema_name>

Alternate schema name to override Felis file

--create-if-not-exists

Create the schema in the database if it does not exist

--drop-if-exists

Drop schema if it already exists in the database

--echo

Echo database commands as they are executed

--dry-run

Dry run only to print out commands instead of executing

-o, --output-file <output_file>

Write SQL commands to a file instead of executing

Arguments

FILE

Required argument

Environment variables

ENGINE_URL

Provide a default for --engine-url

init-tap

Initialize TAP_SCHEMA objects in the database.

Parameters

engine_url

SQLAlchemy Engine URL. The target PostgreSQL schema or MySQL database must already exist and be referenced in the URL.

tap_schema_name

Alterate name for the database schema TAP_SCHEMA.

tap_schemas_table

Alterate table name for schemas.

tap_tables_table

Alterate table name for tables.

tap_columns_table

Alterate table name for columns.

tap_keys_table

Alterate table name for keys.

tap_key_columns_table

Alterate table name for key_columns.

Notes

The supported version of TAP_SCHEMA in the SQLAlchemy metadata is 1.1. The tables are created in the database schema specified by the engine URL, which must be a PostgreSQL schema or MySQL database that already exists.

felis init-tap [OPTIONS] ENGINE_URL

Options

--tap-schema-name <tap_schema_name>

Alternate database schema name for ‘TAP_SCHEMA’

--tap-schemas-table <tap_schemas_table>

Alternate table name for ‘schemas’

--tap-tables-table <tap_tables_table>

Alternate table name for ‘tables’

--tap-columns-table <tap_columns_table>

Alternate table name for ‘columns’

--tap-keys-table <tap_keys_table>

Alternate table name for ‘keys’

--tap-key-columns-table <tap_key_columns_table>

Alternate table name for ‘key_columns’

Arguments

ENGINE_URL

Required argument

load-tap

Load TAP metadata from a Felis file.

This command loads the associated TAP metadata from a Felis YAML file into the TAP_SCHEMA tables.

Parameters

engine_url

SQLAlchemy Engine URL to catalog.

schema_name

Alternate schema name. This overrides the schema name in the catalog field of the Felis file.

catalog_name

Catalog name for the schema. This possibly duplicates the tap_schema_name argument (DM-44870).

dry_run

Dry run only to print out commands instead of executing.

tap_schema_name

Alternate name for the schema of TAP_SCHEMA in the database.

tap_tables_postfix

Postfix for TAP table names that will be automatically appended.

tap_schemas_table

Alternate table name for schemas.

tap_tables_table

Alternate table name for tables.

tap_columns_table

Alternate table name for columns.

tap_keys_table

Alternate table name for keys.

tap_key_columns_table

Alternate table name for key_columns.

tap_schema_index

TAP_SCHEMA index of the schema in this TAP environment.

file

Felis file to read.

Notes

The data will be loaded into the TAP_SCHEMA from the engine URL. The tables must have already been initialized or an error will occur.

felis load-tap [OPTIONS] FILE

Options

--engine-url <engine_url>

SQLAlchemy Engine URL to catalog

--schema-name <schema_name>

Alternate Schema Name for Felis file

--catalog-name <catalog_name>

Catalog Name for Schema

--dry-run

Dry Run Only. Prints out the DDL that would be executed

--tap-schema-name <tap_schema_name>

Alternate schema name for ‘TAP_SCHEMA’

--tap-tables-postfix <tap_tables_postfix>

Postfix for TAP_SCHEMA table names

--tap-schemas-table <tap_schemas_table>

Alternate table name for ‘schemas’

--tap-tables-table <tap_tables_table>

Alternate table name for ‘tables’

--tap-columns-table <tap_columns_table>

Alternate table name for ‘columns’

--tap-keys-table <tap_keys_table>

Alternate table name for ‘keys’

--tap-key-columns-table <tap_key_columns_table>

Alternate table name for ‘key_columns’

--tap-schema-index <tap_schema_index>

TAP_SCHEMA index of the schema in this environment

Arguments

FILE

Required argument

Environment variables

ENGINE_URL

Provide a default for --engine-url

validate

Validate one or more felis YAML files.

Parameters

check_description

Check that all objects have a valid description.

check_redundant_datatypes

Check for redundant type overrides.

check_tap_table_indexes

Check that every table has a unique TAP table index.

check_tap_principal

Check that at least one column per table is flagged as TAP principal.

files

The Felis YAML files to validate.

Raises

click.exceptions.Exit

If any validation errors are found. The ValidationError which is thrown when a schema fails to validate will be logged as an error message.

Notes

All of the check flags are turned off by default and represent optional validations controlled by the Pydantic context.

felis validate [OPTIONS] [FILES]...

Options

--check-description

Check that all objects have a description

--check-redundant-datatypes

Check for redundant datatype overrides

--check-tap-table-indexes

Check that every table has a unique TAP table index

--check-tap-principal

Check that at least one column per table is flagged as TAP principal

Arguments

FILES

Optional argument(s)