ingestron 0.17.8 → 1.1.0
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.
- package/NOTICE +3 -5
- package/README.md +26 -74
- package/THIRD_PARTY_NOTICES +148 -0
- package/dist/main.js +29708 -0
- package/package.json +32 -65
- package/project-templates/kafka/README.md +12 -0
- package/project-templates/kafka/connections/events.yaml +8 -0
- package/project-templates/kafka/contracts/page_views.yaml +13 -0
- package/project-templates/kafka/contracts/purchases.yaml +13 -0
- package/project-templates/kafka/flows/events.yaml +10 -0
- package/project-templates/kafka/project.yaml +10 -0
- package/project-templates/kafka/standard.yaml +4 -0
- package/project-templates/kafka/template.yaml +3 -0
- package/project-templates/minimal/README.md +10 -0
- package/project-templates/minimal/connections/shop.yaml +7 -0
- package/project-templates/minimal/contracts/orders.yaml +14 -0
- package/project-templates/minimal/flows/orders.yaml +6 -0
- package/project-templates/minimal/project.yaml +11 -0
- package/project-templates/minimal/standard.yaml +4 -0
- package/project-templates/minimal/template.yaml +7 -0
- package/project-templates/private-files/README.md +29 -0
- package/project-templates/private-files/connections/share.yaml +10 -0
- package/project-templates/private-files/contracts/sales.yaml +14 -0
- package/project-templates/private-files/contracts/stock.yaml +14 -0
- package/project-templates/private-files/flows/stores.yaml +9 -0
- package/project-templates/private-files/platform.yaml +11 -0
- package/project-templates/private-files/project.yaml +19 -0
- package/project-templates/private-files/standard.yaml +11 -0
- package/project-templates/private-files/template.yaml +10 -0
- package/project-templates/private-sql-server/README.md +25 -0
- package/project-templates/private-sql-server/connections/erp.yaml +10 -0
- package/project-templates/private-sql-server/contracts/customers.yaml +14 -0
- package/project-templates/private-sql-server/contracts/invoices.yaml +15 -0
- package/project-templates/private-sql-server/flows/erp.yaml +13 -0
- package/project-templates/private-sql-server/platform.yaml +11 -0
- package/project-templates/private-sql-server/project.yaml +19 -0
- package/project-templates/private-sql-server/standard.yaml +17 -0
- package/project-templates/private-sql-server/template.yaml +10 -0
- package/project-templates/pyspark/README.md +12 -0
- package/project-templates/pyspark/connections/billing.yaml +7 -0
- package/project-templates/pyspark/contracts/invoices.yaml +16 -0
- package/project-templates/pyspark/contracts/monthly_revenue.yaml +14 -0
- package/project-templates/pyspark/flows/billing.yaml +6 -0
- package/project-templates/pyspark/project.yaml +11 -0
- package/project-templates/pyspark/standard.yaml +4 -0
- package/project-templates/pyspark/template.yaml +3 -0
- package/project-templates/pyspark/transforms/monthly_revenue.py +10 -0
- package/project-templates/pyspark/transforms/monthly_revenue.yaml +10 -0
- package/project-templates/retail/README.md +22 -0
- package/project-templates/retail/connections/shop.yaml +8 -0
- package/project-templates/retail/contracts/customers.yaml +12 -0
- package/project-templates/retail/contracts/daily_sales.yaml +19 -0
- package/project-templates/retail/contracts/orders.yaml +16 -0
- package/project-templates/retail/flows/shop.yaml +18 -0
- package/project-templates/retail/platform.yaml +21 -0
- package/project-templates/retail/project.yaml +18 -0
- package/project-templates/retail/standard.yaml +15 -0
- package/project-templates/retail/template.yaml +10 -0
- package/project-templates/retail/transforms/daily_sales.sql +7 -0
- package/project-templates/retail/transforms/daily_sales.yaml +7 -0
- package/project-templates/salesforce/README.md +6 -0
- package/project-templates/salesforce/connections/salesforce.yaml +7 -0
- package/project-templates/salesforce/contracts/accounts.yaml +13 -0
- package/project-templates/salesforce/contracts/opportunities.yaml +14 -0
- package/project-templates/salesforce/flows/salesforce.yaml +7 -0
- package/project-templates/salesforce/project.yaml +9 -0
- package/project-templates/salesforce/standard.yaml +4 -0
- package/project-templates/salesforce/template.yaml +3 -0
- package/project-templates/sql-server/README.md +17 -0
- package/project-templates/sql-server/connections/erp.yaml +8 -0
- package/project-templates/sql-server/contracts/customer_balances.yaml +13 -0
- package/project-templates/sql-server/contracts/customers.yaml +13 -0
- package/project-templates/sql-server/contracts/invoices.yaml +14 -0
- package/project-templates/sql-server/flows/erp.yaml +13 -0
- package/project-templates/sql-server/platform.yaml +6 -0
- package/project-templates/sql-server/project.yaml +13 -0
- package/project-templates/sql-server/standard.yaml +9 -0
- package/project-templates/sql-server/template.yaml +3 -0
- package/project-templates/sql-server/transforms/customer_balances.sql +5 -0
- package/project-templates/sql-server/transforms/customer_balances.yaml +6 -0
- package/recipes/connections/adls-gen2.yaml +7 -0
- package/recipes/connections/amazon-rds-oracle.yaml +9 -0
- package/recipes/connections/amazon-rds-sqlserver.yaml +9 -0
- package/recipes/connections/amazon-redshift.yaml +10 -0
- package/recipes/connections/amazon-s3.yaml +8 -0
- package/recipes/connections/azure-blob.yaml +7 -0
- package/recipes/connections/azure-cosmos-db-mongodb.yaml +8 -0
- package/recipes/connections/azure-cosmos-db-nosql.yaml +8 -0
- package/recipes/connections/azure-cosmos-postgresql.yaml +10 -0
- package/recipes/connections/azure-data-explorer.yaml +8 -0
- package/recipes/connections/azure-databricks-delta.yaml +9 -0
- package/recipes/connections/azure-files.yaml +8 -0
- package/recipes/connections/azure-mysql.yaml +7 -0
- package/recipes/connections/azure-postgresql.yaml +10 -0
- package/recipes/connections/azure-sql-database.yaml +9 -0
- package/recipes/connections/azure-sql-managed-instance.yaml +9 -0
- package/recipes/connections/azure-synapse.yaml +9 -0
- package/recipes/connections/azure-table-storage.yaml +7 -0
- package/recipes/connections/cassandra.yaml +9 -0
- package/recipes/connections/dataverse.yaml +9 -0
- package/recipes/connections/db2.yaml +7 -0
- package/recipes/connections/dynamics-365.yaml +9 -0
- package/recipes/connections/dynamics-ax.yaml +11 -0
- package/recipes/connections/dynamics-crm.yaml +9 -0
- package/recipes/connections/fabric-lakehouse.yaml +8 -0
- package/recipes/connections/fabric-warehouse.yaml +9 -0
- package/recipes/connections/files.yaml +9 -0
- package/recipes/connections/ftp.yaml +9 -0
- package/recipes/connections/google-ads.yaml +12 -0
- package/recipes/connections/google-bigquery.yaml +8 -0
- package/recipes/connections/google-cloud-storage.yaml +8 -0
- package/recipes/connections/greenplum.yaml +10 -0
- package/recipes/connections/hdfs.yaml +9 -0
- package/recipes/connections/hive.yaml +11 -0
- package/recipes/connections/http.yaml +7 -0
- package/recipes/connections/hubspot.yaml +10 -0
- package/recipes/connections/impala.yaml +11 -0
- package/recipes/connections/informix.yaml +9 -0
- package/recipes/connections/jira.yaml +9 -0
- package/recipes/connections/mariadb.yaml +10 -0
- package/recipes/connections/microsoft-365.yaml +10 -0
- package/recipes/connections/microsoft-access.yaml +9 -0
- package/recipes/connections/mongodb-atlas.yaml +8 -0
- package/recipes/connections/mongodb.yaml +8 -0
- package/recipes/connections/mysql.yaml +10 -0
- package/recipes/connections/netezza.yaml +11 -0
- package/recipes/connections/odata.yaml +9 -0
- package/recipes/connections/odbc.yaml +9 -0
- package/recipes/connections/oracle-cloud-storage.yaml +9 -0
- package/recipes/connections/oracle.yaml +9 -0
- package/recipes/connections/postgresql.yaml +10 -0
- package/recipes/connections/presto.yaml +11 -0
- package/recipes/connections/quickbooks.yaml +10 -0
- package/recipes/connections/rest.yaml +12 -0
- package/recipes/connections/s3-compatible.yaml +9 -0
- package/recipes/connections/salesforce-service-cloud.yaml +10 -0
- package/recipes/connections/salesforce.yaml +10 -0
- package/recipes/connections/sap-bw-mdx.yaml +11 -0
- package/recipes/connections/sap-bw-open-hub.yaml +11 -0
- package/recipes/connections/sap-c4c.yaml +9 -0
- package/recipes/connections/sap-ecc.yaml +9 -0
- package/recipes/connections/sap-hana.yaml +7 -0
- package/recipes/connections/sap-table.yaml +11 -0
- package/recipes/connections/servicenow.yaml +9 -0
- package/recipes/connections/sftp.yaml +10 -0
- package/recipes/connections/sharepoint-online-list.yaml +10 -0
- package/recipes/connections/shopify.yaml +8 -0
- package/recipes/connections/snowflake.yaml +11 -0
- package/recipes/connections/spark.yaml +11 -0
- package/recipes/connections/sqlserver.yaml +9 -0
- package/recipes/connections/square.yaml +10 -0
- package/recipes/connections/sybase.yaml +10 -0
- package/recipes/connections/teradata.yaml +9 -0
- package/recipes/connections/vertica.yaml +10 -0
- package/recipes/connections/web-table.yaml +7 -0
- package/recipes/connections/xero.yaml +10 -0
- package/recipes/contracts/records.yaml +12 -0
- package/recipes/contracts/salesforce-account.yaml +12 -0
- package/recipes/flows/adls-gen2.yaml +14 -0
- package/recipes/flows/amazon-rds-oracle.yaml +12 -0
- package/recipes/flows/amazon-rds-sqlserver.yaml +12 -0
- package/recipes/flows/amazon-redshift.yaml +12 -0
- package/recipes/flows/amazon-s3.yaml +14 -0
- package/recipes/flows/azure-blob.yaml +14 -0
- package/recipes/flows/azure-cosmos-db-mongodb.yaml +12 -0
- package/recipes/flows/azure-cosmos-db-nosql.yaml +12 -0
- package/recipes/flows/azure-cosmos-postgresql.yaml +12 -0
- package/recipes/flows/azure-data-explorer.yaml +13 -0
- package/recipes/flows/azure-databricks-delta.yaml +15 -0
- package/recipes/flows/azure-files.yaml +14 -0
- package/recipes/flows/azure-mysql.yaml +12 -0
- package/recipes/flows/azure-postgresql.yaml +12 -0
- package/recipes/flows/azure-sql-database.yaml +12 -0
- package/recipes/flows/azure-sql-managed-instance.yaml +12 -0
- package/recipes/flows/azure-synapse.yaml +12 -0
- package/recipes/flows/azure-table-storage.yaml +12 -0
- package/recipes/flows/cassandra.yaml +12 -0
- package/recipes/flows/dataverse.yaml +12 -0
- package/recipes/flows/db2.yaml +12 -0
- package/recipes/flows/dynamics-365.yaml +12 -0
- package/recipes/flows/dynamics-ax.yaml +12 -0
- package/recipes/flows/dynamics-crm.yaml +12 -0
- package/recipes/flows/fabric-lakehouse.yaml +14 -0
- package/recipes/flows/fabric-warehouse.yaml +14 -0
- package/recipes/flows/files.yaml +14 -0
- package/recipes/flows/ftp.yaml +14 -0
- package/recipes/flows/google-ads.yaml +13 -0
- package/recipes/flows/google-bigquery.yaml +12 -0
- package/recipes/flows/google-cloud-storage.yaml +14 -0
- package/recipes/flows/greenplum.yaml +12 -0
- package/recipes/flows/hdfs.yaml +14 -0
- package/recipes/flows/hive.yaml +12 -0
- package/recipes/flows/http.yaml +18 -0
- package/recipes/flows/hubspot.yaml +12 -0
- package/recipes/flows/impala.yaml +12 -0
- package/recipes/flows/informix.yaml +13 -0
- package/recipes/flows/jira.yaml +12 -0
- package/recipes/flows/mariadb.yaml +13 -0
- package/recipes/flows/microsoft-365.yaml +19 -0
- package/recipes/flows/microsoft-access.yaml +13 -0
- package/recipes/flows/mongodb-atlas.yaml +12 -0
- package/recipes/flows/mongodb.yaml +12 -0
- package/recipes/flows/mysql.yaml +12 -0
- package/recipes/flows/netezza.yaml +13 -0
- package/recipes/flows/odata.yaml +12 -0
- package/recipes/flows/odbc.yaml +13 -0
- package/recipes/flows/oracle-cloud-storage.yaml +14 -0
- package/recipes/flows/oracle.yaml +12 -0
- package/recipes/flows/postgresql.yaml +18 -0
- package/recipes/flows/presto.yaml +12 -0
- package/recipes/flows/quickbooks.yaml +12 -0
- package/recipes/flows/rest.yaml +21 -0
- package/recipes/flows/s3-compatible.yaml +14 -0
- package/recipes/flows/salesforce-service-cloud.yaml +12 -0
- package/recipes/flows/salesforce.yaml +13 -0
- package/recipes/flows/sap-bw-mdx.yaml +14 -0
- package/recipes/flows/sap-bw-open-hub.yaml +13 -0
- package/recipes/flows/sap-c4c.yaml +12 -0
- package/recipes/flows/sap-ecc.yaml +13 -0
- package/recipes/flows/sap-hana.yaml +14 -0
- package/recipes/flows/sap-table.yaml +13 -0
- package/recipes/flows/servicenow.yaml +12 -0
- package/recipes/flows/sftp.yaml +14 -0
- package/recipes/flows/sharepoint-online-list.yaml +12 -0
- package/recipes/flows/shopify.yaml +12 -0
- package/recipes/flows/snowflake.yaml +15 -0
- package/recipes/flows/spark.yaml +12 -0
- package/recipes/flows/sqlserver.yaml +12 -0
- package/recipes/flows/square.yaml +13 -0
- package/recipes/flows/sybase.yaml +13 -0
- package/recipes/flows/teradata.yaml +12 -0
- package/recipes/flows/vertica.yaml +12 -0
- package/recipes/flows/web-table.yaml +14 -0
- package/recipes/flows/xero.yaml +12 -0
- package/recipes/platform.yaml +29 -0
- package/recipes/project.yaml +10 -0
- package/recipes/sample.yaml +3 -0
- package/recipes/standard.yaml +15 -0
- package/schemas/NOTICE.md +7 -0
- package/schemas/connection.schema.yaml +37 -0
- package/schemas/flow.schema.yaml +125 -0
- package/schemas/odcs-v3.1.0.schema.json +2808 -0
- package/schemas/platform.schema.yaml +260 -0
- package/schemas/standard.schema.yaml +211 -0
- package/schemas/transform.schema.yaml +108 -0
- package/templates/apply-contract.py.liquid +58 -0
- package/templates/change-data.sql.liquid +20 -0
- package/templates/materialised-view.py.liquid +28 -0
- package/templates/materialised-view.sql.liquid +4 -0
- package/templates/read-files.liquid +7 -0
- package/templates/streaming-table.sql.liquid +3 -0
- package/templates/table.liquid +17 -0
- package/CHANGELOG.md +0 -162
- package/SECURITY.md +0 -32
- package/THIRD_PARTY_NOTICES.md +0 -3678
- package/build/cli/cli/index.d.ts +0 -2
- package/build/cli/cli/index.js +0 -685
- package/build/cli/cli/operation-worker.d.ts +0 -1
- package/build/cli/cli/operation-worker.js +0 -5
- package/build/cli/cli/output.d.ts +0 -3
- package/build/cli/cli/output.js +0 -246
- package/build/cli/cli/plugin-browser.d.ts +0 -14
- package/build/cli/cli/plugin-browser.js +0 -74
- package/build/cli/cli/plugin-resolution.d.ts +0 -126
- package/build/cli/cli/plugin-resolution.js +0 -270
- package/build/cli/cli/presentation.d.ts +0 -12
- package/build/cli/cli/presentation.js +0 -57
- package/build/cli/cli/workflow-commands.d.ts +0 -15
- package/build/cli/cli/workflow-commands.js +0 -430
- package/build/cli/mcp/index.d.ts +0 -3
- package/build/cli/mcp/index.js +0 -67
- package/build/cli/version.d.ts +0 -2
- package/build/cli/version.js +0 -14
package/package.json
CHANGED
|
@@ -1,76 +1,43 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ingestron",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
"
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
"
|
|
12
|
-
"build/cli/mcp",
|
|
13
|
-
"README.md",
|
|
14
|
-
"SECURITY.md",
|
|
15
|
-
"CHANGELOG.md",
|
|
16
|
-
"build/cli/version.js",
|
|
17
|
-
"build/cli/version.d.ts",
|
|
18
|
-
"LICENSE",
|
|
19
|
-
"NOTICE",
|
|
20
|
-
"THIRD_PARTY_NOTICES.md"
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"description": "Declare data ingestion in reviewed YAML definitions and generate Databricks and Azure Data Factory files under your standards.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"ingestion",
|
|
7
|
+
"databricks",
|
|
8
|
+
"azure-data-factory",
|
|
9
|
+
"data-engineering",
|
|
10
|
+
"yaml",
|
|
11
|
+
"cli"
|
|
21
12
|
],
|
|
22
|
-
"
|
|
23
|
-
"node": ">=22.12.0"
|
|
24
|
-
},
|
|
25
|
-
"packageManager": "pnpm@10.15.0",
|
|
26
|
-
"scripts": {
|
|
27
|
-
"build": "node scripts/clean-build.mjs && tsc",
|
|
28
|
-
"test": "tsx --test --test-concurrency=1 test/unit/*.test.ts test/providers/*.test.ts test/integration/*.test.ts",
|
|
29
|
-
"format": "prettier --write .",
|
|
30
|
-
"format:check": "prettier --check .",
|
|
31
|
-
"secrets:check": "node scripts/secrets.mjs",
|
|
32
|
-
"validate": "pnpm format:check && pnpm build && pnpm test && pnpm examples:check && pnpm secrets:check && pnpm docs:check && pnpm release:check && pnpm package:check",
|
|
33
|
-
"prepack": "pnpm build",
|
|
34
|
-
"package:check": "tsx scripts/package-check.ts",
|
|
35
|
-
"release:check": "node scripts/release-check.mjs",
|
|
36
|
-
"prepublishOnly": "node scripts/release-check.mjs --publish",
|
|
37
|
-
"docs:check": "node scripts/docs-check.mjs",
|
|
38
|
-
"examples:check": "node examples/quickstart.mjs",
|
|
39
|
-
"licences:inventory": "node scripts/licence-inventory.mjs"
|
|
40
|
-
},
|
|
41
|
-
"dependencies": {
|
|
42
|
-
"@clack/prompts": "1.7.0",
|
|
43
|
-
"@ingestron/core": "0.12.14",
|
|
44
|
-
"@modelcontextprotocol/sdk": "1.30.0",
|
|
45
|
-
"commander": "15.0.0",
|
|
46
|
-
"yaml": "2.9.0"
|
|
47
|
-
},
|
|
48
|
-
"devDependencies": {
|
|
49
|
-
"@types/node": "22.20.1",
|
|
50
|
-
"prettier": "3.9.6",
|
|
51
|
-
"tsx": "4.23.13",
|
|
52
|
-
"typescript": "7.0.2"
|
|
53
|
-
},
|
|
13
|
+
"homepage": "https://docs.ingestron.io",
|
|
54
14
|
"repository": {
|
|
55
15
|
"type": "git",
|
|
56
|
-
"url": "git+https://github.com/ingestron/
|
|
16
|
+
"url": "git+https://github.com/ingestron/ingestron.git",
|
|
17
|
+
"directory": "packages/cli"
|
|
57
18
|
},
|
|
58
|
-
"homepage": "https://ingestron.io",
|
|
59
19
|
"bugs": {
|
|
60
|
-
"url": "https://github.com/ingestron/
|
|
20
|
+
"url": "https://github.com/ingestron/ingestron/issues",
|
|
21
|
+
"email": "hello@ingestron.io"
|
|
61
22
|
},
|
|
62
|
-
"
|
|
63
|
-
|
|
64
|
-
|
|
23
|
+
"author": "IntentLabs <hello@ingestron.io>",
|
|
24
|
+
"license": "Apache-2.0",
|
|
25
|
+
"type": "module",
|
|
26
|
+
"bin": {
|
|
27
|
+
"ingestron": "dist/main.js"
|
|
65
28
|
},
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"
|
|
29
|
+
"engines": {
|
|
30
|
+
"node": ">=22.13.0"
|
|
31
|
+
},
|
|
32
|
+
"files": [
|
|
33
|
+
"dist",
|
|
34
|
+
"schemas",
|
|
35
|
+
"templates",
|
|
36
|
+
"project-templates",
|
|
37
|
+
"recipes",
|
|
38
|
+
"LICENSE",
|
|
39
|
+
"NOTICE",
|
|
40
|
+
"THIRD_PARTY_NOTICES",
|
|
41
|
+
"README.md"
|
|
75
42
|
]
|
|
76
43
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Kafka
|
|
2
|
+
|
|
3
|
+
Two topics of an Event Hubs namespace, read through its Kafka endpoint.
|
|
4
|
+
[The ingestion pipeline](build/dev/resources/clickstream_events_ingestion.pipeline.yml)
|
|
5
|
+
runs on the `PREVIEW` channel, appends every message, and parses JSON values
|
|
6
|
+
with the contract's column types. In production it runs continuously; in
|
|
7
|
+
`dev` it runs when started (`databricks bundle run`), which costs less. Set
|
|
8
|
+
`continuous: true` to change that. The pack chose `mode: append`
|
|
9
|
+
for Kafka by its own rule.
|
|
10
|
+
|
|
11
|
+
Lakeflow Connect for Kafka is in Beta on Databricks (checked 2026-10-25); the
|
|
12
|
+
generated file says so.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
apiVersion: v3.1.0
|
|
2
|
+
kind: DataContract
|
|
3
|
+
id: web.page_views
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
status: active
|
|
6
|
+
schema:
|
|
7
|
+
- name: page_views
|
|
8
|
+
logicalType: object
|
|
9
|
+
description: One event per page view.
|
|
10
|
+
properties:
|
|
11
|
+
- { name: session_id, logicalType: string, required: true }
|
|
12
|
+
- { name: url, logicalType: string }
|
|
13
|
+
- { name: viewed_at, logicalType: timestamp }
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
apiVersion: v3.1.0
|
|
2
|
+
kind: DataContract
|
|
3
|
+
id: web.purchases
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
status: active
|
|
6
|
+
schema:
|
|
7
|
+
- name: purchases
|
|
8
|
+
logicalType: object
|
|
9
|
+
description: One event per purchase.
|
|
10
|
+
properties:
|
|
11
|
+
- { name: order_id, logicalType: string, required: true }
|
|
12
|
+
- { name: amount, logicalType: number, physicalType: "DECIMAL(18,2)" }
|
|
13
|
+
- { name: purchased_at, logicalType: timestamp }
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
apiVersion: ingestron.io/v1
|
|
2
|
+
kind: Flow
|
|
3
|
+
id: events
|
|
4
|
+
source: events
|
|
5
|
+
ingest:
|
|
6
|
+
# Keep append explicit when this flow is composed with a chosen ingestion method.
|
|
7
|
+
with: { starting_offset: earliest, mode: append }
|
|
8
|
+
tables:
|
|
9
|
+
page_views: { object: web.page-views, contract: web.page_views }
|
|
10
|
+
purchases: { object: web.purchases, contract: web.purchases }
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Minimal
|
|
2
|
+
|
|
3
|
+
The standard only names the pack, so every choice is a pack default.
|
|
4
|
+
|
|
5
|
+
| Definition | Becomes |
|
|
6
|
+
| ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
7
|
+
| `flows/orders.yaml` | [a streaming table](build/dev/src/shop/bronze/orders.sql) reading new files once each |
|
|
8
|
+
| `contracts/orders.yaml` | `schemaHints` from the column types, `COMMENT`, and a not-null check on the required `id` |
|
|
9
|
+
| pack defaults | catalog `dev` (the environment), schema `bronze` (the first layer), `CLUSTER BY AUTO`, parquet |
|
|
10
|
+
| `project.yaml` | [a bundle](build/dev/databricks.yml) with one `dev` target in development mode, and [a serverless pipeline](build/dev/resources/shop.pipeline.yml) |
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
apiVersion: v3.1.0
|
|
2
|
+
kind: DataContract
|
|
3
|
+
id: shop.orders
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
status: active
|
|
6
|
+
schema:
|
|
7
|
+
- name: orders
|
|
8
|
+
logicalType: object
|
|
9
|
+
description: One row per order.
|
|
10
|
+
properties:
|
|
11
|
+
- { name: id, logicalType: integer, required: true, primaryKey: true }
|
|
12
|
+
- { name: customer_id, logicalType: integer }
|
|
13
|
+
- { name: total, logicalType: number, physicalType: "DECIMAL(18,2)" }
|
|
14
|
+
- { name: ordered_at, logicalType: timestamp }
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# The smallest project: everything not written here comes from the pack's defaults.
|
|
2
|
+
id: shop
|
|
3
|
+
values:
|
|
4
|
+
landing: /Volumes/dev/landing/shop
|
|
5
|
+
environments:
|
|
6
|
+
dev: {}
|
|
7
|
+
imports:
|
|
8
|
+
- standard.yaml
|
|
9
|
+
- connections/*.yaml
|
|
10
|
+
- flows/*.yaml
|
|
11
|
+
- contracts/*.yaml
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# Used by `ingestron init --template minimal`.
|
|
2
|
+
title: Minimal project
|
|
3
|
+
summary: "Pack defaults only: an Auto Loader streaming table with schema hints and clustering."
|
|
4
|
+
questions:
|
|
5
|
+
- value: landing
|
|
6
|
+
ask: "Where do the source files land?"
|
|
7
|
+
default: /Volumes/dev/landing/shop
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Private file share
|
|
2
|
+
|
|
3
|
+
Each store exports its sales and stock as CSV files to a share inside the
|
|
4
|
+
corporate network, `\\fs01\exports`, which the workspace cannot reach
|
|
5
|
+
(`connectivity: private`). The standard uses two packs,
|
|
6
|
+
`[databricks@1, adf@1]`. Databricks' `files` method cannot reach a private
|
|
7
|
+
source, so the ADF pack's rule chooses `adf-files`:
|
|
8
|
+
|
|
9
|
+
- **ADF** ([build/prod/adf](build/prod/adf/)), in the folder layout ADF
|
|
10
|
+
keeps in Git:
|
|
11
|
+
- a [file server linked service](build/prod/adf/linkedService/ls_stores_share.json)
|
|
12
|
+
through the self-hosted integration runtime `shir-stores`, with the
|
|
13
|
+
password from Key Vault;
|
|
14
|
+
- a [pipeline](build/prod/adf/pipeline/pl_stores_share.json) with one
|
|
15
|
+
binary copy per table: the files changed in the window, from
|
|
16
|
+
`\\fs01\exports\sales` to `<landing>/sales/`, keeping their names and
|
|
17
|
+
folders;
|
|
18
|
+
- an hourly [tumbling window trigger](build/prod/adf/trigger/tr_stores_share.json),
|
|
19
|
+
started in production and stopped elsewhere.
|
|
20
|
+
- **Databricks** ([build/prod/databricks](build/prod/databricks/)): streaming
|
|
21
|
+
tables that read the landing folders with Auto Loader, as CSV with a
|
|
22
|
+
header, typed by the contracts' columns.
|
|
23
|
+
|
|
24
|
+
The files are copied as they are, so the flow says their format
|
|
25
|
+
(`format: csv`). To copy every file each window instead of the changed ones,
|
|
26
|
+
set `mode: all`; to copy only some, set `files`, such as `"*.csv"`.
|
|
27
|
+
|
|
28
|
+
The integration runtime and Key Vault are shared infrastructure: they must
|
|
29
|
+
exist and are only referenced.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
apiVersion: ingestron.io/v1
|
|
2
|
+
kind: Connection
|
|
3
|
+
id: share
|
|
4
|
+
description: The stores' export share, inside the corporate network only.
|
|
5
|
+
connector: files
|
|
6
|
+
connectivity: private
|
|
7
|
+
settings:
|
|
8
|
+
path: '\\fs01\exports'
|
|
9
|
+
user: corp\ingest
|
|
10
|
+
password: ${secret:fs01-password} # a Key Vault secret name
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
apiVersion: v3.1.0
|
|
2
|
+
kind: DataContract
|
|
3
|
+
id: stores.sales
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
status: active
|
|
6
|
+
schema:
|
|
7
|
+
- name: sales
|
|
8
|
+
logicalType: object
|
|
9
|
+
description: One row per sale, exported by each store every hour.
|
|
10
|
+
properties:
|
|
11
|
+
- { name: sale_id, logicalType: string, required: true, primaryKey: true }
|
|
12
|
+
- { name: store_id, logicalType: integer, required: true }
|
|
13
|
+
- { name: amount, logicalType: number, physicalType: "DECIMAL(18,2)" }
|
|
14
|
+
- { name: sold_at, logicalType: timestamp, required: true }
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
apiVersion: v3.1.0
|
|
2
|
+
kind: DataContract
|
|
3
|
+
id: stores.stock
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
status: active
|
|
6
|
+
schema:
|
|
7
|
+
- name: stock
|
|
8
|
+
logicalType: object
|
|
9
|
+
description: Stock on hand per store and product, exported every hour.
|
|
10
|
+
properties:
|
|
11
|
+
- { name: store_id, logicalType: integer, required: true }
|
|
12
|
+
- { name: product_id, logicalType: integer, required: true }
|
|
13
|
+
- { name: on_hand, logicalType: integer }
|
|
14
|
+
- { name: counted_at, logicalType: timestamp, required: true }
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
apiVersion: ingestron.io/v1
|
|
2
|
+
kind: Flow
|
|
3
|
+
id: stores
|
|
4
|
+
source: share
|
|
5
|
+
ingest:
|
|
6
|
+
with: { format: csv, options: { header: true } } # the files' own format
|
|
7
|
+
tables:
|
|
8
|
+
sales: { object: sales, contract: stores.sales }
|
|
9
|
+
stock: { object: stock, contract: stores.stock }
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
apiVersion: ingestron.io/v1
|
|
2
|
+
kind: Platform
|
|
3
|
+
id: lakehouse
|
|
4
|
+
schedule:
|
|
5
|
+
cron: 0 15 * * * ?
|
|
6
|
+
timezone: Pacific/Auckland
|
|
7
|
+
settings:
|
|
8
|
+
adf-files: # shared infrastructure, referenced by name
|
|
9
|
+
landing: ${values.landing}
|
|
10
|
+
key_vault: ${values.key_vault}
|
|
11
|
+
integration_runtime: shir-stores
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Store exports on a file share inside the corporate network. ADF copies new
|
|
2
|
+
# files through a self-hosted integration runtime into a landing folder as
|
|
3
|
+
# they are; Databricks reads them there with Auto Loader.
|
|
4
|
+
id: stores
|
|
5
|
+
environments:
|
|
6
|
+
dev: {}
|
|
7
|
+
prod:
|
|
8
|
+
values:
|
|
9
|
+
landing: abfss://landing@storeslakeprod.dfs.core.windows.net/stores
|
|
10
|
+
key_vault: https://kv-stores-prod.vault.azure.net
|
|
11
|
+
values:
|
|
12
|
+
landing: abfss://landing@storeslakedev.dfs.core.windows.net/stores
|
|
13
|
+
key_vault: https://kv-stores-dev.vault.azure.net
|
|
14
|
+
imports:
|
|
15
|
+
- standard.yaml
|
|
16
|
+
- platform.yaml
|
|
17
|
+
- connections/*.yaml
|
|
18
|
+
- flows/*.yaml
|
|
19
|
+
- contracts/*.yaml
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
apiVersion: ingestron.io/v1
|
|
2
|
+
kind: Standard
|
|
3
|
+
id: stores
|
|
4
|
+
packs: [databricks@1, adf@1] # Databricks first: it provides the defaults
|
|
5
|
+
naming:
|
|
6
|
+
catalog: stores_{{ environment }}
|
|
7
|
+
ingest:
|
|
8
|
+
settings:
|
|
9
|
+
adf-files: # the schedule; where it lands is the platform's
|
|
10
|
+
every: { frequency: Hour, interval: 1 }
|
|
11
|
+
start: 2026-10-01T00:00:00Z
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Used by `ingestron init --template private-files`.
|
|
2
|
+
title: Private file share through Azure Data Factory
|
|
3
|
+
summary: "Two packs: ADF copies new files from a private share into landing storage and Databricks reads them."
|
|
4
|
+
questions:
|
|
5
|
+
- value: landing
|
|
6
|
+
ask: "Landing folder for the copied files (abfss://…)"
|
|
7
|
+
default: abfss://landing@storeslakedev.dfs.core.windows.net/stores
|
|
8
|
+
- value: key_vault
|
|
9
|
+
ask: "Key Vault holding the share account's password"
|
|
10
|
+
default: https://kv-stores-dev.vault.azure.net
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Private SQL Server
|
|
2
|
+
|
|
3
|
+
The ERP of the sql-server starter, but now **unreachable** from the workspace
|
|
4
|
+
(`connectivity: private`). The standard uses two packs,
|
|
5
|
+
`[databricks@1, adf@1]`. Databricks' Lakeflow Connect rule is skipped
|
|
6
|
+
because it cannot reach a private source, and the ADF pack's rule chooses
|
|
7
|
+
`adf-copy`:
|
|
8
|
+
|
|
9
|
+
- **ADF** ([build/prod/adf](build/prod/adf/)), in the folder layout ADF
|
|
10
|
+
keeps in Git:
|
|
11
|
+
- a [SQL Server linked service](build/prod/adf/linkedService/ls_erp_erp_erp.json)
|
|
12
|
+
through the self-hosted integration runtime `shir-erp`, with the password
|
|
13
|
+
from Key Vault;
|
|
14
|
+
- a [pipeline](build/prod/adf/pipeline/pl_erp_erp.json) with one copy per
|
|
15
|
+
table, selecting only the contract's columns changed in the window, into
|
|
16
|
+
`<landing>/erp.dbo.Customers/` as Parquet;
|
|
17
|
+
- an hourly [tumbling window trigger](build/prod/adf/trigger/tr_erp_erp.json),
|
|
18
|
+
started in production and stopped elsewhere.
|
|
19
|
+
- **Databricks** ([build/prod/databricks](build/prod/databricks/)): streaming
|
|
20
|
+
tables over the same landing folders that keep the current row per key
|
|
21
|
+
(`mode: upsert`), and the refresh job.
|
|
22
|
+
|
|
23
|
+
Each side runs on its own schedule; Auto Loader picks up new files whenever
|
|
24
|
+
the pipeline runs. The integration runtime and Key Vault are shared
|
|
25
|
+
infrastructure: they must exist and are only referenced.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
apiVersion: ingestron.io/v1
|
|
2
|
+
kind: Connection
|
|
3
|
+
id: erp
|
|
4
|
+
description: The ERP's SQL Server, inside the corporate network only.
|
|
5
|
+
connector: sqlserver
|
|
6
|
+
connectivity: private
|
|
7
|
+
settings:
|
|
8
|
+
server: erp-sql01.corp.local
|
|
9
|
+
user: ingest_reader
|
|
10
|
+
password: ${secret:erp-sql-password} # a Key Vault secret name
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
apiVersion: v3.1.0
|
|
2
|
+
kind: DataContract
|
|
3
|
+
id: erp.customers
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
status: active
|
|
6
|
+
schema:
|
|
7
|
+
- name: customers
|
|
8
|
+
logicalType: object
|
|
9
|
+
description: ERP customers.
|
|
10
|
+
properties:
|
|
11
|
+
- { name: customer_id, logicalType: integer, required: true, primaryKey: true }
|
|
12
|
+
- { name: name, logicalType: string }
|
|
13
|
+
- { name: country, logicalType: string }
|
|
14
|
+
- { name: modified_at, logicalType: timestamp, required: true }
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
apiVersion: v3.1.0
|
|
2
|
+
kind: DataContract
|
|
3
|
+
id: erp.invoices
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
status: active
|
|
6
|
+
schema:
|
|
7
|
+
- name: invoices
|
|
8
|
+
logicalType: object
|
|
9
|
+
description: ERP invoices.
|
|
10
|
+
properties:
|
|
11
|
+
- { name: invoice_id, logicalType: integer, required: true, primaryKey: true }
|
|
12
|
+
- { name: customer_id, logicalType: integer, required: true }
|
|
13
|
+
- { name: amount, logicalType: number, physicalType: "DECIMAL(18,2)" }
|
|
14
|
+
- { name: status, logicalType: string }
|
|
15
|
+
- { name: updated_at, logicalType: timestamp, required: true }
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
apiVersion: ingestron.io/v1
|
|
2
|
+
kind: Flow
|
|
3
|
+
id: erp
|
|
4
|
+
source: erp
|
|
5
|
+
tables:
|
|
6
|
+
customers: { object: erp.dbo.Customers, contract: erp.customers }
|
|
7
|
+
invoices:
|
|
8
|
+
object: erp.dbo.Invoices
|
|
9
|
+
contract: erp.invoices
|
|
10
|
+
ingest:
|
|
11
|
+
with: { watermark_column: updated_at }
|
|
12
|
+
store:
|
|
13
|
+
with: { sequence_by: updated_at }
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
apiVersion: ingestron.io/v1
|
|
2
|
+
kind: Platform
|
|
3
|
+
id: lakehouse
|
|
4
|
+
schedule:
|
|
5
|
+
cron: 0 15 * * * ?
|
|
6
|
+
timezone: Pacific/Auckland
|
|
7
|
+
settings:
|
|
8
|
+
adf-copy: # shared infrastructure, referenced by name
|
|
9
|
+
landing: ${values.landing}
|
|
10
|
+
key_vault: ${values.key_vault}
|
|
11
|
+
integration_runtime: shir-erp
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# The same ERP as the sql-server starter, but the workspace cannot reach it. ADF copies
|
|
2
|
+
# the changed rows through a self-hosted integration runtime into a landing
|
|
3
|
+
# folder; Databricks keeps the tables current from those files.
|
|
4
|
+
id: erp
|
|
5
|
+
environments:
|
|
6
|
+
dev: {}
|
|
7
|
+
prod:
|
|
8
|
+
values:
|
|
9
|
+
landing: abfss://landing@erplakeprod.dfs.core.windows.net/erp
|
|
10
|
+
key_vault: https://kv-erp-prod.vault.azure.net
|
|
11
|
+
values:
|
|
12
|
+
landing: abfss://landing@erplakedev.dfs.core.windows.net/erp
|
|
13
|
+
key_vault: https://kv-erp-dev.vault.azure.net
|
|
14
|
+
imports:
|
|
15
|
+
- standard.yaml
|
|
16
|
+
- platform.yaml
|
|
17
|
+
- connections/*.yaml
|
|
18
|
+
- flows/*.yaml
|
|
19
|
+
- contracts/*.yaml
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
apiVersion: ingestron.io/v1
|
|
2
|
+
kind: Standard
|
|
3
|
+
id: erp
|
|
4
|
+
packs: [databricks@1, adf@1] # Databricks first: it provides the defaults
|
|
5
|
+
naming:
|
|
6
|
+
catalog: erp_{{ environment }}
|
|
7
|
+
ingest:
|
|
8
|
+
settings:
|
|
9
|
+
adf-copy: # the schedule; where it lands is the platform's
|
|
10
|
+
mode: incremental
|
|
11
|
+
watermark_column: modified_at
|
|
12
|
+
every: { frequency: Hour, interval: 1 }
|
|
13
|
+
start: 2026-10-01T00:00:00Z
|
|
14
|
+
store:
|
|
15
|
+
settings:
|
|
16
|
+
# Each window's file holds the rows changed in it; keep the current version.
|
|
17
|
+
streaming-table: { mode: upsert, sequence_by: modified_at }
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Used by `ingestron init --template private-sql-server`.
|
|
2
|
+
title: Private SQL Server through Azure Data Factory
|
|
3
|
+
summary: "Two packs: ADF copies a private SQL Server into landing storage and Databricks keeps the tables current."
|
|
4
|
+
questions:
|
|
5
|
+
- value: landing
|
|
6
|
+
ask: "Landing folder for the copied files (abfss://…)"
|
|
7
|
+
default: abfss://landing@erplakedev.dfs.core.windows.net/erp
|
|
8
|
+
- value: key_vault
|
|
9
|
+
ask: "Key Vault holding the SQL login's password"
|
|
10
|
+
default: https://kv-erp-dev.vault.azure.net
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# PySpark
|
|
2
|
+
|
|
3
|
+
`monthly_revenue` is written in PySpark (`transform: { uses: pyspark }`).
|
|
4
|
+
[Its code](transforms/monthly_revenue.py) only defines
|
|
5
|
+
`transform(tables)`, which receives a DataFrame per input and returns the
|
|
6
|
+
result. The pack generates [a Python file](build/dev/src/subscriptions/silver/monthly_revenue.py)
|
|
7
|
+
that copies the code unchanged and wraps it as a materialised view with the
|
|
8
|
+
pipelines Python API (`from pyspark import pipelines as dp`): the full name,
|
|
9
|
+
comment and clustering from the definitions, and the checks as
|
|
10
|
+
`expect_all…` decorators.
|
|
11
|
+
|
|
12
|
+
The bronze table stays SQL; one pipeline runs both files.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
apiVersion: v3.1.0
|
|
2
|
+
kind: DataContract
|
|
3
|
+
id: billing.invoices
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
status: active
|
|
6
|
+
schema:
|
|
7
|
+
- name: invoices
|
|
8
|
+
logicalType: object
|
|
9
|
+
description: Invoices from the billing system.
|
|
10
|
+
properties:
|
|
11
|
+
- { name: invoice_id, logicalType: string, required: true, primaryKey: true }
|
|
12
|
+
- { name: customer_id, logicalType: string, required: true }
|
|
13
|
+
- { name: plan, logicalType: string }
|
|
14
|
+
- { name: amount, logicalType: number, physicalType: "DECIMAL(18,2)" }
|
|
15
|
+
- { name: status, logicalType: string }
|
|
16
|
+
- { name: issued_at, logicalType: timestamp }
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
apiVersion: v3.1.0
|
|
2
|
+
kind: DataContract
|
|
3
|
+
id: billing.monthly_revenue
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
status: active
|
|
6
|
+
schema:
|
|
7
|
+
- name: monthly_revenue
|
|
8
|
+
logicalType: object
|
|
9
|
+
description: Paid revenue and customers per month and plan.
|
|
10
|
+
properties:
|
|
11
|
+
- { name: month, logicalType: timestamp, required: true }
|
|
12
|
+
- { name: plan, logicalType: string }
|
|
13
|
+
- { name: revenue, logicalType: number, physicalType: "DECIMAL(18,2)" }
|
|
14
|
+
- { name: customers, logicalType: integer }
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# A transform written in PySpark: the code is a function that receives a
|
|
2
|
+
# DataFrame per input and returns the result.
|
|
3
|
+
id: subscriptions
|
|
4
|
+
environments:
|
|
5
|
+
dev: {}
|
|
6
|
+
imports:
|
|
7
|
+
- standard.yaml
|
|
8
|
+
- connections/*.yaml
|
|
9
|
+
- flows/*.yaml
|
|
10
|
+
- transforms/*.yaml
|
|
11
|
+
- contracts/*.yaml
|