@ingestron/cli 1.2.0 → 1.3.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.
@@ -1 +1 @@
1
- {"version":3,"file":"packs.d.ts","sourceRoot":"","sources":["../src/packs.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAKnD,iDAAiD;AACjD,eAAO,MAAM,KAAK,EAAE,IAAI,EAA+B,CAAC"}
1
+ {"version":3,"file":"packs.d.ts","sourceRoot":"","sources":["../src/packs.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAMnD,iDAAiD;AACjD,eAAO,MAAM,KAAK,EAAE,IAAI,EAAuC,CAAC"}
package/dist/packs.js CHANGED
@@ -1,6 +1,7 @@
1
1
  import { adf } from "@ingestron/pack-adf";
2
2
  import { databricks } from "@ingestron/pack-databricks";
3
+ import { duckdb } from "@ingestron/pack-duckdb";
3
4
  import { synapse } from "@ingestron/pack-synapse";
4
5
  /** The packs available to `ingestron`, by id. */
5
- export const packs = [databricks, adf, synapse];
6
+ export const packs = [databricks, adf, synapse, duckdb];
6
7
  //# sourceMappingURL=packs.js.map
package/dist/packs.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"packs.js","sourceRoot":"","sources":["../src/packs.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAElD,iDAAiD;AACjD,MAAM,CAAC,MAAM,KAAK,GAAW,CAAC,UAAU,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC"}
1
+ {"version":3,"file":"packs.js","sourceRoot":"","sources":["../src/packs.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAElD,iDAAiD;AACjD,MAAM,CAAC,MAAM,KAAK,GAAW,CAAC,UAAU,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ingestron/cli",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "description": "ingestron plan | apply | check | schemas: generate platform assets from definitions.",
5
5
  "license": "Apache-2.0",
6
6
  "author": "IntentLabs <hello@ingestron.io>",
@@ -36,13 +36,15 @@
36
36
  "dependencies": {
37
37
  "@ingestron/pack-adf": "^1.1.0",
38
38
  "@ingestron/pack-databricks": "^1.0.0",
39
- "yaml": "2.9.1",
39
+ "@ingestron/pack-duckdb": "^1.0.0",
40
40
  "@ingestron/pack-synapse": "^1.0.1",
41
- "@ingestron/config": "^1.0.0",
42
- "@ingestron/definitions": "^1.2.0",
43
- "@ingestron/generate": "^1.0.0"
41
+ "yaml": "2.9.1",
42
+ "@ingestron/config": "^1.1.0",
43
+ "@ingestron/generate": "^1.0.0",
44
+ "@ingestron/definitions": "^1.3.1"
44
45
  },
45
46
  "devDependencies": {
47
+ "@duckdb/node-api": "1.5.6-r.2",
46
48
  "@microsoft/api-extractor": "7.59.4",
47
49
  "@types/node": "22.20.5",
48
50
  "ajv": "8.20.0",
@@ -0,0 +1,26 @@
1
+ # DuckDB on a laptop
2
+
3
+ Sample orders loaded into a local DuckDB database, a SQL transform over them,
4
+ and both tables published as Parquet: nothing to set up but the DuckDB command
5
+ line.
6
+
7
+ | File | What it shows |
8
+ | --------------------------------- | ------------------------------------------------------ |
9
+ | `standard.yaml` | `packs: [duckdb@1]`, and CSV files |
10
+ | `platform.yaml` | `published`: the folder each table is published to |
11
+ | `connections/shop.yaml` | A files source in the project folder, `./samples` |
12
+ | `flows/orders.yaml` | `samples/orders.csv` becomes the table `bronze.orders` |
13
+ | `transforms/customer_totals.yaml` | SQL over the orders, kept as `silver.customer_totals` |
14
+ | `contracts/*.yaml` | ODCS contracts: the columns and their types |
15
+
16
+ From the project folder:
17
+
18
+ ```sh
19
+ ingestron apply
20
+ duckdb ingestron.duckdb < build/dev/run.sql
21
+ duckdb ingestron.duckdb "SELECT * FROM silver.customer_totals"
22
+ ```
23
+
24
+ Running again is safe. Each run publishes `published/bronze.orders.parquet`
25
+ and `published/silver.customer_totals.parquet`, which Power BI and other tools
26
+ read as files.
@@ -0,0 +1,8 @@
1
+ apiVersion: ingestron.io/v1
2
+ kind: Connection
3
+ id: shop
4
+ description: The shop's order exports, in the project folder.
5
+ connector: files
6
+ connectivity: public
7
+ settings:
8
+ path: ./samples
@@ -0,0 +1,13 @@
1
+ apiVersion: v3.1.0
2
+ kind: DataContract
3
+ id: shop.customer_totals
4
+ version: 1.0.0
5
+ status: active
6
+ schema:
7
+ - name: customer_totals
8
+ logicalType: object
9
+ description: Orders and their total per customer.
10
+ properties:
11
+ - { name: customer, logicalType: string, primaryKey: true }
12
+ - { name: orders, logicalType: integer }
13
+ - { name: total, logicalType: number }
@@ -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: order_id, logicalType: integer, required: true, primaryKey: true }
12
+ - { name: customer, logicalType: string }
13
+ - { name: amount, logicalType: number }
14
+ - { name: ordered_at, logicalType: date }
@@ -0,0 +1,6 @@
1
+ apiVersion: ingestron.io/v1
2
+ kind: Flow
3
+ id: orders
4
+ source: shop
5
+ tables:
6
+ orders: { object: orders.csv, contract: shop.orders }
@@ -0,0 +1,6 @@
1
+ apiVersion: ingestron.io/v1
2
+ kind: Platform
3
+ id: laptop
4
+ settings:
5
+ duckdb-table:
6
+ published: ./published # each table as <schema>.<table>.parquet
@@ -0,0 +1,12 @@
1
+ # Runs on a laptop: DuckDB reads samples/, keeps the tables in ingestron.duckdb
2
+ # and publishes each one to published/ as Parquet.
3
+ id: shop
4
+ environments:
5
+ dev: {}
6
+ imports:
7
+ - standard.yaml
8
+ - platform.yaml
9
+ - connections/*.yaml
10
+ - flows/*.yaml
11
+ - transforms/*.yaml
12
+ - contracts/*.yaml
File without changes
@@ -0,0 +1,6 @@
1
+ order_id,customer,amount,ordered_at
2
+ 1,Aroha,25.50,2026-10-01
3
+ 2,Ben,12.00,2026-10-01
4
+ 3,Aroha,40.25,2026-10-02
5
+ 4,Chen,8.75,2026-10-03
6
+ 5,Ben,30.00,2026-10-03
@@ -0,0 +1,7 @@
1
+ apiVersion: ingestron.io/v1
2
+ kind: Standard
3
+ id: defaults
4
+ packs: [duckdb@1]
5
+ ingest:
6
+ settings:
7
+ duckdb-files: { format: csv } # header row, comma-separated
@@ -0,0 +1,3 @@
1
+ # Used by `ingestron init --template duckdb`.
2
+ title: DuckDB on a laptop
3
+ summary: Sample orders loaded into a local DuckDB database, a SQL transform over them, and both tables published as Parquet.
@@ -0,0 +1,10 @@
1
+ apiVersion: ingestron.io/v1
2
+ kind: Transform
3
+ id: customer_totals
4
+ description: Orders and their total per customer.
5
+ inputs: [orders]
6
+ code: |
7
+ SELECT customer, count(*) AS orders, sum(amount) AS total
8
+ FROM {{ tables.orders }}
9
+ GROUP BY customer
10
+ contract: shop.customer_totals