Skip to main content

Reverse ETL Configuration

msh allows you to publish your transformed data back to operational systems like Salesforce, HubSpot, or external storage.

1. Define the Destination

When running msh publish, you specify the destination type.

msh publish revenue_mart --to salesforce

See the Publish Command for complete documentation, including security configuration and examples.

Supported destinations include:

  • salesforce
  • hubspot
  • filesystem (S3, GCS, Local)
  • postgres
  • ...and any other dlt destination.

2. Security & Configuration

Never commit secrets to your code. msh uses environment variables to securely configure destinations.

Step 1: Add to .env

Create or update the .env file in your project root. msh automatically loads this file at runtime.

The naming convention is DESTINATION__<NAME>__CREDENTIALS.

For Salesforce:

DESTINATION__SALESFORCE__CREDENTIALS__CLIENT_ID=your_client_id
DESTINATION__SALESFORCE__CREDENTIALS__CLIENT_SECRET=your_client_secret
DESTINATION__SALESFORCE__CREDENTIALS__REFRESH_TOKEN=your_refresh_token

For Filesystem (S3):

DESTINATION__FILESYSTEM__BUCKET_URL=s3://my-bucket/exports
DESTINATION__FILESYSTEM__CREDENTIALS__AWS_ACCESS_KEY_ID=...
DESTINATION__FILESYSTEM__CREDENTIALS__AWS_SECRET_ACCESS_KEY=...

Step 2: Run Publish

When you run msh publish, the engine:

  1. Reads your .env file.
  2. Injects the credentials into the dlt pipeline configuration.
  3. Exports the data from your modeled table (e.g., model_revenue_a1b2) to the target.
msh publish revenue_mart --to salesforce

How It Works

Under the hood, msh publish uses dlt's export capability. It reads the latest "Green" version of your asset (ensuring you only publish valid, tested data) and streams it to the destination.