kelpmesh-core 1.0.0__tar.gz

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 (136) hide show
  1. kelpmesh_core-1.0.0/.gitignore +13 -0
  2. kelpmesh_core-1.0.0/CHANGELOG.md +208 -0
  3. kelpmesh_core-1.0.0/LICENSE +201 -0
  4. kelpmesh_core-1.0.0/PKG-INFO +402 -0
  5. kelpmesh_core-1.0.0/README.md +307 -0
  6. kelpmesh_core-1.0.0/extensions/airflow/README.md +55 -0
  7. kelpmesh_core-1.0.0/extensions/kelpmesh-expectations/README.md +17 -0
  8. kelpmesh_core-1.0.0/extensions/kelpmesh-utils/README.md +20 -0
  9. kelpmesh_core-1.0.0/extensions/studio/README.md +21 -0
  10. kelpmesh_core-1.0.0/kelpmesh/__init__.py +6 -0
  11. kelpmesh_core-1.0.0/kelpmesh/__main__.py +3 -0
  12. kelpmesh_core-1.0.0/kelpmesh/adapters/__init__.py +51 -0
  13. kelpmesh_core-1.0.0/kelpmesh/adapters/athena.py +347 -0
  14. kelpmesh_core-1.0.0/kelpmesh/adapters/base.py +139 -0
  15. kelpmesh_core-1.0.0/kelpmesh/adapters/bigquery.py +211 -0
  16. kelpmesh_core-1.0.0/kelpmesh/adapters/clickhouse.py +277 -0
  17. kelpmesh_core-1.0.0/kelpmesh/adapters/databricks.py +222 -0
  18. kelpmesh_core-1.0.0/kelpmesh/adapters/duckdb.py +328 -0
  19. kelpmesh_core-1.0.0/kelpmesh/adapters/fabric.py +236 -0
  20. kelpmesh_core-1.0.0/kelpmesh/adapters/hive.py +366 -0
  21. kelpmesh_core-1.0.0/kelpmesh/adapters/mysql.py +221 -0
  22. kelpmesh_core-1.0.0/kelpmesh/adapters/postgres.py +214 -0
  23. kelpmesh_core-1.0.0/kelpmesh/adapters/redshift.py +221 -0
  24. kelpmesh_core-1.0.0/kelpmesh/adapters/snowflake.py +229 -0
  25. kelpmesh_core-1.0.0/kelpmesh/adapters/spark.py +375 -0
  26. kelpmesh_core-1.0.0/kelpmesh/adapters/sqlserver.py +285 -0
  27. kelpmesh_core-1.0.0/kelpmesh/adapters/trino.py +251 -0
  28. kelpmesh_core-1.0.0/kelpmesh/cli/__init__.py +0 -0
  29. kelpmesh_core-1.0.0/kelpmesh/cli/build.py +132 -0
  30. kelpmesh_core-1.0.0/kelpmesh/cli/ci.py +589 -0
  31. kelpmesh_core-1.0.0/kelpmesh/cli/clean.py +30 -0
  32. kelpmesh_core-1.0.0/kelpmesh/cli/compare.py +62 -0
  33. kelpmesh_core-1.0.0/kelpmesh/cli/compile.py +135 -0
  34. kelpmesh_core-1.0.0/kelpmesh/cli/create_test.py +190 -0
  35. kelpmesh_core-1.0.0/kelpmesh/cli/debug.py +237 -0
  36. kelpmesh_core-1.0.0/kelpmesh/cli/deps.py +93 -0
  37. kelpmesh_core-1.0.0/kelpmesh/cli/diff.py +55 -0
  38. kelpmesh_core-1.0.0/kelpmesh/cli/docs.py +71 -0
  39. kelpmesh_core-1.0.0/kelpmesh/cli/export.py +78 -0
  40. kelpmesh_core-1.0.0/kelpmesh/cli/exposures.py +39 -0
  41. kelpmesh_core-1.0.0/kelpmesh/cli/format.py +206 -0
  42. kelpmesh_core-1.0.0/kelpmesh/cli/freshness.py +156 -0
  43. kelpmesh_core-1.0.0/kelpmesh/cli/generate.py +151 -0
  44. kelpmesh_core-1.0.0/kelpmesh/cli/history.py +79 -0
  45. kelpmesh_core-1.0.0/kelpmesh/cli/import_dbt.py +621 -0
  46. kelpmesh_core-1.0.0/kelpmesh/cli/init.py +104 -0
  47. kelpmesh_core-1.0.0/kelpmesh/cli/lint.py +619 -0
  48. kelpmesh_core-1.0.0/kelpmesh/cli/ls.py +45 -0
  49. kelpmesh_core-1.0.0/kelpmesh/cli/main.py +172 -0
  50. kelpmesh_core-1.0.0/kelpmesh/cli/mesh.py +269 -0
  51. kelpmesh_core-1.0.0/kelpmesh/cli/metrics.py +89 -0
  52. kelpmesh_core-1.0.0/kelpmesh/cli/orchestrate.py +51 -0
  53. kelpmesh_core-1.0.0/kelpmesh/cli/package_cli.py +66 -0
  54. kelpmesh_core-1.0.0/kelpmesh/cli/plan.py +202 -0
  55. kelpmesh_core-1.0.0/kelpmesh/cli/pre_commit.py +54 -0
  56. kelpmesh_core-1.0.0/kelpmesh/cli/preview.py +50 -0
  57. kelpmesh_core-1.0.0/kelpmesh/cli/rollback.py +105 -0
  58. kelpmesh_core-1.0.0/kelpmesh/cli/run.py +171 -0
  59. kelpmesh_core-1.0.0/kelpmesh/cli/scan.py +147 -0
  60. kelpmesh_core-1.0.0/kelpmesh/cli/schedule.py +176 -0
  61. kelpmesh_core-1.0.0/kelpmesh/cli/schema.py +68 -0
  62. kelpmesh_core-1.0.0/kelpmesh/cli/security.py +318 -0
  63. kelpmesh_core-1.0.0/kelpmesh/cli/seed.py +244 -0
  64. kelpmesh_core-1.0.0/kelpmesh/cli/serve.py +34 -0
  65. kelpmesh_core-1.0.0/kelpmesh/cli/sources.py +136 -0
  66. kelpmesh_core-1.0.0/kelpmesh/cli/studio.py +72 -0
  67. kelpmesh_core-1.0.0/kelpmesh/cli/test.py +220 -0
  68. kelpmesh_core-1.0.0/kelpmesh/core/__init__.py +0 -0
  69. kelpmesh_core-1.0.0/kelpmesh/core/audits.py +151 -0
  70. kelpmesh_core-1.0.0/kelpmesh/core/ci.py +79 -0
  71. kelpmesh_core-1.0.0/kelpmesh/core/config.py +102 -0
  72. kelpmesh_core-1.0.0/kelpmesh/core/contracts.py +130 -0
  73. kelpmesh_core-1.0.0/kelpmesh/core/crypto.py +72 -0
  74. kelpmesh_core-1.0.0/kelpmesh/core/errors.py +69 -0
  75. kelpmesh_core-1.0.0/kelpmesh/core/executor.py +641 -0
  76. kelpmesh_core-1.0.0/kelpmesh/core/graph.py +95 -0
  77. kelpmesh_core-1.0.0/kelpmesh/core/macros.py +639 -0
  78. kelpmesh_core-1.0.0/kelpmesh/core/model.py +55 -0
  79. kelpmesh_core-1.0.0/kelpmesh/core/packages.py +184 -0
  80. kelpmesh_core-1.0.0/kelpmesh/core/project.py +187 -0
  81. kelpmesh_core-1.0.0/kelpmesh/core/python_runner.py +190 -0
  82. kelpmesh_core-1.0.0/kelpmesh/core/scheduler.py +296 -0
  83. kelpmesh_core-1.0.0/kelpmesh/core/schema_yaml.py +96 -0
  84. kelpmesh_core-1.0.0/kelpmesh/core/substitutions.py +150 -0
  85. kelpmesh_core-1.0.0/kelpmesh/core/versioning.py +106 -0
  86. kelpmesh_core-1.0.0/kelpmesh/diff/__init__.py +0 -0
  87. kelpmesh_core-1.0.0/kelpmesh/diff/comparison.py +62 -0
  88. kelpmesh_core-1.0.0/kelpmesh/diff/engine.py +55 -0
  89. kelpmesh_core-1.0.0/kelpmesh/docs/__init__.py +0 -0
  90. kelpmesh_core-1.0.0/kelpmesh/docs/generator.py +394 -0
  91. kelpmesh_core-1.0.0/kelpmesh/integrations/__init__.py +1 -0
  92. kelpmesh_core-1.0.0/kelpmesh/integrations/bitbucket.py +97 -0
  93. kelpmesh_core-1.0.0/kelpmesh/integrations/github.py +128 -0
  94. kelpmesh_core-1.0.0/kelpmesh/integrations/gitlab.py +93 -0
  95. kelpmesh_core-1.0.0/kelpmesh/mesh/__init__.py +21 -0
  96. kelpmesh_core-1.0.0/kelpmesh/mesh/access.py +110 -0
  97. kelpmesh_core-1.0.0/kelpmesh/mesh/config.py +91 -0
  98. kelpmesh_core-1.0.0/kelpmesh/mesh/contracts.py +200 -0
  99. kelpmesh_core-1.0.0/kelpmesh/mesh/health.py +178 -0
  100. kelpmesh_core-1.0.0/kelpmesh/mesh/resolver.py +143 -0
  101. kelpmesh_core-1.0.0/kelpmesh/observability/__init__.py +0 -0
  102. kelpmesh_core-1.0.0/kelpmesh/observability/alerts.py +106 -0
  103. kelpmesh_core-1.0.0/kelpmesh/observability/anomaly.py +67 -0
  104. kelpmesh_core-1.0.0/kelpmesh/observability/history.py +120 -0
  105. kelpmesh_core-1.0.0/kelpmesh/orchestrate/engine.py +89 -0
  106. kelpmesh_core-1.0.0/kelpmesh/parser/__init__.py +0 -0
  107. kelpmesh_core-1.0.0/kelpmesh/parser/lineage.py +58 -0
  108. kelpmesh_core-1.0.0/kelpmesh/parser/python.py +28 -0
  109. kelpmesh_core-1.0.0/kelpmesh/parser/sql.py +96 -0
  110. kelpmesh_core-1.0.0/kelpmesh/schema/__init__.py +0 -0
  111. kelpmesh_core-1.0.0/kelpmesh/schema/drift.py +98 -0
  112. kelpmesh_core-1.0.0/kelpmesh/security/__init__.py +1 -0
  113. kelpmesh_core-1.0.0/kelpmesh/security/audit.py +94 -0
  114. kelpmesh_core-1.0.0/kelpmesh/security/classifier.py +111 -0
  115. kelpmesh_core-1.0.0/kelpmesh/security/erasure.py +135 -0
  116. kelpmesh_core-1.0.0/kelpmesh/security/masking.py +81 -0
  117. kelpmesh_core-1.0.0/kelpmesh/security/rls.py +93 -0
  118. kelpmesh_core-1.0.0/kelpmesh/semantic/__init__.py +263 -0
  119. kelpmesh_core-1.0.0/kelpmesh/semantic/exporters/__init__.py +26 -0
  120. kelpmesh_core-1.0.0/kelpmesh/semantic/exporters/base.py +62 -0
  121. kelpmesh_core-1.0.0/kelpmesh/semantic/exporters/looker.py +118 -0
  122. kelpmesh_core-1.0.0/kelpmesh/semantic/exporters/manifest.py +73 -0
  123. kelpmesh_core-1.0.0/kelpmesh/semantic/exporters/powerbi.py +148 -0
  124. kelpmesh_core-1.0.0/kelpmesh/semantic/exporters/qlik.py +139 -0
  125. kelpmesh_core-1.0.0/kelpmesh/semantic/exporters/tableau.py +109 -0
  126. kelpmesh_core-1.0.0/kelpmesh/semantic/serve.py +128 -0
  127. kelpmesh_core-1.0.0/kelpmesh/state/__init__.py +0 -0
  128. kelpmesh_core-1.0.0/kelpmesh/state/engine.py +392 -0
  129. kelpmesh_core-1.0.0/kelpmesh/studio/__init__.py +1 -0
  130. kelpmesh_core-1.0.0/kelpmesh/studio/app.py +378 -0
  131. kelpmesh_core-1.0.0/kelpmesh/testing/__init__.py +0 -0
  132. kelpmesh_core-1.0.0/kelpmesh/testing/fixtures.py +247 -0
  133. kelpmesh_core-1.0.0/kelpmesh/testing/runner.py +82 -0
  134. kelpmesh_core-1.0.0/kelpmesh/testing/schema_tests.py +96 -0
  135. kelpmesh_core-1.0.0/packages/kelpmesh-studio/README.md +102 -0
  136. kelpmesh_core-1.0.0/pyproject.toml +167 -0
