id = "sqlmesh" name = "SQLMesh" homepage = "https://sqlmesh.readthedocs.io" description = "SQLMesh is a next-generation data transformation framework designed to ship data quickly, efficiently, and without error." # SQLMesh's own favicon, the SVG the documentation site serves. icon = "https://sqlmesh.readthedocs.io/en/stable/_readthedocs/html/favicon.svg" executables = ["sqlmesh"] [dotfiles] # https://sqlmesh.readthedocs.io/en/stable/guides/configuration/ — "SQLMesh # configuration parameters can be set as environment variables, in a # configuration file in the ~/.sqlmesh folder, and in the configuration file # within a project folder", and the connections guide says a gateway "can be # done in either the config.yaml file in your project folder, or the one in # ~/.sqlmesh". # # The four names are sqlmesh/core/config/common.py: # ALL_CONFIG_FILENAMES = ("config.py", "config.yml", "config.yaml", # "sqlmesh.yml", "sqlmesh.yaml") # # For personal paths (~/.sqlmesh/) where python config is not supported # YAML_CONFIG_FILENAMES = tuple(n for n in ALL_CONFIG_FILENAMES # if not n.endswith(".py")) # and the directory is sqlmesh/core/constants.py: # SQLMESH_PATH = Path(os.getenv("SQLMESH_HOME") or Path.home() / ".sqlmesh") # config.py is project-only, so it is not listed here. paths = [ "~/.sqlmesh/config.yaml", "~/.sqlmesh/config.yml", "~/.sqlmesh/sqlmesh.yaml", "~/.sqlmesh/sqlmesh.yml", ] exclude = [] # Not a whole-file secret: gateway names, dialect and model defaults are the # point of the personal config. The connection credentials are lifted out. secret = [] # Read when a command starts; the CLI and the web UI both reload it on the # next run rather than holding it. side_effect = false # Every personal file name, or the credential is only lifted out of whichever # spelling this machine happens to use. # # A gateway is `gateways..`, # so the second `*` covers all three. The field names come from # sqlmesh/core/config/connection.py: `password` (Snowflake, Postgres, Redshift, # MySQL, MSSQL, Trino, StarRocks…), `token` (MotherDuck, Snowflake OAuth, # BigQuery), `access_token` (Databricks), `private_key` and # `private_key_passphrase` (Snowflake key-pair auth), `client_secret` and # `keyfile_json` (BigQuery service accounts). # # `env_vars` is the personal config's own escape hatch — loader.py reads it # before anything else and exports it into the process — and the docs point # users at env vars precisely so credentials do not sit in the file, which # makes it the place they end up. [[dotfiles.secret_paths]] file = [ "~/.sqlmesh/config.yaml", "~/.sqlmesh/config.yml", "~/.sqlmesh/sqlmesh.yaml", "~/.sqlmesh/sqlmesh.yml", ] match = { key_path = [ "gateways.*.*.password", "gateways.*.*.token", "gateways.*.*.access_token", "gateways.*.*.private_key", "gateways.*.*.private_key_passphrase", "gateways.*.*.client_secret", "gateways.*.*.keyfile_json", "env_vars.*", ] } [commands] format = 1 label = "SQLMesh" description = "Plan, run and test a SQLMesh project. Global project options are on the root; init, audit, migrate and the UI are left out." quality = "ai-draft" base = "fig:sqlmesh" parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = false } [[commands.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/sqlmesh.ts" license = "MIT" [[commands.subcommand]] path = ["plan"] label = "Plan and apply changes" description = "Show the plan for local changes against an environment and optionally apply it." [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/sqlmesh.ts" license = "MIT" [[commands.subcommand.field]] id = "environment" label = "Environment" type = "string" position = 0 description = "Target environment, default prod." sources = ["fig"] [[commands.subcommand.field]] id = "create_from" label = "Create from" type = "string" option = ["--create-from"] description = "Environment to create the target from if missing." sources = ["fig"] [[commands.subcommand.field]] id = "skip_tests" label = "Skip tests" type = "boolean" option = ["--skip-tests"] description = "Skip tests before generating the plan." sources = ["fig"] [[commands.subcommand.field]] id = "forward_only" label = "Forward-only" type = "boolean" option = ["--forward-only"] description = "Create a plan for forward-only changes." sources = ["fig"] [[commands.subcommand.field]] id = "no_gaps" label = "No gaps" type = "boolean" option = ["--no-gaps"] description = "Ensure new snapshots have no data gaps." sources = ["fig"] [[commands.subcommand.field]] id = "skip_backfill" label = "Skip backfill" type = "boolean" option = ["--skip-backfill"] description = "Only create a virtual update." sources = ["fig"] [[commands.subcommand.field]] id = "restate_model" label = "Restate models" type = "string" option = ["--restate-model"] description = "Restate data for the models and those downstream." multiple = true sources = ["fig"] [[commands.subcommand.field]] id = "select_model" label = "Select models" type = "string" option = ["--select-model"] description = "Select specific model changes for the plan." multiple = true sources = ["fig"] [[commands.subcommand.field]] id = "no_prompts" label = "No prompts" type = "boolean" option = ["--no-prompts"] description = "Disable interactive prompts." sources = ["fig"] [[commands.subcommand.field]] id = "auto_apply" label = "Auto apply" type = "boolean" option = ["--auto-apply"] description = "Apply the plan automatically after creation." effect = "exec" sources = ["fig"] [[commands.subcommand.field]] id = "verbose" label = "Verbose" type = "boolean" option = ["--verbose"] description = "Enable verbose output." sources = ["fig"] [[commands.subcommand.task]] id = "dev" label = "Plan a dev environment" fields = ["environment", "skip_tests", "select_model"] required = ["environment"] [[commands.subcommand.task]] id = "prod" label = "Plan and apply" set = { no_prompts = [true], auto_apply = [true] } fields = ["environment", "no_prompts", "auto_apply"] required = [] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["environment", "skip_tests", "select_model", "no_prompts", "auto_apply"] [[commands.subcommand.group]] id = "advanced" label = "Advanced" fields = ["create_from", "forward_only", "no_gaps", "skip_backfill", "restate_model", "verbose"] [[commands.subcommand]] path = ["run"] label = "Run missing intervals" description = "Evaluate missing intervals for an environment." [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/sqlmesh.ts" license = "MIT" [[commands.subcommand.field]] id = "environment" label = "Environment" type = "string" position = 0 description = "Target environment, default prod." sources = ["fig"] [[commands.subcommand.task]] id = "run" label = "Run" fields = ["environment"] required = [] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["environment"] [[commands.subcommand]] path = ["test"] label = "Run unit tests" description = "Run model unit tests." [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/sqlmesh.ts" license = "MIT" [[commands.subcommand.task]] id = "test" label = "Run tests" fields = [] required = [] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = []