Skip to content

Commit c977c7c

Browse files
committed
add netsuite source connector
1 parent 0efb47c commit c977c7c

6 files changed

Lines changed: 1167 additions & 0 deletions

File tree

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,11 @@ Pull requests are welcome. However, please open an issue first to discuss what y
280280
<td>✅</td>
281281
<td>-</td>
282282
</tr>
283+
<tr>
284+
<td>NetSuite</td>
285+
<td>✅</td>
286+
<td>-</td>
287+
</tr>
283288
<tr>
284289
<td>Notion</td>
285290
<td>✅</td>

docs/supported-sources/netsuite.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# NetSuite
2+
3+
[NetSuite](https://www.netsuite.com/) is a cloud ERP platform from Oracle.
4+
5+
ingestr supports NetSuite as a source through SuiteTalk REST Web Services and SuiteQL.
6+
7+
## URI Format
8+
9+
Use an existing OAuth 2.0 access token:
10+
11+
```text
12+
netsuite://?account_id=<account_id>&access_token=<access_token>
13+
```
14+
15+
Or use OAuth 2.0 client credentials with a certificate mapping:
16+
17+
```text
18+
netsuite://?account_id=<account_id>&client_id=<client_id>&certificate_id=<certificate_id>&private_key_path=/path/to/private-key.pem
19+
```
20+
21+
URI parameters:
22+
23+
- `account_id`: NetSuite account ID used in the account-specific SuiteTalk REST domain.
24+
- `access_token`: OAuth 2.0 bearer token for REST Web Services.
25+
- `client_id`: OAuth 2.0 integration client ID for machine-to-machine auth.
26+
- `certificate_id`: Certificate ID from OAuth 2.0 Client Credentials (M2M) Setup. `kid` is accepted as an alias.
27+
- `private_key_path`: Path to the private key that matches the certificate uploaded to NetSuite.
28+
- `private_key`: Inline PEM private key. Newlines can be encoded as `\n`.
29+
- `scope`: OAuth scopes for the client credentials assertion. Defaults to `rest_webservices`.
30+
- `algorithm`: JWT signing algorithm. Defaults to `PS256`; supported values are `PS256`, `PS384`, `PS512`, `ES256`, `ES384`, and `ES512`.
31+
- `base_url`: Optional override for the SuiteTalk REST base URL.
32+
33+
## Examples
34+
35+
Load the `customer` SuiteQL table into DuckDB:
36+
37+
```bash
38+
ingestr ingest \
39+
--source-uri "netsuite://?account_id=${NETSUITE_ACCOUNT_ID}&access_token=${NETSUITE_ACCESS_TOKEN}" \
40+
--source-table "customer" \
41+
--dest-uri "duckdb:///netsuite.duckdb" \
42+
--dest-table "main.netsuite_customers"
43+
```
44+
45+
Use a custom SuiteQL query:
46+
47+
```bash
48+
ingestr ingest \
49+
--source-uri "netsuite://?account_id=${NETSUITE_ACCOUNT_ID}&client_id=${NETSUITE_CLIENT_ID}&certificate_id=${NETSUITE_CERTIFICATE_ID}&private_key_path=${NETSUITE_PRIVATE_KEY_PATH}" \
50+
--source-table "query:SELECT id, entityid, email FROM customer" \
51+
--dest-uri "duckdb:///netsuite.duckdb" \
52+
--dest-table "main.netsuite_customer_emails"
53+
```
54+
55+
Use interval filtering by passing an incremental key:
56+
57+
```bash
58+
ingestr ingest \
59+
--source-uri "netsuite://?account_id=${NETSUITE_ACCOUNT_ID}&access_token=${NETSUITE_ACCESS_TOKEN}" \
60+
--source-table "transaction" \
61+
--incremental-key "lastmodifieddate" \
62+
--interval-start "2026-01-01T00:00:00Z" \
63+
--interval-end "2026-02-01T00:00:00Z" \
64+
--dest-uri "duckdb:///netsuite.duckdb" \
65+
--dest-table "main.netsuite_transactions"
66+
```
67+
68+
For plain table names, ingestr runs `SELECT * FROM <source-table>` through SuiteQL. For joins, selected columns, built-in functions, or aliases, use the `query:` source-table form.
69+
70+
NetSuite SuiteQL responses do not expose a static schema through this connector, so ingestr infers the schema from extracted rows.

0 commit comments

Comments
 (0)