@@ -0,0 +1,13 @@
1
+ target/
2
+ dist/
3
+ site/
4
+ *.duckdb
5
+ *.pyc
6
+ __pycache__/
7
+ .env
8
+ *.egg-info/
9
+ .venv/
10
+ venv/
11
+ .mypy_cache/
12
+ .ruff_cache/
13
+ .pytest_cache/
@@ -0,0 +1,208 @@
1
+ # Changelog
2
+
3
+ All notable changes to KelpMesh are documented here.
4
+ Follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and [Semantic Versioning](https://semver.org/).
5
+
6
+ ---
7
+
8
+ ## [1.0.0] — 2026-06-29
9
+
10
+ ### 🎉 First stable release — kelpmesh-core 1.0.0
11
+
12
+ ### Added
13
+ - 14 warehouse adapters: DuckDB, PostgreSQL, Snowflake, BigQuery, Databricks, Redshift, Microsoft Fabric, MySQL, Trino, ClickHouse, Apache Spark, Amazon Athena, Apache Hive, SQL Server / Azure Synapse
14
+ - 7 materialisation types: view, table, incremental (merge/append), incremental\_by\_time\_range, ephemeral, snapshot (SCD2), materialized\_view
15
+ - Model contracts — column name + type enforcement post-run
16
+ - Model versioning — `-- version: N` with automatic latest-version routing
17
+ - grain: / audits: — post-run uniqueness and data quality checks
18
+ - Environment rollback — `kelpmesh rollback` clears state for rebuild
19
+ - `kelpmesh format` — sqlglot-powered SQL auto-formatter with `--check` CI mode
20
+ - `kelpmesh lint` — 10-rule SQL linter (L001–L010)
21
+ - Full rename: all internal identifiers migrated from `briq` → `kelpmesh`
22
+ - Published under the RoyPulseAI GitHub / PyPI identity
23
+
24
+ ---
25
+
26
+ ## [0.3.0] — 2026-06-28
27
+
28
+ ### Added — Full platform: macros, Python models, CI/CD, freemium Studio
29
+
30
+ #### SQL macros — SQL-native, zero Jinja
31
+
32
+ 32 built-in macros callable as plain SQL functions (expanded at compile time):
33
+
34
+ - **String:** `surrogate_key`, `generate_surrogate_key`, `safe_cast`, `slugify`, `truncate_string`
35
+ - **Numeric:** `safe_divide`, `round_half_up`, `sign`
36
+ - **Date/time:** `datediff`, `date_trunc_week`, `date_spine`, `current_timestamp_utc`, `to_unix_timestamp`, `from_unix_timestamp`, `fiscal_year`, `fiscal_quarter`, `age_in_years`, `months_between`
37
+ - **Geography:** `haversine`
38
+ - **Type detection:** `is_numeric_string`, `is_valid_email`, `is_valid_url`, `is_valid_date`
39
+ - **Array/set:** `array_to_string`, `string_to_array`, `deduplicate_array`
40
+ - **Conditional:** `coalesce_cast`, `nullif_zero`, `zero_if_null`, `greatest_not_null`, `least_not_null`
41
+ - **Warehouse utility:** `generate_schema_name`, `limit_rows`
42
+
43
+ Macros are plain SQL — no `{{ }}` syntax, fully compatible with IDE autocomplete and AI tools.
44
+
45
+ #### Python models
46
+
47
+ - `def model(dbt, session)` interface; return SQL string, pandas DataFrame, or None (no-op)
48
+ - `DbtProxy` — `.ref()`, `.source()`, `.config()` helpers for Python models
49
+ - `SessionProxy` — warehouse-agnostic query execution (wraps the active adapter)
50
+ - Mixed projects supported — SQL and Python models in the same DAG
51
+
52
+ #### New warehouse adapters
53
+
54
+ - **MySQL** — `mysql+mysqlconnector://` connection string, full incremental merge, SCD Type 2
55
+ - **Trino** — HTTP/HTTPS connection, catalog-qualified identifiers, full incremental merge
56
+
57
+ Total adapters: DuckDB · Postgres · Snowflake · BigQuery · Databricks · Redshift · Microsoft Fabric · MySQL · Trino (9 total)
58
+
59
+ #### Built-in cron scheduler
60
+
61
+ - `kelpmesh schedule add "0 6 * * 1-5" kelpmesh build` — no Airflow needed
62
+ - `kelpmesh schedule list` — show all registered schedules with next-run time
63
+ - `kelpmesh schedule start` — runs all schedules as a long-running process
64
+ - `kelpmesh schedule remove <name>` — deregister a schedule
65
+ - Custom parser supports both cron syntax (`0 6 * * 1-5`) and interval syntax (`every 1h`, `every 30m`)
66
+ - Zero external dependencies — pure Python using `threading.Timer`
67
+
68
+ #### Orchestration integrations
69
+
70
+ - **Dagster** — `KelpMeshResource`, `@kelpmesh_asset`, `KelpMeshOp`, `KelpMeshSchedule`, `run_freshness_sensor`
71
+ - **Prefect** — `KelpMeshBlock`, `kelpmesh_run_task`, `kelpmesh_build_flow` pre-built flow
72
+ - Both integrations use direct Python API calls (not subprocess) for structured result capture
73
+
74
+ #### CI/CD — `kelpmesh ci`
75
+
76
+ - `kelpmesh ci` — single command: detect changed models → compute downstream plan → run → test → post PR comment
77
+ - Slim CI by default: only runs models changed vs `base_branch` (git diff)
78
+ - `--dry-run` — plan and report without executing any models
79
+ - `--select` — limit to specific models or tags
80
+ - `--defer` — skip unchanged models whose production state matches current hash
81
+ - `--no-comment` — suppress PR comment (for non-PR branches)
82
+ - `--json` — write structured `CIReport` to file for downstream use
83
+ - `--fail-on-test` / `--no-fail-on-test` — control exit code on test failures
84
+
85
+ #### GitHub / GitLab / Bitbucket integrations (zero added dependencies)
86
+
87
+ - Auto-detects VCS provider from environment variables
88
+ - **GitHub** — posts/updates PR comment via GitHub REST API; idempotent (updates existing `<!-- kelpmesh-ci -->` marker)
89
+ - **GitLab** — posts/updates MR note; uses `CI_MERGE_REQUEST_IID`
90
+ - **Bitbucket** — posts PR comment via Bitbucket Cloud API
91
+ - All three use stdlib `urllib` only — no `requests`, no `httpx`
92
+
93
+ #### CI templates
94
+
95
+ - **`.github/workflows/ci.yml`** — updated: `pull-requests: write` permission, slim CI on PR, full matrix build on push to main
96
+ - **`.github/actions/kelpmesh-build/action.yml`** — updated: wraps `kelpmesh ci`; inputs: `slim-ci`, `base-branch`, `defer-state`, `dry-run`, `post-comment`
97
+ - **`.gitlab-ci.yml`** — new: four stages: `kelpmesh:scan` (pre), `kelpmesh:ci` (MR), `kelpmesh:build` (push to main), `kelpmesh:nightly` (scheduled)
98
+ - **`bitbucket-pipelines.yml`** — new: pull-request, main/master branch, and nightly pipelines
99
+
100
+ #### Studio — freemium licensing
101
+
102
+ - Four tiers: Free (personal, 1 user, 3 projects) / Pro ($29/user/mo) / Business ($79/user/mo) / Enterprise
103
+ - Local license validation — `km_<tier>_<b64url(payload)>_<hmac8>` codec; no phone-home
104
+ - `KELPMESH_STUDIO_TIER` env var → `KELPMESH_STUDIO_LICENSE_KEY` env var → `kelpmesh.yml` → default free
105
+ - FastAPI dependency injection for all gated endpoints (`Depends(_lic.require_feature(...))`)
106
+ - `GET /api/tier` endpoint returns current tier info
107
+ - Project creation enforces `max_projects` limit per tier
108
+ - Run history capped at `max_run_history` per tier
109
+ - User management and schedule management gated on Pro+ tier
110
+
111
+ #### VS Code extension rewrite
112
+
113
+ - 37 SQL snippets covering all materializations, macros, security, and mesh patterns
114
+ - Model tree view in sidebar with status icons
115
+ - CodeLens buttons: Run · Test · Preview · Plan (per model)
116
+ - Plan panel — shows downstream impact before running
117
+ - Source/test/snapshot file type registration
118
+
119
+ #### Package split
120
+
121
+ - `kelpmesh-core` (Apache 2.0, always free) — CLI engine, adapters, macros, security, CI/CD, scheduler
122
+ - `kelpmesh-studio` (freemium) — Core + FastAPI browser layer with licensing
123
+ - `pip install kelpmesh-studio` installs Core as a dependency; Studio is strictly a superset
124
+
125
+ #### Data mesh (Phase F)
126
+
127
+ - Cross-project `ref('project_b', 'model')` — references across repo boundaries
128
+ - `access: public | protected | private` on model declarations
129
+ - Column-level contracts: upstream publishes interface; downstream pins to it
130
+ - Multi-warehouse mesh: Project A on Snowflake, Project B on BigQuery
131
+
132
+ #### Semantic layer (Phase E)
133
+
134
+ - Metric YAML definitions: `name`, `label`, `type` (simple/ratio/cumulative), `measure`, `dimensions`
135
+ - `kelpmesh metric query` — SQL generation from metric + dimension + filter at query time
136
+ - Saved queries — pre-materialized metric + dimension combos as views
137
+ - BI export: LookML, Tableau `.tds`, PowerBI `.pbit`, Qlik
138
+
139
+ ---
140
+
141
+ ## [0.2.0] — 2026-06-28
142
+
143
+ ### Added — dbt Core parity + competitive differentiators
144
+
145
+ #### SQL transformation engine
146
+ - **`{{ var("name") }}`** — project-level and CLI `--var key=value` variable substitution
147
+ - **`{{ env_var("NAME") }}`** — environment variable substitution with optional default
148
+ - **`{{ is_incremental() }}`** — inline and block form (`{% if is_incremental() %}...{% endif %}`)
149
+ - **`{{ this }}`** — current model's resolved table name
150
+ - **Pre/post hooks** — `-- pre_hook: SQL` / `-- post_hook: SQL` comment headers; `{table}` placeholder
151
+ - **`-- enabled: false`** — skip a model without removing it from the project
152
+ - **Analyses directory** — `analyses/*.sql` files compile but are never materialized
153
+ - **Macro system** — `macros/*.sql` with dbt-compatible `{% macro name(args) %}...{% endmacro %}` syntax loaded at project init; built-in macros: `surrogate_key`, `safe_divide`, `date_trunc`, `datediff`, `current_timestamp`, `generate_schema_name`
154
+
155
+ #### CLI commands
156
+ - **`kelpmesh compile`** — render all substitutions and macros without touching the warehouse; writes to `target/compiled/`; `--print` streams to stdout
157
+ - **`kelpmesh plan`** — Terraform-style dry run: shows downstream impact (`+N models affected`), hook counts, tag labels; `--tag`, `--var`, `--json` flags
158
+ - **`kelpmesh run`** — added `--tag`, `--var`, `--full-refresh`
159
+ - **`kelpmesh seed`** — full rewrite: scans `seeds/*.csv`, infers column types (BOOLEAN / BIGINT / DOUBLE / DATE / TIMESTAMP / VARCHAR), supports `seeds/seeds.yml` schema overrides
160
+ - **`kelpmesh debug`** — per-field warehouse config validation with actionable error hints, macro and model count, telemetry guard, state summary
161
+
162
+ #### SCD Type 2 snapshots on all 7 warehouses
163
+ - Timestamp strategy — detects changes via `updated_at` column comparison
164
+ - Check strategy — compares all non-key columns with `IS DISTINCT FROM`
165
+ - Audit columns: `_scd_id`, `_valid_from`, `_valid_to`, `_is_current`, `_dbt_updated_at`
166
+
167
+ #### Incremental merge on all 7 warehouse adapters
168
+ - DuckDB — `INSERT OR REPLACE`
169
+ - Postgres — `INSERT ... ON CONFLICT DO UPDATE SET`
170
+ - Snowflake — `MERGE INTO ... WHEN MATCHED THEN UPDATE`
171
+ - BigQuery — `MERGE` with backtick quoting
172
+ - Databricks — Delta Lake `MERGE INTO ... UPDATE SET * / INSERT *`
173
+ - Fabric (Microsoft) — T-SQL `MERGE` with semicolon terminator
174
+ - Redshift — `MERGE INTO` (Redshift 2022+)
175
+
176
+ #### New adapter: Amazon Redshift
177
+ - Postgres wire protocol, port 5439, `sslmode=require` by default
178
+ - Full incremental merge + SCD Type 2 snapshots
179
+
180
+ ### Fixed
181
+ - Databricks incremental: was writing `CREATE OR REPLACE VIEW` instead of `CREATE TABLE` on first run
182
+ - Fabric T-SQL: `CREATE TABLE AS SELECT` is invalid — fixed to use `SELECT * INTO`
183
+ - Snapshot on non-DuckDB adapters previously fell through to a plain table rebuild — now raises `NotImplementedError`
184
+ - `kelpmesh plan` output truncated model names in narrow terminals
185
+
186
+ ### Changed
187
+ - `pyproject.toml`: author updated to Roy Pulse AI (`roypulse.ai@gmail.com`); warehouse drivers split into per-adapter optional extras; `kelpmesh[all-warehouses]` meta-extra installs all drivers
188
+ - `kelpmesh.yml` now supports a `macros_path` field (default: `macros/`)
189
+
190
+ ### Tests
191
+ - 530 tests passing across 25 test files
192
+ - New: `test_substitutions.py` (27), `test_hooks.py` (6), `test_tag_selection.py` (7), `test_seeds_v2.py` (16), `test_analyses.py` (5), `test_compile.py` (9), `test_adapters_incremental.py` (24)
193
+
194
+ ---
195
+
196
+ ## [0.1.0] — 2026-05-15
197
+
198
+ ### Added
199
+ - Initial release: DuckDB, Postgres, Snowflake, BigQuery, Databricks, Fabric adapters
200
+ - `kelpmesh run`, `kelpmesh test`, `kelpmesh build`, `kelpmesh diff`, `kelpmesh docs`, `kelpmesh seed`, `kelpmesh preview`
201
+ - DAG-based model execution with topological sort and parallel threading
202
+ - State engine (DuckDB-backed hash store) for incremental re-runs
203
+ - Security subsystem: PII scanning, RLS policies, audit log, secret scanning
204
+ - Semantic layer: sources, exposures, metrics, BI export
205
+ - Schema drift detection (`kelpmesh schema diff`)
206
+ - `kelpmesh plan` — Terraform-style dry run (initial version)
207
+ - Project mesh: cross-project refs, access control, contracts
208
+ - KelpMesh Studio: browser-based IDE (bundled in `kelpmesh[studio]`)
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [2026] [briq]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.