Command Line Interface

felis

Felis 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

--id-generation

Generate IDs for all objects that do not have them

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

felis create [OPTIONS] FILE

Options

--engine-url <engine_url>

SQLAlchemy Engine URL

--schema-name <schema_name>

Alternate schema name to override Felis file

--initialize

Create the schema in the database if it does not exist (error if already exists)

--drop

Drop schema if it already exists in the database (implies –initialize)

--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

--ignore-constraints

Ignore constraints when creating tables

Arguments

FILE

Required argument

Environment variables

FELIS_ENGINE_URL

Provide a default for --engine-url

diff

Compare two schemas or a schema and a database for changes

Examples:

felis diff schema1.yaml schema2.yaml

felis diff -c alembic schema1.yaml schema2.yaml

felis diff –engine-url sqlite:///test.db schema.yaml

felis diff [OPTIONS] [FILES]...

Options

--engine-url <engine_url>

SQLAlchemy Engine URL

-c, --comparator <comparator>

Comparator to use for schema comparison

Options:

alembic | deepdiff

-E, --error-on-change

Exit with error code if schemas are different

Arguments

FILES

Optional argument(s)

Environment variables

FELIS_ENGINE_URL

Provide a default for --engine-url

init-tap-schema

Initialize a standard TAP_SCHEMA database

felis init-tap-schema [OPTIONS]

Options

--engine-url <engine_url>

SQLAlchemy Engine URL

--tap-schema-name <tap_schema_name>

Name of the TAP_SCHEMA schema in the database

--tap-tables-postfix <tap_tables_postfix>

Postfix which is applied to standard TAP_SCHEMA table names

Environment variables

FELIS_ENGINE_URL

Provide a default for --engine-url

load-tap-schema

Load metadata from a Felis file into a TAP_SCHEMA database

felis load-tap-schema [OPTIONS] FILE

Options

--engine-url <engine_url>

SQLAlchemy Engine URL

--tap-schema-name <tap_schema_name>

Name of the TAP_SCHEMA schema in the database (default: TAP_SCHEMA)

--tap-tables-postfix <tap_tables_postfix>

Postfix which is applied to standard TAP_SCHEMA table names

--tap-schema-index <tap_schema_index>

TAP_SCHEMA index of the schema in this environment

--dry-run

Execute dry run only. Does not insert any data.

--echo

Print out the generated insert statements to stdout

--output-file <output_file>

Write SQL commands to a file

Arguments

FILE

Required argument

Environment variables

FELIS_ENGINE_URL

Provide a default for --engine-url

validate

Validate one or more Felis YAML files

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)