intentdataflow 0.3.10__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. intentdataflow-0.3.10.dist-info/METADATA +191 -0
  2. intentdataflow-0.3.10.dist-info/RECORD +83 -0
  3. intentdataflow-0.3.10.dist-info/WHEEL +5 -0
  4. intentdataflow-0.3.10.dist-info/entry_points.txt +2 -0
  5. intentdataflow-0.3.10.dist-info/licenses/LICENSE +202 -0
  6. intentdataflow-0.3.10.dist-info/licenses/NOTICE +4 -0
  7. intentdataflow-0.3.10.dist-info/top_level.txt +1 -0
  8. intentflow/__init__.py +2 -0
  9. intentflow/auth.py +30 -0
  10. intentflow/business_rules.py +77 -0
  11. intentflow/catalogs.py +100 -0
  12. intentflow/change_review.py +331 -0
  13. intentflow/checks/__init__.py +92 -0
  14. intentflow/checks/airflow3.py +174 -0
  15. intentflow/checks/business.py +27 -0
  16. intentflow/checks/catalog.py +43 -0
  17. intentflow/checks/cluster.py +81 -0
  18. intentflow/checks/contracts.py +79 -0
  19. intentflow/checks/cost.py +35 -0
  20. intentflow/checks/dbt_quality.py +90 -0
  21. intentflow/checks/dbt_run.py +83 -0
  22. intentflow/checks/deep.py +180 -0
  23. intentflow/checks/dq.py +53 -0
  24. intentflow/checks/elementary.py +50 -0
  25. intentflow/checks/external.py +91 -0
  26. intentflow/checks/lakehouse.py +46 -0
  27. intentflow/checks/lint.py +81 -0
  28. intentflow/checks/orchestration.py +148 -0
  29. intentflow/checks/probes.py +66 -0
  30. intentflow/checks/runtime_history.py +94 -0
  31. intentflow/checks/schema_drift.py +92 -0
  32. intentflow/checks/sql_quality.py +274 -0
  33. intentflow/checks/streaming.py +62 -0
  34. intentflow/cli.py +914 -0
  35. intentflow/contracts.py +107 -0
  36. intentflow/datadiff.py +172 -0
  37. intentflow/dbt_loader.py +194 -0
  38. intentflow/dbt_results.py +55 -0
  39. intentflow/dq_results.py +108 -0
  40. intentflow/extensions.py +51 -0
  41. intentflow/external.py +381 -0
  42. intentflow/http_utils.py +89 -0
  43. intentflow/i18n.py +76 -0
  44. intentflow/incidents.py +83 -0
  45. intentflow/integrations.py +139 -0
  46. intentflow/lakehouse.py +62 -0
  47. intentflow/lineage.py +336 -0
  48. intentflow/lineage_api.py +244 -0
  49. intentflow/lineage_oracle.py +374 -0
  50. intentflow/locale/pt.json +1300 -0
  51. intentflow/model.py +43 -0
  52. intentflow/monitoring.py +197 -0
  53. intentflow/notify.py +154 -0
  54. intentflow/ol_emit.py +93 -0
  55. intentflow/openlineage.py +168 -0
  56. intentflow/orchestrators/__init__.py +53 -0
  57. intentflow/orchestrators/airflow.py +69 -0
  58. intentflow/orchestrators/aws.py +93 -0
  59. intentflow/orchestrators/dagster.py +48 -0
  60. intentflow/orchestrators/dbtcloud.py +68 -0
  61. intentflow/orchestrators/extra.py +135 -0
  62. intentflow/orchestrators/ingestion.py +112 -0
  63. intentflow/orchestrators/kestra.py +27 -0
  64. intentflow/orchestrators/more.py +135 -0
  65. intentflow/orchestrators/prefect.py +53 -0
  66. intentflow/orchestrators/spark.py +118 -0
  67. intentflow/otel.py +53 -0
  68. intentflow/overview.py +123 -0
  69. intentflow/preflight.py +363 -0
  70. intentflow/promexport.py +39 -0
  71. intentflow/pyflow.py +554 -0
  72. intentflow/risks.py +178 -0
  73. intentflow/runner.py +264 -0
  74. intentflow/secrets_box.py +84 -0
  75. intentflow/sqlmesh_loader.py +134 -0
  76. intentflow/store.py +1006 -0
  77. intentflow/streaming.py +115 -0
  78. intentflow/totp.py +38 -0
  79. intentflow/warehouses/__init__.py +190 -0
  80. intentflow/warehouses/cloud.py +160 -0
  81. intentflow/warehouses/more.py +342 -0
  82. intentflow/web.html +878 -0
  83. intentflow/web.py +726 -0
