Skip to main content

Prerequisites

Prerequisites

In order to contribute to Meltano, you will need the following:

  1. Python 3.9+. For more details about Python requirements, refer to the "Requirements" section of the Installation instructions, that also apply here.
  2. uv
  3. Node 18+
  4. Yarn

Setting Up Your Environment

# Clone the Meltano repo
git clone git@github.com:meltano/meltano.git

# Change directory into the Meltano project
cd meltano

# Install the, Nox and pre-commit tools
uv tool install nox
uv tool install pre-commit

# Install all the dependencies
uv sync

# Install the pre-commit hook
pre-commit install --install-hooks

# Obtain a shell in the uv-managed virtual environment
source .venv/bin/activate

Meltano is now installed and available at meltano, as long as you remain in your virtual environment! Most editor's like VSCode or PyCharm can also be configured to detect and make use of virtualenv's. That allows meltano commands to work as you expect in editor based terminals, and is also typically required to enable advanced editors features (debugging, code hints, etc).

You can also run meltano outside of an activated virtualenv by prefixing all commands with uv run , e.g. uv run meltano....

This means that you're ready to start Meltano CLI development.

Metrics (anonymous usage data) tracking

As you contribute to Meltano, you may want to disable metrics tracking globally rather than by project. You can do this by setting the environment variable MELTANO_SEND_ANONYMOUS_USAGE_STATS to False:

# Add to `~/.bashrc`, `~/.zshrc`, etc, depending on the shell you use:
export MELTANO_SEND_ANONYMOUS_USAGE_STATS=False

System Database

Certain features of Meltano are supported by a database that is managed using Alembic migrations.

Alembic is a full featured database migration working on top of SQLAlchemy.

Migrations for the system database are located inside the meltano.migrations module.

To create a new migration, use the alembic revision -m "message" command, then edit the created file with the necessary database changes. Make sure to implement both upgrade and downgrade, so the migration is reversible, as this will be used in migration tests in the future.

Each migration should be isolated from the meltano module, so don't import any model definition inside a migration.

Meltano doesn't currently support auto-generating migration from the models definition.

To run the migrations, use meltano upgrade inside a Meltano project.

Resources