package python import ( "github.com/versenilvis/iris/spec" ) func init() { spec.Register(&spec.Spec{ Name: "sqlmesh", Description: "SQLMesh command line tool", Subcommands: []spec.Subcommand{ {Name: "init", Description: "Create a new SQLMesh repository"}, {Name: "render", Description: "Render a model's query, optionally expanding referenced models"}, {Name: "evaluate", Description: "Evaluate a model and return a dataframe with a default limit of 1000"}, {Name: "format", Description: "Format all SQL models and audits"}, {Name: "diff", Description: "Show the diff between the local state and the target environment"}, {Name: "plan", Description: "Apply local changes to the target environment"}, {Name: "run", Description: "Evaluate missing intervals for the target environment"}, {Name: "janitor", Description: "Run the janitor process on-demand"}, {Name: "dag", Description: "Render the DAG as an html file"}, {Name: "create_test", Description: "Generate a unit test fixture for a given model"}, {Name: "test", Description: "Run model unit tests"}, {Name: "audit", Description: "Run audits for the target model(s)"}, {Name: "ui", Description: "Start a browser-based SQLMesh UI"}, {Name: "migrate", Description: "Migrate SQLMesh to the current running version"}, {Name: "rollback", Description: "Rollback SQLMesh to the previous migration"}, {Name: "create_external_models", Description: "Create a schema file containing external model schemas"}, }, Options: []spec.Option{ {Name: "--paths", Description: "Paths to SQLMesh project files"}, {Name: "--config", Description: "Path to config file"}, {Name: "--gateway", Description: "The name of the gateway"}, {Name: "--ignore-warnings", Description: "Ignore warnings"}, {Name: "--debug", Description: "Enable debug mode"}, {Name: "--log-to-stdout", Description: "Display logs in stdout"}, {Name: "--log-file-dir", Description: "The directory to write log files to"}, {Name: "-t", Description: "Project template. Supported values: airflow, dbt, dlt, default, empty"}, {Name: "--dlt-pipeline", Description: "Render a model's query, optionally expanding referenced models"}, {Name: "--dialect", Description: "The SQL dialect to render the query as"}, {Name: "--no-format", Description: "Disable fancy formatting of the query"}, {Name: "--start", Description: "Start time for the render"}, {Name: "--end", Description: "End time for the render"}, {Name: "--execution-time", Description: "Execution time for the render"}, {Name: "--expand", Description: "Expand referenced models"}, {Name: "--limit", Description: "The number of rows which the query should be limited to"}, {Name: "--append-newline", Description: "Include a newline at the end of each file"}, {Name: "--no-rewrite-casts", Description: "Preserve the existing casts, without rewriting them to use the :: syntax"}, {Name: "--normalize", Description: "Whether or not to normalize identifiers to lowercase"}, {Name: "--pad", Description: "Determines the pad size in a formatted string"}, {Name: "--indent", Description: "Determines the indentation size in a formatted string"}, {Name: "--normalize-functions", Description: "Whether or not to normalize all function names"}, {Name: "--leading-comma", Description: "Determines whether or not the comma is leading or trailing in select expressions"}, {Name: "--max-text-width", Description: "Whether or not to check formatting (but not actually format anything)"}, {Name: "--create-from", Description: "Skip tests prior to generating the plan if they are defined"}, {Name: "--restate-model", Description: "Restate data for specified models and models downstream from the one specified"}, {Name: "--no-gaps", Description: "Ensure that new snapshots have no data gaps when comparing to existing snapshots"}, {Name: "--skip-backfill", Description: "Skip the backfill step and only create a virtual update for the plan"}, {Name: "--empty-backfill", Description: "Produce empty backfill"}, {Name: "--forward-only", Description: "Create a plan for forward-only changes"}, {Name: "--allow-destructive-model", Description: "The effective date from which to apply forward-only changes on production"}, {Name: "--no-prompts", Description: "Disable interactive prompts for the backfill time range"}, {Name: "--auto-apply", Description: "Automatically apply the new plan after creation"}, {Name: "--no-auto-categorization", Description: "Disable automatic change categorization"}, {Name: "--include-unmodified", Description: "Include unmodified models in the target environment"}, {Name: "--select-model", Description: "Select specific model changes that should be included in the plan"}, {Name: "--backfill-model", Description: "Backfill only the models whose names match the expression"}, {Name: "--no-diff", Description: "Hide text differences for changed models"}, {Name: "--run", Description: "Run latest intervals as part of the plan application (prod environment only)"}, {Name: "--enable-preview", Description: "Enable preview for forward-only models when targeting a development environment"}, }, }) }