SQL DDL

Example Output

personinfo.sql

(sqlite syntax)

Overview

Docs

Command Line

gen-sqlddl

Generate SQL DDL representation

gen-sqlddl [OPTIONS] YAMLFILE

Options

--dialect <dialect>

SQL-Alchemy dialect, e.g. sqlite, mysql+odbc

Default

sqlite

--sqla-file <sqla_file>

Path to sqlalchemy generated python

--python-import <python_import>

Python import header for generated sql-alchemy code

--direct-mapping, --no-direct-mapping

Map classes directly to

Default

False

--use-foreign-keys, --no-use-foreign-keys

Emit FK declarations

Default

True

-f, --format <format>

Output format

Default

sql

Options

sql

--metadata, --no-metadata

Include metadata in output

Default

True

--useuris, --metauris

Include metadata in output

Default

True

-im, --importmap <importmap>

Import mapping file

--log_level <log_level>

Logging level

Default

WARNING

Options

CRITICAL | ERROR | WARNING | INFO | DEBUG

-v, --verbose

verbosity

--mergeimports, --no-mergeimports

Merge imports into source file (default=mergeimports)

Arguments

YAMLFILE

Required argument

Code