Add sqlmesh-airflow skill - #252
Open
coleheflin wants to merge 1 commit into
Open
Conversation
Moved from astronomer/hosted-skills#12 per @akshayarora's review: better suited to OSS than the gated hosted-skills repo. Co-Authored-By: Otto <noreply@astronomer.io>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a new skill,
sqlmesh-airflow, covering how to orchestrate an open-source SQLMesh project from an Airflow DAG.Why this gap
There's no existing skill for SQLMesh, and it's easy for an agent (or a human) to get this wrong by:
sqlmesh plan(deploy-time, interactive/CI) withsqlmesh run(scheduled, unattended) and auto-applying plans on every DAG tickapache-airflow-providers-sqlmeshpackage exists (it does not — verified against PyPI) or that SQLMesh's ownsqlmesh.schedulers.airflowmodule is still current (it was removed upstream; only Tobiko Cloud's paid facade remains)config.yamlinstead of sourcing them from an Airflow connectionContextat DAG parse time instead of inside a taskWhat's covered
planvsrunsplit and where each belongsSQLMESH__GATEWAYS__<GATEWAY>__CONNECTION__<FIELD>env-var override schemesqlmesh runtask) vs per-model task granularity, with the tradeoffs specific to SQLMesh (unlike dbt, a single task usually isn't wasteful since SQLMesh already computes incremental intervals)Context()instantiationValidation
Beyond the initial research pass (PyPI 404 for the non-existent provider package, GitHub API check confirming
sqlmesh/schedulers/is now an empty stub), I had a second agent independently live-test this skill end-to-end against a real SQLMesh project (sqlmesh init duckdb,sqlmesh==0.236.1):sqlmesh plan --auto-applythensqlmesh runand confirmed the exact behavior the skill describes (auto-apply applies immediately with no further gate;runcorrectly no-ops until an interval is due)gateways.<name>.connection/default_gatewayconfig shape viasqlmesh initContext(paths=..., gateway=...)andcontext.run(environment=, start=, end=, ...)signatures viainspect.signature, and executedcontext.run(...)successfullysqlmesh-dag-generatoris a real, actively-maintained PyPI package (not hallucinated)SQLMESH__GATEWAYS__<GATEWAY_NAME>__CONNECTION__<FIELD>explicitly (verified live) and wiring it into Step 4'sContext()call, which was previously disconnected from the gateway resolved in Step 3.🤖 Generated by Otto