SQL Server read through its own export: bcp
Goal Read the orders of a SQL Server database although lumnik has no dialect for it: through the bcp export, a shifted line set aside with its reason.
The .NET world keeps its data in SQL Server. jdbc-generic speaks PostgreSQL and Oracle: asked for jdbc:sqlserver, it refuses before any connection and says what it has. The working path is SQL Server's export tool, bcp.
- the refusal, named, at validate
- bcp: no header, no quoting
- a ; in a name shifts the line: it is set aside
manifests/10-jdbc-refused.yaml
# What an integrator tries first: SQL Server through jdbc-generic. Refused at validate: no dialect provider for it.apiVersion: connectors.lumnik.io/v1kind: Connectormetadata: name: scenario-mssql-orders-a connector_type: jdbc-generic scopes: [erp-a]spec: connection: url: jdbc:sqlserver://host.docker.internal:14333;databaseName=erp;encrypt=false user: lumnik_reader password_env: SCENARIO_MSSQL_A_DB source: tables: - name: Orders schema: dbo mode: full pk_columns: [OrderId]$ lm validate -f 10-jdbc-refused.yaml
✗ 10-jdbc-refused.yaml — 1 error(s), 0 warning(s)
ERROR spec.connection.url
no installed JDBC dialect accepts url scheme 'jdbc:sqlserver' — install its provider, or set 'dialect'. Available: oracle, postgres
Fix errors above before running 'lm apply -f 10-jdbc-refused.yaml'.
Error: validation failed: 1 error(s)- jdbc-generic
- no installed JDBC dialect accepts url scheme 'jdbc:sqlserver' — install its provider, or set 'dialect'. Available: oracle, postgres
evidence: replay.log, 01-sqlserver-orders.txt, 02-jdbc-refused.txt, 03-bcp.txt, 04-run.json, 05-dead-letter.txt · transform v1
1;SO-0001;Boulangerie Rémy;2026-10-02 08:15:00.0000000;184.50;Shipped 2;SO-0002;Garage Lefèvre;2026-10-03 10:40:00.0000000;1290.00;Open 3;SO-0003;Café de la Gare;2026-10-05 14:05:00.0000000;62.30;Shipped 4;SO-0004;Dupont; Fils;2026-10-07 09:20:00.0000000;455.00;Open 5;SO-0005;Imprimerie Saint-Éloi;2026-10-08 16:55:00.0000000;2310.75;Shipped 6;SO-0006;Pharmacie du Port;2026-10-09 11:30:00.0000000;98.10;Open
manifests/20-bcp-orders.yaml
apiVersion: connectors.lumnik.io/v1kind: Connectormetadata: name: scenario-mssql-bcp-a connector_type: csv-file scopes: [erp-a]spec: transport: kind: sftp host: host.docker.internal port: 2227 user: erp path: /exports/orders.csv password_env: SCENARIO_MSSQL_A_SFTP # The fingerprint the export server presents, read out of band (ssh-keyscan | ssh-keygen -lf -). host_key_fingerprint: "SHA256:FINGERPRINT_READ_AT_REPLAY" parser: has_header: false # bcp writes no header row columns: [order_id, order_no, customer, ordered_at, amount, status] delimiter: ";" # bcp -t ";": no quoting — a line with one ; too many is set aside by the parser encoding: UTF-8 after_process: none mapping: cell: - parse-number: { column: amount, decimal-separator: "." } - parse-date: { column: ordered_at, formats: ["yyyy-MM-dd HH:mm:ss.SSSSSSS"], zone: Europe/Paris }$ lm apply -f 20-bcp-orders.yaml
Applied connector "scenario-mssql-bcp-a" — 1 endpoint
$ lm connector run scenario-mssql-bcp-a
run scheduled: 50ed05fd-2da5-4951-b459-b0d5292841c5
$ lm run get 50ed05fd-2da5-4951-b459-b0d5292841c5 --wait-evaluated
ID CONNECTOR ENDPOINT STATUS IN OUT SKIPPED DEAD-LETTERS STARTED ENDED EVALUATED
50ed05fd scenario-mssql-bcp-a default Completed 6 5 1 1 2026-11-21 22:09 2026-11-21 22:09 yes
⚠ 1 rows quarantined — see: lm dlq list --run 50ed05fd-2da5-4951-b459-b0d5292841c5
$ lm dlq get 3ed69aaf-5d3d-4711-acd1-5c20f70ce59a
ID: 3ed69aaf-5d3d-4711-acd1-5c20f70ce59a
Connector: scenario-mssql-bcp-a (c66c17e9-d3b0-4472-a0f1-0eadd3c38f0f)
Run: 50ed05fd-2da5-4951-b459-b0d5292841c5
Reason: MalformedSource
Attempts: 1
Message: /exports/orders.csv:4 — Record has 7 values but only 6 columns are declared
Detail: {"file":"/exports/orders.csv","line":4,"message":"Record has 7 values but only 6 columns are declared"}
Payload: {"raw":["4","SO-0004","Dupont"," Fils","2026-10-07 09:20:00.0000000","455.00","Open"],"file":"/exports/orders.csv","line":4}
Resolution: open- run
- IN 6 · OUT 5 · SKIPPED 1
- set aside
- /exports/orders.csv:4 — Record has 7 values but only 6 columns are declared
- as read
- ["4","SO-0004","Dupont"," Fils","2026-10-07 09:20:00.0000000","455.00","Open"]
evidence: replay.log, 01-sqlserver-orders.txt, 02-jdbc-refused.txt, 03-bcp.txt, 04-run.json, 05-dead-letter.txt · transform v1
Limits
- No SQL Server dialect: a provider would read the table directly, and incrementally. It does not exist.
- Pick a separator the data cannot hold: a tab or a bcp format file. The scenario keeps ; to show the defect.
- An export is a snapshot: each run reads what the last bcp wrote.
- Six synthetic orders.
This scenario runs on lumnik Open, free and open source.
Try lumnik Open →