Getting Started
This guide covers setup, your first pipeline, and how to contribute—all in a few steps.
Why OpenETL?
Why TypeScript?
TypeScript catches errors early with strong typing and offers top-notch tooling—great for building reliable ETL code.
Why Lightweight?
With almost no dependencies, it's quick to integrate and tweak, fitting any project size without the hassle, loading only what you are going to use.
Installation
Install via npm
npm install openetl
Clone for Contributors (optional):
git clone https://github.com/jspreadsheet/openetl.git
cd openetl
npm install
Running Your First Pipeline
Sync HubSpot contacts to PostgreSQL:
import Orchestrator from 'openetl';
import { hubspot } from '@openetl/hubspot';
import { postgresql } from '@openetl/postgresql';
const vault = {
'hs-auth': {
type: 'oauth2',
credentials: {
client_id: 'your-id',
client_secret: 'your-secret',
refresh_token: 'your-token'
}
},
'pg-auth': {
type: 'basic',
credentials: {
username: 'your-user',
password: 'your-pass',
host: 'localhost',
database: 'your-db'
}
},
};
const orchestrator = Orchestrator(vault, {
hubspot,
postgresql
});
orchestrator.runPipeline({
id: 'hs-to-pg',
source: {
adapter_id: 'hubspot',
endpoint_id: 'contacts',
credential_id: 'hs-auth',
fields: ['firstname', 'lastname'],
},
target: {
adapter_id: 'postgresql',
endpoint_id: 'table_insert',
credential_id: 'pg-auth',
config: {
schema: 'public',
table: 'contacts'
},
},
}).then(() => console.log('Done!'));
- Save as
pipeline.ts
. - Add your credentials.
- Run:
tsx pipeline.ts
.
Check your database—contacts should be there!
Contributing as a Developer
How to Contribute
- Write an adapter (e.g., Stripe) via Adapter Development Guide.
- Fork, code, and PR on Github.
- Share ideas on Support.
Robust Testing Benefits
Tests ensure your adapter handles retries or pagination glitches—see Testing Adapters to make a strong solution.
Next, tweak this pipeline or explore Architecture Overview.