Build Node.js Apps on Your Business Data with the New CData CLI
The CData CLI is a command-line tool that lets AI coding agents like Claude Code, Cursor, GitHub Copilot, and Gemini CLI reach your business data through CData drivers. Salesforce, NetSuite, Jira, Snowflake, SAP, and hundreds of other SaaS and database sources become queryable right from your terminal.
This article focuses on using the CLI for building Node.js applications (and, through ODBC, apps in any non-JVM language). AI coding agents are great at writing JavaScript, but they stumble the moment that code has to talk to a real system. The problem isn't code generation; it's that the agent has no grounded picture of your data. The CData CLI fixes that.
The architecture: one data model, many drivers
CData drivers (JDBC, ADO.NET, ODBC, and the Python Connector) expose the same relational model over the same SQL dialect. A Salesforce org or Jira project is presented as tables, columns, and stored procedures. The edition you use changes how your program links to the driver, but the tables, columns, and SQL do not.
- cdatacli is a Java tool that runs on the JDBC driver (requires Java 17+). Through it you create a connection, list tables and columns, and run real SQL against the live source.
- Because the model is shared, anything you validate through the CLI transfers verbatim to whatever edition your app uses. The SELECT ... FROM Opportunity you confirm at the command line is the same statement your Node.js app runs through the ODBC driver.
Two-phase workflow:
Discovery ──► cdatacli (JDBC) → connect, list tables/columns, validate SQL
│
▼ (same data model + SQL)
Build ──► CData ODBC Driver → write the Node.js app
From workflow to skill
Skills are instruction files an AI coding tool loads on demand:
- cdata-cli: the discovery skill. Connect to a source, explore schema, validate SQL, download and activate JDBC drivers.
- cdata-cli-odbc: the ODBC build skill. Takes over once discovery is done and you're ready to write Node.js.
cdata-cli is language-agnostic and is where the grounding happens. The build skill focuses on the parts specific to the ODBC driver: confirming it's installed and wiring up the connection string.
What the ODBC skill handles
npx skills add CDataSoftware/cli-skills --skill cdata-cli-odbc
cdata-cli-odbc encodes the non-obvious specifics of the ODBC driver:
- Language to edition mapping. Node.js and other non-JVM languages like Go, Ruby, or Rust use the CData ODBC Driver through the language's ODBC binding. For Node.js, that's the odbc npm package. ODBC is the cross-language fallback for any runtime with no dedicated CData edition.
- Getting the driver. Unlike the other editions, the ODBC driver is a system-installed driver registered with the OS ODBC Driver Manager, installed from a CData ODBC setup package, not fetched from a package repo. cdatacli has no role in installing it, and its bitness (32/64-bit) must match the app process.
- Licensing is separate and per-machine. A working cdatacli connection proves the JDBC edition is licensed, not the ODBC driver. The ODBC driver is licensed as part of its installation (trial or product key), independent of the other editions.
The net effect: the agent confirms the right driver is installed, points at it via a DSN or DSN-less connection string, and writes correct ODBC code on the first try, reusing the SQL it already validated.
Example: building a real Node.js app
Prompt given to an AI coding agent with both skills installed:
"using /cdata-cli, build a node.js GUI that connects to salesforce sbx that combines my top 10 accounts with other important salesforce data."
The agent handled it in two phases: discovery with cdata-cli, then build with cdata-cli-odbc. (Account names below are generalized.)
Step 1 — Discovery: confirm the connection (via the CLI, on JDBC)
The agent confirmed the Salesforce driver and an existing sandbox connection, then ran a live count:
cdatacli drivers list
cdatacli query sql --connection salesforce-sbx --sql "SELECT COUNT(*) AS c FROM Account"
{ "resultset": [ { "c": 10052 } ] }
Step 2 — Discovery: validate the "combine" queries
"Combine my top 10 accounts with other important data" means joining three Salesforce objects. The agent worked out and validated each query against live data in the CLI: rank accounts by open Opportunity pipeline, then enrich with Account profile and Contact counts.
cdatacli query sql --connection salesforce-sbx --sql "SELECT AccountId, COUNT(*) AS OpenOpps, SUM(Amount) AS Pipeline FROM Opportunity WHERE IsClosed = false AND Amount > 0 GROUP BY AccountId ORDER BY SUM(Amount) DESC LIMIT 10"
cdatacli query sql --connection salesforce-sbx --sql "SELECT Id, Name, Industry, AnnualRevenue FROM Account WHERE Id IN (…)"
cdatacli query sql --connection salesforce-sbx --sql "SELECT AccountId, COUNT(*) AS Contacts FROM Contact WHERE AccountId IN (…) GROUP BY AccountId"
{ "resultset": [
{ "AccountId": "001TV…", "OpenOpps": 1, "Pipeline": 299960.00 },
{ "AccountId": "001TV…", "OpenOpps": 1, "Pipeline": 185621.73 },
{ "AccountId": "001TV…", "OpenOpps": 2, "Pipeline": 115491.35 }
] }
This is the key architectural moment. Aggregations, GROUP BY, IN (…): all validated here through the JDBC-backed CLI. Because every CData edition shares one data model, these exact statements run unchanged through ODBC in the app.
Step 3 — Handoff to the ODBC build skill
cdata-cli-odbc confirmed the CData Salesforce ODBC driver was installed (a system driver, not a package-repo download) and that a Salesforce SBX DSN already existed, reusing the sandbox OAuth token. Then the Node side required just two packages:
npm install express odbc
A separate driver edition. ODBC isn't the JDBC driver the CLI used. It's a system-installed driver the app reaches through a DSN. The odbc npm package is the language binding; the Salesforce SBX DSN carries the connection so no secrets live in code.
Step 4 — The build: combine the data
The agent wrote an Express app that runs the validated queries through the odbc package (? placeholders, pooled connection) and merges them into one row per account:
import odbc from "odbc";
const pool = await odbc.pool("DSN=Salesforce SBX");
// top 10 accounts by open pipeline
const opps = await pool.query(
"SELECT AccountId, COUNT(*) AS OpenOpps, SUM(Amount) AS Pipeline FROM Opportunity " +
"WHERE IsClosed = false AND Amount > 0 GROUP BY AccountId ORDER BY SUM(Amount) DESC LIMIT 10");
const ids = opps.map(o => o.AccountId);
const ph = ids.map(() => "?").join(", ");
const accounts = await pool.query(`SELECT Id, Name, Industry, AnnualRevenue FROM Account WHERE Id IN (${ph})`, ids);
const contacts = await pool.query(`SELECT AccountId, COUNT(*) AS Contacts FROM Contact WHERE AccountId IN (${ph}) GROUP BY AccountId`, ids);
// merge opps + accounts + contacts into one row per account, served at /api/dashboard
Step 5 — Run it: the dashboard
npm start, open the browser, and the GUI renders the combined view: top accounts by pipeline, each with account profile and contact count pulled from separate Salesforce objects:
Top 10 Accounts by Open Pipeline [Salesforce sandbox · ODBC]
# Account Industry Annual Rev Open Opps Pipeline Contacts
1 Account A Insurance $42M 1 $300K 0
2 Account B IT & Services $12,871M 1 $186K 1
3 Account C Industrial Eng. $900M 1 $125K 0
4 Account D Industrial Cong. $50M 1 $120K 2
5 Account E Internet Software $2,100M 2 $115K 4
6 Account F IT Services $378M 1 $112K 12
7 Account G IT & Services $7M 1 $111K 4
8 Account H Media $1,410M 1 $100K 3
9 Account I Utilities $1,234M 1 $85K 6
10 Account J IT Services $3M 1 $80K 1
Each row stitches together three Salesforce objects (Opportunity, Account, and Contact) that the app never had to guess the shape of. From "combine my top accounts with other important Salesforce data" to a working Node.js dashboard came out of one prompt, because the agent grounded itself with the CLI first, then built against the same data model through ODBC.
Get started
The CData CLI turns any AI coding agent into one that can build real, data-connected Node.js apps grounded in your actual schema.
Download the CLI
macOS:
curl -fsSL https://downloads.cdata.com/cdatabuilds/builds/free/cdatacli/install-cdatacli-macos.sh | bash
Windows:
irm https://downloads.cdata.com/cdatabuilds/builds/free/cdatacli/install-cdatacli-windows.ps1 | iex
Linux:
curl -fsSL https://downloads.cdata.com/cdatabuilds/builds/free/cdatacli/install-cdatacli-linux.sh | bash
Download all CLI skills:
npx skills add CDataSoftware/cli-skills
Download the ODBC CLI skill:
npx skills add CDataSoftware/cli-skills --skill cdata-cli-odbc
Questions? Contact our support team.