Skip to content

acrosman/Salesforce2Sql

Salesforce2Sql

Lint Status CodeQL Status Electronegativity Status Test Status

This is a tool to generate a SQL schema to match a Salesforce Org Schema.

Main Interface

Salesforce2Sql will connect to a Salesforce org, allow you to select a collection of objects, and have the schema for those objects replicated to a local database. This can be very useful when working on data migration and archiving projects.

No data is replicated just the schema.

If you are looking for help migrating data between Salesforce Orgs you may want check out the Salesforce Open Source Commons Data Generation Toolkit Project.

Getting Started

Read the full Getting Started guide.

There is also a getting started guide on SpinningCode.org with a bit more commentary.

You can either download the latest release for your operating system or run from code.

To make this tool useful you will also need a Salesforce org you want to mirror, and a MySQL, Mariadb, or Postgres database you can create tables in.

Running From Code

To run the project from code you will need a working copy of NodeJS 22 or later.

  1. Clone this repo (or create your own fork) to your local machine.
  2. Run: npm install from the project root directory, and wait for all the packages to load (this takes a few minutes).
  3. Run: npm start

Databases

Currently Salesforce2Sql supports MySQL, MariaDB, and Postgres. Other databases supported by KNEX.JS can be added upon request.

Disclaimer

This project has no direct association with Salesforce except the use of the APIs provided under the terms of use of their services.

Getting Involved

If you would like to contribute to this project please feel invited to do so. Feel free to review open issues and read the contributing guide.

About

Electron app to convert a Salesforce org's schema into a similarly shaped database.

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 6