Complete ELT Walkthrough
Welcome! If you're ready to get started with Meltano and run an EL[T] pipeline with a data source and destination of your choosing, you've come to the right place!
Short on time, or just curious what the fuss is about? Watch the "0 to DataOps" speedrun to get a sense of the Meltano experience in just a few minutes!
Install Meltano
Before you can get started with Meltano and the meltano command line interface (CLI), you'll need to install it onto your system.
To learn more about the different installation methods, refer to the Installation guide.
Local Installation
You will need to be running Linux, macOS, or Windows, and have Python 3.10, 3.11, 3.12, 3.13, or 3.14 installed. We recommend installing Meltano into a dedicated Python virtual environment inside the directory that will hold your Meltano projects.
- Linux & macOS
- Windows
-
Create and navigate to a directory to hold your Meltano projects:
mkdir meltano-projects
cd meltano-projects -
Install the pipx package manager:
python3 -m pip install --user pipx
python3 -m pipx ensurepath
source ~/.bashrc -
Install the
meltanopackage from the Python Package Index (PyPI):pipx install meltanoIf you have multiple versions of Python installed, you can use a specific one with the
--pythonargument:pipx install meltano --python <path to desired Python executable> -
Optionally, verify that the
meltanoCLI is now available by viewing the version:meltano --version
-
Create and navigate to a directory to hold your Meltano projects:
mkdir meltano-projects
cd meltano-projects -
Install the pipx package manager:
New-Alias Python3 Python
python3 -m pip install --user pipx
python3 -m pipx ensurepathOpen a new PowerShell instance to load your new path variables.
-
Install the
meltanopackage from the Python Package Index (PyPI):pipx install meltanoIf you have multiple versions of Python installed, you can use a specific one with the
--pythonargument:pipx install meltano --python <path to desired Python executable> -
Optionally, verify that the
meltanoCLI is now available by viewing the version:meltano --version
If anything's not performing as expected, refer to the "Local Installation" section of the Installation guide for more details.
Create Your Meltano Project
Now that you have a way of running the meltano CLI,
it's time to create a new Meltano project that (among other things)
will hold the plugins that implement the details of your ELT pipelines.
To learn more about Meltano projects, refer to the Projects concept doc.
-
Navigate to the directory that you'd like to hold your Meltano projects if you haven't already done so:
mkdir meltano-projects
cd meltano-projects -
Initialize a new project in a directory of your choosing using
meltano init:meltano init <project directory path>
# For example:
meltano init my-meltano-project
# If you're using Docker, don't forget to mount the current working directory:
docker run -v $(pwd):/projects -w /projects meltano/meltano init my-meltano-projectThis action will create a new directory with, among other things, your
meltano.ymlproject file:version: 1
default_environment: dev
project_id: <random UUID>
environments:
- name: dev
- name: staging
- name: prodThe
meltano.ymlfile does not define any plugins, or pipeline schedules yet, but does include 3 environments that you can use if you wish.Note that anonymous usage stats are enabled by default; if you want to learn more about how the product benefits from them or how to change the default settings, see the settings reference page for more details.
-
Navigate to the newly created project directory:
cd <project directory>
# For example:
cd my-meltano-project -
Optionally, if you'd like to version control your changes, initialize a Git repository and create an initial commit:
git init
git add --all
git commit -m 'Initial Meltano project'
This will allow you to use git diff to easily check the impact of the meltano commands you'll run below on your project files, most notably your meltano.yml project file.
View and Activate Your Environments
As part of creating your Meltano project, we automatically added your first environments called dev, staging and prod. This allows you to define configurations specific to the environment in which you're running your project. There's also a default_environment setting in the meltano.yml that get automatically set to dev, you can list and change the active environment using:
-
List your available environments:
meltano environment list -
Activate your environment for your shell session:
export MELTANO_ENVIRONMENT=devor for Windows PowerShell:
$env:MELTANO_ENVIRONMENT="dev"Alternatively you can include the
--environment=devargument to eachmeltanocommand. You should now see a log message that saysEnvironment 'dev' is activeeach time you run ameltanocommand. -
[optional] Add a new environment:
meltano environment add <environment name>
Add an Extractor to Pull Data from a Source
Now that you have your very own Meltano project, it's time to add some plugins to it!
The first plugin you'll want to add is an extractor, which will be responsible for pulling data out of your data source.
To learn more about adding plugins to your project, refer to the Plugin Management guide.
-
Find out if an extractor for your data source is supported out of the box by checking the Extractors list:
-
Depending on the result, pick your next step:
- If an extractor is supported out of the box, add it to your project using
meltano add:
meltano add <plugin name>
# For example:
meltano add tap-gitlab
# If you have a preference for a non-default variant, select it using `--variant`:
meltano add tap-gitlab --variant=singer-io
# If you're using Docker, don't forget to mount the project directory:
docker run -v $(pwd):/project -w /project meltano/meltano add tap-gitlabThis will add the new plugin to your
meltano.ymlproject file:plugins:
extractors:
- name: tap-gitlab
variant: meltanolabs
pip_url: git+https://github.com/MeltanoLabs/tap-gitlab.gitAlso note that if you're using Meltano version >=2.0 you will see a
plugins/extractors/tap-gitlab--meltanolabs.lockfile added to your project. This pins your settings definitions for stability, they should be checked into your git repository. For additional stability you can consider pinning yourpip_urlto a specific release version (e.g. tap-gitlab==1.0.0) or commit hash (e.g. git+https://github.com/MeltanoLabs/tap-gitlab.git@v1.0.0).You can now continue to step 4.
- If an extractor is not yet discoverable, find out if a Singer tap for your data source already exists by checking out MeltanoHub, which is the best place to find and explore existing Singer taps and targets.
- If an extractor is supported out of the box, add it to your project using
-
Depending on the result, pick your next step:
- If a Singer tap for your data source is available, add it to your project as a custom plugin using
meltano add --custom:
meltano add --custom <tap name>
# For example:
meltano add --custom tap-covid-19
# If you're using Docker, don't forget to mount the project directory,
# and ensure that interactive mode is enabled so that Meltano can ask you
# additional questions about the plugin and get your answers over STDIN:
docker run --interactive -v $(pwd):/project -w /project meltano/meltano add --custom tap-covid-19Meltano will now ask you some additional questions to learn more about the plugin.
This will add the new plugin to your
meltano.ymlproject file:plugins:
extractors:
- name: tap-covid-19
namespace: tap_covid_19
pip_url: tap-covid-19
executable: tap-covid-19
capabilities:
- catalog
- discover
- state
settings:
- name: api_token
- name: user_agent
- name: start_date - If a Singer tap for your data source is available, add it to your project as a custom plugin using
To learn more about adding custom plugins, refer to the Plugin Management guide.
Once you've got the extractor working in your project, please consider contributing its description to the index of discoverable plugins so that it can be supported out of the box for new users!
- If a Singer tap for your data source doesn't exist yet, learn how to build and use your own tap by following the "Create and Use a Custom Extractor" tutorial.
Once you've got your new tap project set up, you can add it to your Meltano project
as a custom plugin by following the meltano add --custom instructions above.
When asked to provide a pip install argument, you can provide a local directory path or Git repository URL.
-
Optionally, verify that the extractor was installed successfully and that its executable can be invoked using
meltano invoke:meltano invoke <plugin> --help
# For example:
meltano invoke tap-gitlab --helpIf you see the extractor's help message printed, the plugin was definitely installed successfully, but an error message related to missing configuration or an unimplemented
--helpflag would also confirm that Meltano can invoke the plugin's executable.
Configure the Extractor
Chances are that the extractor you just added to your project will require some amount of configuration before it can start extracting data.
To learn more about managing the configuration of your plugins, refer to the Configuration guide.
What if I already have a config file for this extractor?
If you've used this Singer tap before without Meltano, you may have a config file.
If you'd like to use the same configuration with Meltano, you can skip this section and copy and paste the JSON config object into your meltano.yml project file under the plugin's config key:
extractors:
- name: tap-example
config: {
"setting": "value",
"another_setting": true
}
Since YAML is a superset of JSON, the object should be indented correctly, but formatting does not need to be changed.
-
The simplest way to configure a new plugin in Meltano is using
interactive:meltano config set <plugin> --interactive
# For example:
meltano config set tap-gitlab --interactive
Follow the prompts to step through all available settings, or select an individual setting to configure.
You can also optionally use the list, set and unset commands directly to view and change plugin configuration:
-
Find out what settings your extractor supports using
meltano config list <plugin>:meltano config list <plugin>
# For example:
meltano config list tap-gitlab -
Assuming the previous command listed at least one setting, set appropriate values using
meltano config set <plugin>:
private_token for tap-gitlab.meltano config set <plugin> <setting> <value>
# For example:
meltano config set tap-gitlab projects "meltano/meltano meltano/tap-gitlab"
meltano config set tap-gitlab start_date 2024-03-01T00:00:00Z
meltano config set tap-gitlab private_token my_private_token
This will add the non-sensitive configuration to your meltano.yml project file:
environments:
- name: dev
config:
plugins:
extractors:
- name: tap-gitlab
config:
projects: meltano/meltano meltano/tap-gitlab
start_date: "2024-10-01T00:00:00Z"
Sensitive configuration (like private_token) will instead be stored in your project's .env file so that it will not be checked into version control:
export TAP_GITLAB_PRIVATE_TOKEN=my_private_token
-
Optionally, verify that the configuration looks like what the Singer tap expects according to its documentation using
meltano config print <plugin>:meltano config print <plugin>
# For example:
meltano config print tap-gitlabThis will show the current configuration:
{
"api_url": "https://gitlab.com",
"private_token": "my_private_token",
"groups": "",
"projects": "meltano/meltano meltano/tap-gitlab",
"ultimate_license": false,
"fetch_merge_request_commits": false,
"fetch_pipelines_extended": false,
"start_date": "2024-03-01T00:00:00Z"
}