@@ -0,0 +1,191 @@
1
+ Metadata-Version: 2.4
2
+ Name: intentdataflow
3
+ Version: 0.3.10
4
+ Summary: Control layer for data pipelines: column lineage, preventive checks, orchestrator visibility and impact of external jobs
5
+ Author: Thiago Egon Lange
6
+ License-Expression: Apache-2.0
7
+ Classifier: Programming Language :: Python :: 3
8
+ Classifier: Topic :: Database
9
+ Requires-Python: >=3.11
10
+ Description-Content-Type: text/markdown
11
+ License-File: LICENSE
12
+ License-File: NOTICE
13
+ Requires-Dist: sqlglot<31,>=25
14
+ Requires-Dist: pyyaml<7,>=6
15
+ Requires-Dist: duckdb<2,>=1.0
16
+ Provides-Extra: postgres
17
+ Requires-Dist: psycopg2-binary; extra == "postgres"
18
+ Provides-Extra: snowflake
19
+ Requires-Dist: snowflake-connector-python; extra == "snowflake"
20
+ Provides-Extra: bigquery
21
+ Requires-Dist: google-cloud-bigquery; extra == "bigquery"
22
+ Provides-Extra: databricks
23
+ Requires-Dist: databricks-sql-connector; extra == "databricks"
24
+ Provides-Extra: kafka
25
+ Requires-Dist: kafka-python-ng; extra == "kafka"
26
+ Provides-Extra: lint
27
+ Requires-Dist: sqlfluff; extra == "lint"
28
+ Provides-Extra: aws
29
+ Requires-Dist: boto3; extra == "aws"
30
+ Provides-Extra: jev
31
+ Requires-Dist: typesafe-sdk; extra == "jev"
32
+ Provides-Extra: mysql
33
+ Requires-Dist: pymysql; extra == "mysql"
34
+ Provides-Extra: secrets
35
+ Requires-Dist: cryptography; extra == "secrets"
36
+ Provides-Extra: lakehouse
37
+ Requires-Dist: deltalake; extra == "lakehouse"
38
+ Requires-Dist: pyiceberg; extra == "lakehouse"
39
+ Provides-Extra: warehouses
40
+ Requires-Dist: trino; extra == "warehouses"
41
+ Requires-Dist: clickhouse-connect; extra == "warehouses"
42
+ Provides-Extra: dev
43
+ Requires-Dist: pytest; extra == "dev"
44
+ Requires-Dist: dbt-core; extra == "dev"
45
+ Requires-Dist: dbt-duckdb; extra == "dev"
46
+ Requires-Dist: moto[glue]; extra == "dev"
47
+ Dynamic: license-file
48
+
49
+ # IntentFlow
50
+
51
+ Verified status, test results, image audit findings and remaining work: [VALIDATION_STATUS](docs/VALIDATION_STATUS.md).
52
+
53
+ [Português](README.pt-BR.md)
54
+
55
+ **One place for the problems of your data pipelines — and a way to catch them before they reach production.**
56
+
57
+ IntentFlow is **not an execution engine** and has **no YAML of its own**: settings and policies live in a local store and are
58
+ managed through the **CLI** or the **UI**. It sits next to what you already run (dbt, SQLMesh, Airflow, Kestra, Spark, OpenLineage,
59
+ warehouses) and:
60
+
61
+ - reads metadata and code (read-only by default);
62
+ - runs preventive *checks* on the pull request, before the job and continuously;
63
+ - traces column lineage, including Spark/Python/SQL jobs outside the project, and shows what breaks if a column changes;
64
+ - groups findings into incidents by root cause and routes them by owner (Slack, webhook, e-mail, PR comment);
65
+ - shows in one screen what is running, failing, at risk and being fixed.
66
+
67
+ The core is open source (Apache-2.0). SSO, per-project governance, governed fixes, AI and corporate integrations are part of
68
+ **IntentFlow Enterprise**: [EDITIONS](docs/EDITIONS.md).
69
+
70
+ ## Problems covered
71
+
72
+ | # | Pain | How it is prevented | Verified with |
73
+ |---|---|---|---|
74
+ | 1 | Upstream changes break consumers (removed/renamed column, type) | catalog diff + column lineage → impact | real dbt (DuckDB and PostgreSQL) |
75
+ | 2 | "What breaks if I change this?" | column lineage (SQLGlot), external jobs (OpenLineage, declared Spark/Python/SQL) | answer key: 10 hard models, precision and recall 100%; real Spark |
76
+ | 3 | Badly written, expensive SQL that runs out of memory | 12 AST rules + cost through `EXPLAIN` + rewrite **checked by execution** | each rule fires on a planted model |
77
+ | 4 | Duplicated keys, abnormal volume | warehouse probes | real DuckDB and PostgreSQL |
78
+ | 5 | Unwanted data change in a PR | **data diff** (rows, keys, changed columns, sample) in the warehouse | real DuckDB and PostgreSQL |
79
+ | 6 | Predictable orchestration failure (no retry/timeout, backfill, secret in the flow YAML) | lint of Airflow DAGs and Kestra flows | sample files |
80
+ | 7 | Cluster memory: OOM, exhaustion, spill, saturated pool | host/Docker/Airflow samples + forecast + warehouse spill | simulated Docker, real Airflow |
81
+ | 8 | Recurring failures, duration regression, SLA and lateness | run history + policies | **real** Airflow and Kestra |
82
+ | 9 | Unmasked PII downstream | propagation through the lineage, also into external jobs | real dbt |
83
+ | 10 | Alert noise | root-cause incidents, anti-spam, `ack` with expiry, false positive rate per check | tested |
84
+ | 11 | "What can break in the whole process?" | `intentflow risks`: visibility gaps, fragile columns, external jobs, process gaps | [RISKS](docs/RISKS.md) |
85
+
86
+ Full catalog: [docs/CHECKS.md](docs/CHECKS.md).
87
+
88
+ Full setup: [INSTALLATION](docs/INSTALLATION.md). The commands below assume Bash/Linux and an activated venv. For dbt runtime findings, preserve build run_results before docs generation as described in [CHECKS](docs/CHECKS.md).
89
+
90
+ ## Business rules and pre-production validation (Unreleased)
91
+
92
+ Declare native dbt tests with `tags: [business_rule]` and `meta.owner`. The Business rules page/`intentflow rules` shows results, owners, impact and the last 20 observed executions. `intentflow preflight` requires a fresh full-build result, catalog coverage, a trusted baseline and required checks; it blocks failures, skips and unavailable validation. Existing pre-run `gate` remains available.
93
+
94
+ `intentflow changes` and the Changes before production page expose removed/changed tests, contracts, schemas and incremental/freshness policies against the baseline. Preflight blocks changes needing review even if the remaining tests pass. See [CHANGE_REVIEW](docs/CHANGE_REVIEW.md) for exact acknowledgements, impact and limitations.
95
+
96
+ See [BUSINESS_RULES](docs/BUSINESS_RULES.md) for SQL/business examples and [PREFLIGHT](docs/PREFLIGHT.md) for CI/commit provenance, contracts, warning policies and limits. These source-checkout additions are not included in older release wheels. Configure a required CI/deployment gate to enforce the result.
97
+
98
+ ## Usage (CLI)
99
+
100
+ ```bash
101
+ # from a release wheel (https://github.com/ailake-io/IntentFlow-community/releases):
102
+ python -m venv .venv && .venv/bin/python -m pip install /path/to/intentflow-*.whl
103
+ # or from this source checkout:
104
+ python -m venv .venv && .venv/bin/pip install -e '.[dev,secrets]'
105
+ source .venv/bin/activate
106
+
107
+ # one-time setup (in the store; connection credentials through environment variables)
108
+ intentflow config set dbt.target project/target
109
+ intentflow config set airflow.url http://airflow:8080
110
+ intentflow policy pii-allow customers # policies
111
+ intentflow policy sla airflow:etl 30 # SLA in minutes
112
+ intentflow notify add-sink data --type slack --url-env SLACK_URL
113
+ intentflow notify route data --min-severity high
114
+
115
+ # day to day
116
+ intentflow check --format github --fail-on high # CI
117
+ intentflow gate --stage pre-run # gate before dbt (Airflow/Kestra)
118
+ intentflow diff --base prod.orders --head dev.orders --key id --sample-pct 5 # huge table: ~5 % of the keys (hash), with an estimate of the total
119
+ intentflow lineage --column orders.status --impact # what this column affects (direct, indirect and external jobs)
120
+ intentflow risks --base main/target # what can break in the whole process
121
+ intentflow watch # scheduler: collect, check, notify
122
+ intentflow ui # http://127.0.0.1:8787 (local mode; see docs/DEPLOYMENT.md for a team)
123
+ intentflow user add maria --role admin # team mode: token login, roles, MFA, per-person audit trail
124
+
125
+ # OpenLineage input (Airflow, Spark, dbt, Flink, Dagster…)
126
+ intentflow openlineage serve --port 5000
127
+ ```
128
+
129
+ This installs the Community core only. Enterprise is a separate, private extension and requires customer access plus a valid license. Its
130
+ package metadata requires `intentdataflow>=0.3.10` and `cryptography`; pip installs or reuses those dependencies when they are available from the
131
+ configured package sources. If the Community distribution is provided as a separate wheel, install both wheels together. Enterprise registers
132
+ through the `intentflow.extensions` entry point. See [EDITIONS](docs/EDITIONS.md) for package relationships and installation options.
133
+
134
+ ### Language
135
+
136
+ The CLI, the UI and the findings come in **English** or **Portuguese**. The CLI follows `INTENTFLOW_LANG` (`en`/`pt`) or the
137
+ system locale (`LANG=pt_BR.UTF-8`). The UI follows the browser language and has a selector at the bottom of the sidebar.
138
+ Finding ids do not depend on the language, so switching never reopens findings.
139
+
140
+ ## UI
141
+
142
+ `intentflow ui` (light/dark theme): overview with indicators, incidents, findings (filters, details with recommendation, acknowledge,
143
+ false positive), lineage and impact graph, data diff, pipelines, cluster/memory, integrations, settings by form, team and audit, and a
144
+ guided welcome screen the first time. With Enterprise: fixes with step by step (proposed → approved → validated → applied),
145
+ AI suggestions, SSO and per-project roles.
146
+
147
+ ## How to measure the lineage on YOUR project
148
+
149
+ ```bash
150
+ dbt build && dbt docs generate
151
+ intentflow lineage-verify --target target --duckdb warehouse.duckdb --package my_package
152
+ ```
153
+ It perturbs the source data, rebuilds the models and compares with the static lineage (precision, recall, what indirect dependency explains).
154
+ On a large database: `--sample-rows 1000` (shrinks each source in the temporary **copy**, by key hash) and `--source NAME[.column]` (limits the sources).
155
+ Method and numbers on the real jaffle project: [BENCHMARKS](docs/BENCHMARKS.md).
156
+
157
+ ## Verified against real systems (local)
158
+
159
+ dbt 1.12 with DuckDB **and** PostgreSQL 18 · SQLMesh 0.236 · Airflow 2.10 and **3.1** (APIs v1/v2, with a real OpenLineage emitter) · Kestra ·
160
+ Prefect · Dagster · Spark 3.5 (with the OpenLineage listener) · Kafka/Schema Registry (Redpanda) · Trino · ClickHouse · MySQL · Flink · Kubernetes ·
161
+ Prometheus · OpenTelemetry · SQLFluff · Delta/Iceberg · Airbyte · BigQuery (emulator) · Argo Workflows · Mage · Marquez · Mailpit · Mattermost ·
162
+ real outputs of Great Expectations 1.24 and Soda 3.5 · Keycloak 26 · PostgreSQL 18 as the store · Docker/host.
163
+
164
+ ## Limits you need to know
165
+
166
+ - **Lineage:** answer key of 10 hard models (windows, unnest, union, pivot, macro, self-join, `exclude`), two sample projects and
167
+ Snowflake/BigQuery/Databricks fixtures. Measured with the dynamic oracle on real public dbt projects (jaffle-shop, dbt-project-evaluator,
168
+ ra_data_warehouse): **the impact never underestimated** (100 % recall at model level); **precision** is only a lower bound (~40 %). No
169
+ third-party production pipeline has been measured yet: [BENCH_REAL_PROJECT](docs/BENCH_REAL_PROJECT.md) and the [PILOT](docs/PILOT.md) guide.
170
+ - **External jobs:** Python analysis is heuristic (it never runs the code). Dynamic code (`exec`, `eval`, `getattr`), UDFs and `mapInPandas`
171
+ make the output conservative; `if/else` adds both branches. Without `columnLineage`/`feeds`/`sql_file`/`py_file` propagation is conservative.
172
+ - **Scale (measured):** synthetic lineage of 5,000 models / 56 thousand columns in ~11 s cold (4 processes) and 0.6 s cached; on a real
173
+ project expect ~3× more per model. `INTENTFLOW_WORKERS` sets the processes.
174
+ - **Load safety:** reading a SQLMesh project runs its code; it requires `INTENTFLOW_SQLMESH_ALLOW_EXEC=1` or the JSON from `sqlmesh-export`.
175
+ - **Cloud:** Snowflake, Databricks (SQL and Jobs), Redshift and Fivetran were tested **only with simulated responses**; BigQuery, with the
176
+ emulator. AWS (Glue, Step Functions, Athena, Glue Catalog) only on the `moto` emulator; Azure Data Factory and Unity Catalog only simulated.
177
+ How to connect each one: [CLOUD_SETUP](docs/CLOUD_SETUP.md).
178
+ - **False positives:** the rate per check is measured from your feedback; there is no real usage data yet.
179
+ - **Translations:** findings are stored in the language of the process that ran the check.
180
+
181
+ ## Documentation
182
+
183
+ [PILOT](docs/PILOT.md) (guide to try it on a real pipeline) · [RISKS](docs/RISKS.md) · [DEPLOYMENT](docs/DEPLOYMENT.md) (team, roles, TLS) ·
184
+ [ARCHITECTURE](docs/ARCHITECTURE.md) · [CHECKS](docs/CHECKS.md) · [INTEGRATIONS](docs/INTEGRATIONS.md) · [CLOUD_SETUP](docs/CLOUD_SETUP.md) ·
185
+ [BENCHMARKS](docs/BENCHMARKS.md) · [BENCH_REAL_PROJECT](docs/BENCH_REAL_PROJECT.md) · [ROADMAP](docs/ROADMAP.md) · [DECISIONS](docs/DECISIONS.md) ·
186
+ [EDITIONS](docs/EDITIONS.md) · Portuguese: [docs/pt-BR](docs/pt-BR/)
187
+
188
+ ## License
189
+
190
+ Open source core under [Apache-2.0](LICENSE). SSO, per-project governance, governed fixes, AI and corporate integrations form the commercial
191
+ edition: [EDITIONS](docs/EDITIONS.md). Copyright (c) 2026 Thiago Egon Lange, see [NOTICE](NOTICE). [CONTRIBUTING](CONTRIBUTING.md) · [SECURITY](SECURITY.md) · [CHANGELOG](CHANGELOG.md)
@@ -0,0 +1,83 @@
1
+ intentdataflow-0.3.10.dist-info/licenses/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
2
+ intentdataflow-0.3.10.dist-info/licenses/NOTICE,sha256=iK8Zw2wM2ABNY0RgBoftb_qsHHNsVccsvhjb7eZn99k,111
3
+ intentflow/__init__.py,sha256=fOGEZG8GHnHq23CJ4rlpHmHkIBN8MFpcvc6oal0KZzc,99
4
+ intentflow/auth.py,sha256=fyBbcOI8hpBgrNNnSjtQA_pbtCO4BA3g-SoNHKWvLak,1305
5
+ intentflow/business_rules.py,sha256=EAxBlnLv0EtrD3KjdGzyv3iJ4FnOvJiyqYWr3hIpuvs,3635
6
+ intentflow/catalogs.py,sha256=wR75cbqe9IM2stO-iwTBdvkS9Jt4amemVF__RW5zWmc,4793
7
+ intentflow/change_review.py,sha256=wQA5gW1uCwnMOkq-4q_aPipuYBMLs3KZlqQ9h5wHxzQ,20233
8
+ intentflow/cli.py,sha256=ypv8Jeu2b8JpohfEfqCkOaNdmdeOzdbVQiF83G7B94U,44623
9
+ intentflow/contracts.py,sha256=zeVEx__r2pueFIeMc065uL0oi1toOpJavUh5NoDSzfY,4495
10
+ intentflow/datadiff.py,sha256=-ysLolySg8PB36M_YNffD5ISvK5aedbDzPhXHaYGbQE,10472
11
+ intentflow/dbt_loader.py,sha256=81xW3h6QXwZYt9_UPUQYt9giW4xkjJliHO_Wwwgxy0g,10377
12
+ intentflow/dbt_results.py,sha256=hNHfKcFWSEk0dje1mC_BZCU9X2h9oz6NgQPWYgKW16o,2716
13
+ intentflow/dq_results.py,sha256=tLOZGiPBcG1BEbjAhKlcRiN14RT-d8bMFdt7Irq3_iE,4932
14
+ intentflow/extensions.py,sha256=gnpuoREu7_BqIBEZXeWvzL-JXyVWNq5IkTKKXmIEYJs,2012
15
+ intentflow/external.py,sha256=w2adu0e_1ue2H5Nz-FhC0VHX-QmYPbMPGfnEmi3kRuw,19008
16
+ intentflow/http_utils.py,sha256=IptulsMtpsE5U8lmzUNpPJ8Dy3h67KgMBtgvOLUlMJU,3677
17
+ intentflow/i18n.py,sha256=cHa4_zmMveaMdTJKRuoydwUYb8yxYpz8mHdyDFG-lZ0,2430
18
+ intentflow/incidents.py,sha256=MO9_bePlYoC3vyLR2u74CCrHhxpxBXV6yk2ipgb4IVE,3616
19
+ intentflow/integrations.py,sha256=1U7vmzX4etgxyRFox-FyH1tTQuUdylkn7GMUC4TcTcs,9268
20
+ intentflow/lakehouse.py,sha256=NgI3_hf2EPeLneIhGHdsbQZ6ufBpgbGrw-lPExhlbjs,2906
21
+ intentflow/lineage.py,sha256=IJg0jfAh292zgX-3CgxgZ6CnFheWtDmjv4jUmC-HRAE,15951
22
+ intentflow/lineage_api.py,sha256=brxUpa2DuHVeejswIJ8X16gqJOF8G7dTs_zA1KOlZmQ,13046
23
+ intentflow/lineage_oracle.py,sha256=LJj_0yGmtpWyF0MLVvtfbPM4E_nXLxogwhHg9H6j9Aw,20256
24
+ intentflow/model.py,sha256=Yh7CTBW6Qh4t_wbacmOeCDnvP2rAjJTWs1PfGECd4ok,1368
25
+ intentflow/monitoring.py,sha256=gc0o2_YIpJ3zx8_jQZ8wa_GhOWJ3vSJDStH-V0UAGRs,9063
26
+ intentflow/notify.py,sha256=s6J51-3yVdfwwV98sNtt2D9nB2EA1cWa_Z4gXxeUDGc,7740
27
+ intentflow/ol_emit.py,sha256=sTXGw6rLphcdKodU2CWrWOLLv-I2cFkVLiXSpCLSA_c,4684
28
+ intentflow/openlineage.py,sha256=ZMMHIR6VyxMU_L0kx77lV7ppcWRjntPJ_z_VpxXbcAk,8698
29
+ intentflow/otel.py,sha256=hjlbc8i77ng4htXw6F1_RSYzoJEwI29szvl3NuO3sLU,2771
30
+ intentflow/overview.py,sha256=dPQ0XwzQX0ZH3F4MM4bt4ueicSnySNIyxzL87PoTR90,6138
31
+ intentflow/preflight.py,sha256=uJ4HXQR7UgCriQCsUoCHORMaPJXePTXdAWk5ROAAiFA,21859
32
+ intentflow/promexport.py,sha256=MMWrjN_IDEeIkOpHFp9MsEXRuWsCvDbhoYBC9sUGexU,1900
33
+ intentflow/pyflow.py,sha256=kMBQSZuEzA8AMA5h5VfHnwPAAY2-7GhwcS3pwKz2R4I,26305
34
+ intentflow/risks.py,sha256=lBcOcG4FZUNmh9peUadUMtwRhVXKJYHszSMcDp6-L2c,11946
35
+ intentflow/runner.py,sha256=-WgB4qUT9Skgc1qSV9GASWC1NvuNG-LlbyfVTYbdjNs,14717
36
+ intentflow/secrets_box.py,sha256=JBAfkMX7Cj_9LbxZcux0uq11Sr1L_-jCnNTtWFO-xAU,4018
37
+ intentflow/sqlmesh_loader.py,sha256=bE1I0bvFBvH9f3IJ-gzCWHR5E3uzFuCYnUH4gvIVCyk,6243
38
+ intentflow/store.py,sha256=mVJYjXwj1ez5NPcdAr0J46jy3O5RRiEUUjh5m6zyLlE,49252
39
+ intentflow/streaming.py,sha256=zoKFCmpGB4mm53cnOAqW_RF9Oeio5BTIMkaFcoxlQHo,5002
40
+ intentflow/totp.py,sha256=933DtdF15nOcKG85q6TtPlbg20w3PaA9ntA0Ryoae04,1432
41
+ intentflow/web.html,sha256=vxv0UYpqhKrohFOUSOV9slDCveGe0LhePMU_SFVuq_Q,101161
42
+ intentflow/web.py,sha256=qzt1onreHo8PJHtS5r80w_fuz7KfQt4LYXJFOPzOGU8,40491
43
+ intentflow/checks/__init__.py,sha256=kFxIKYLuRqlhCGsYiDyNoonh_OWanKQ57WEiGDfPaXo,3751
44
+ intentflow/checks/airflow3.py,sha256=Ha5OenFds1VW3V4QLrXGT9E0QH9nu4dnsoTLGmUrM5o,10891
45
+ intentflow/checks/business.py,sha256=GgfeTBXsZI1H-PQeyiVpu60zADIpFly5lUqzRZXLG48,1515
46
+ intentflow/checks/catalog.py,sha256=9EAGX-SQbRSIvKC6dKGejd0riU5Eu_FLTaRZ7mKNGPc,2466
47
+ intentflow/checks/cluster.py,sha256=bUGimZC9mUlgURkWqDapdEIYKa5D_fqUzMI2Qt-_e58,4361
48
+ intentflow/checks/contracts.py,sha256=x4XA_V3htwY1fbd8GzUGQoQM2wJRXUnEj-Yl0yFqN1Y,5156
49
+ intentflow/checks/cost.py,sha256=Fb-FLaPlLuIH4W_DC9ieBI1SDcJHGQYR-wN0rVicu5k,2041
50
+ intentflow/checks/dbt_quality.py,sha256=KRMAjtatTlI6zyWMo0Vgg7yrjisQ-KP2PB5WdbQ7MVQ,4666
51
+ intentflow/checks/dbt_run.py,sha256=Fqc-ZjxalB3lFNTfWgJuTQJSpn7BPa_D4LayLH4MrwI,4514
52
+ intentflow/checks/deep.py,sha256=dovmuOJiFQbkmDzd6kC1UZ8VF1tqTAWpOBGLED0BuI4,9660
53
+ intentflow/checks/dq.py,sha256=2hh_RUvoP4zPwmWoHINgt0kle3Gvz7LBfpoq_lF5Xm8,2503
54
+ intentflow/checks/elementary.py,sha256=5DXy7diRsocLjAEzRW7tbQ51G8iv2NfulMqG0H9pEUI,3193
55
+ intentflow/checks/external.py,sha256=tMDHPBVjj6u_JdXEH9nq5KAqjOES4BNoftgGKFnkoyg,5672
56
+ intentflow/checks/lakehouse.py,sha256=JNH5qgqzDDLfUfn9JKAccwOLEN8_iwICyb99zH-VixA,2898
57
+ intentflow/checks/lint.py,sha256=3ruG4DH-X8dR5PHqyVrkW41eQ-qT_O6IK8ehT3wHPD4,4675
58
+ intentflow/checks/orchestration.py,sha256=ll6yL9l7FrjYVLHqc-OoQFZSY-MtWtDrNbzMDMqoDwM,9060
59
+ intentflow/checks/probes.py,sha256=sEyHLvJlmhg0Nd5b8TbC1-Kh3qhTyDJU1Vl5cMeddno,2959
60
+ intentflow/checks/runtime_history.py,sha256=a0O778GcCTUU2VC6SGoWLhqcx6y-qd5LndqT-D25cdA,4684
61
+ intentflow/checks/schema_drift.py,sha256=fe7bYVfmGODGQ1fzIGmQdEXU8qss69i_PzezLJ00bL4,5713
62
+ intentflow/checks/sql_quality.py,sha256=gUjY5AASnnGImJKVPEjUK2Oo8YOd5HDMX3c16UaDUJg,13140
63
+ intentflow/checks/streaming.py,sha256=p-FPQ5ua_-WDaILvW0tBUGdHiNjGQGGK-y9_3pG2-iE,3354
64
+ intentflow/locale/pt.json,sha256=maclDeKTUjsEf2Eqa_i5w63znrH_ljr6ARic99_TmSU,115619
65
+ intentflow/orchestrators/__init__.py,sha256=HbndWqBgWzoOhapzDnaFFXnAOrA_QJWlgnbIOPW8IGQ,1824
66
+ intentflow/orchestrators/airflow.py,sha256=EAUNl8rpLaR2q-SxNYT9IVj3Gdeye3mEnbm7aCwTEGc,3273
67
+ intentflow/orchestrators/aws.py,sha256=ZuOf9pOCsTnOiwiQZz87n9gn0ql2kgF-Nqo9Hl2LLNA,4890
68
+ intentflow/orchestrators/dagster.py,sha256=HOeQ3nDNbDFLCpREQajg3sZLWk9GIdBDRaWF9zAunwc,2169
69
+ intentflow/orchestrators/dbtcloud.py,sha256=DINmhH73tEnn32UlRMimoU3cWZKyArQxxxTqAJU7n3k,3194
70
+ intentflow/orchestrators/extra.py,sha256=oBSRrK10RRTjPcpOuiDqH88tXAosCCbCohv4bHBcrKg,7268
71
+ intentflow/orchestrators/ingestion.py,sha256=m3PKCQh37Twhk_p4awJKNCch4DTgCzplnLqf5LA5CiA,5688
72
+ intentflow/orchestrators/kestra.py,sha256=GNoYNSn-LT1qnkBoN3qsrxRg30q0zFCF52LDj-AW3Fw,1361
73
+ intentflow/orchestrators/more.py,sha256=_Io2i7_wf0Ee_oTZ6ugffHijW2OQtCqqqOJxIEwFakc,7595
74
+ intentflow/orchestrators/prefect.py,sha256=DcQiRAmNy-ZsAVfPnYWBFYebQQcnsLhFGt9OtJvYRrk,2391
75
+ intentflow/orchestrators/spark.py,sha256=2VRmD-vqqhptgrdCXkkxRyT4GJnLGEz1q3Yg8bd9YvA,5972
76
+ intentflow/warehouses/__init__.py,sha256=fcSouZxyUPisKt7lT7_Vhw_Y_RWa5uObhySTXiZ5BQY,7939
77
+ intentflow/warehouses/cloud.py,sha256=6uhrmY7HokrnQxXI0-UHAXV8bLaJNbO04BFAn0DPaQw,7207
78
+ intentflow/warehouses/more.py,sha256=coQ4QVTv0ZtrZ_CYUg191IHg8Nduv4DVyvIOmJxh9Qc,16134
79
+ intentdataflow-0.3.10.dist-info/METADATA,sha256=GPutNVMpFe99j4mkT4vdTqHosPbxlCUereqHTnAvgKs,12733
80
+ intentdataflow-0.3.10.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
81
+ intentdataflow-0.3.10.dist-info/entry_points.txt,sha256=yOfK66DL2uEmCDXY1_bX9bG0KoS7X7eqHwEbWAOviO8,51
82
+ intentdataflow-0.3.10.dist-info/top_level.txt,sha256=uYNGOjM41s9w3Lchxxz75fKNeWRGlZ6M9uHQLqW5MMA,11
83
+ intentdataflow-0.3.10.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (84.2.1)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ intentflow = intentflow.cli:main
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -0,0 +1,4 @@
1
+ IntentFlow
2
+ Copyright (c) 2026 Thiago Egon Lange
3
+
4
+ Licensed under the Apache License, Version 2.0 (see LICENSE).
@@ -0,0 +1 @@
1
+ intentflow
intentflow/__init__.py ADDED
@@ -0,0 +1,2 @@
1
+ """IntentFlow: a control layer over dbt, Airflow, Kestra and warehouses."""
2
+ __version__ = "0.3.10"
intentflow/auth.py ADDED
@@ -0,0 +1,30 @@
1
+ """Roles and permissions. No registered users = local mode (a single operator, loopback only).
2
+ Per-project roles and write scopes are configured through IntentFlow Enterprise, but stored grants are always honored:
3
+ losing the license must never widen access (a `none` on a project keeps blocking it)."""
4
+ from __future__ import annotations
5
+
6
+ RANK = {"none": 0, "viewer": 1, "engineer": 2, "admin": 3}
7
+
8
+ # action → minimum role
9
+ NEED = {
10
+ "read": "viewer",
11
+ "ack": "engineer", "false_positive": "engineer", "assign": "engineer", "note": "engineer",
12
+ "fix_create": "engineer", "fix_validate": "engineer", "fix_approve": "engineer", "fix_reject": "engineer",
13
+ "fix_apply": "engineer", "fix_rollback": "engineer",
14
+ "run_check": "engineer", "run_collect": "engineer", "diff": "engineer",
15
+ "settings": "admin", "users": "admin",
16
+ }
17
+
18
+
19
+ def allowed(role: str | None, action: str) -> bool:
20
+ return RANK.get(role or "", 0) >= RANK[NEED[action]]
21
+
22
+
23
+ def role_in(user: dict | None, project: str | None) -> str | None:
24
+ """Effective role of the person in the project: the project-specific role, if any, otherwise the default role."""
25
+ if not user:
26
+ return None
27
+ pr = user.get("project_roles") or {}
28
+ if project and project in pr:
29
+ return pr[project]
30
+ return user.get("role")
@@ -0,0 +1,77 @@
1
+ """Business rules declared as native dbt tests tagged `business_rule`.
2
+
3
+ SQL stays in dbt, executed with its normal permissions. IntentFlow reads results,
4
+ tracks a bounded run history and uses model dependencies to explain impact.
5
+ """
6
+ from __future__ import annotations
7
+
8
+ import time
9
+ from datetime import datetime
10
+
11
+ from .i18n import tr
12
+
13
+ TAG = "business_rule"
14
+ HISTORY_LIMIT = 20
15
+
16
+
17
+ def _key(uid):
18
+ return f"state.business_rule.{uid}"
19
+
20
+
21
+ def rule_owner(project, definition):
22
+ explicit = definition["meta"].get("owner")
23
+ if explicit:
24
+ return explicit.strip() if isinstance(explicit, str) and explicit.strip() else None
25
+ values = [project.nodes[u].meta.get("owner") or project.nodes[u].meta.get("team") for u in definition["models"]]
26
+ owners = {value.strip() for value in values if isinstance(value, str) and value.strip()}
27
+ return next(iter(owners)) if len(owners) == 1 else None
28
+
29
+
30
+ def record(store, project, results):
31
+ if not results or not results.get("invocation_id"):
32
+ return
33
+ by_id = {r["unique_id"]: r for r in results["results"]}
34
+ for uid, definition in project.test_definitions.items():
35
+ if TAG not in definition["tags"] or uid not in by_id:
36
+ continue
37
+ history = store.get_setting(_key(uid), [])
38
+ if any(r["invocation_id"] == results["invocation_id"] for r in history):
39
+ continue
40
+ r = by_id[uid]
41
+ history.append({"invocation_id": results["invocation_id"], "generated_at": results.get("generated_at"),
42
+ "status": r["status"], "failures": r.get("failures"), "seconds": r.get("time"),
43
+ "recorded_at": time.time()})
44
+ store.set_setting(_key(uid), history[-HISTORY_LIMIT:])
45
+
46
+
47
+ def build(project, results, store=None, *, tag=TAG, max_age_hours=24, now=None):
48
+ now = time.time() if now is None else now
49
+ by_id = {r["unique_id"]: r for r in results["results"]} if results else {}
50
+ fresh = False
51
+ if results and results.get("generated_at"):
52
+ try:
53
+ stamp = datetime.fromisoformat(results["generated_at"].replace("Z", "+00:00"))
54
+ age = now - stamp.timestamp()
55
+ fresh = stamp.tzinfo is not None and -300 <= age <= max_age_hours * 3600
56
+ except (TypeError, ValueError, OverflowError):
57
+ pass
58
+ out = []
59
+ for uid, definition in project.test_definitions.items():
60
+ if tag and tag not in definition["tags"]:
61
+ continue
62
+ dependencies = definition["models"]
63
+ owner = rule_owner(project, definition)
64
+ downstream = sorted({v for u in dependencies for v in project.downstream(u)} - set(dependencies))
65
+ r = by_id.get(uid)
66
+ observed = r["status"] if r else None
67
+ status = (observed if fresh else "stale") if r else "not_run"
68
+ history = store.get_setting(_key(uid), []) if store else []
69
+ public = {key: value for key, value in definition.items() if key != "meta"}
70
+ out.append({**public, "owner": owner, "status": status, "observed_status": observed,
71
+ "fresh": bool(r and fresh), "failures": r.get("failures") if r else None,
72
+ "generated_at": results.get("generated_at") if r else None,
73
+ "models": [project.nodes[u].name for u in dependencies], "model_ids": dependencies,
74
+ "downstream": [project.nodes[u].name for u in downstream], "downstream_ids": downstream,
75
+ "history": history})
76
+ return {"rules": sorted(out, key=lambda r: r["id"]), "tag": tag,
77
+ "note": str(tr("Business rules are native dbt tests; missing or stale results are not a pass."))}