Settings
Meltano supports a number of settings that allow you to fine tune its behavior, which are documented here. To quickly find the setting you're looking for, use the Table of Contents in the sidebar.
As described in the Configuration guide, Meltano will determine the values of these settings by first looking in the environment, then in your project's .env
file, and finally in your meltano.yml
project file, falling back to a default value if nothing was found.
You can use meltano config meltano list
to list all available settings with their names, environment variables, and current values.
Configuration that is not environment-specific or sensitive should be stored in your meltano.yml
project file and checked into version
control. Sensitive values like passwords and tokens are most appropriately stored in the environment or your project's .env
file.
meltano config meltano set <setting> <value>
, which is used in the examples below, will automatically store configuration in meltano.yml
or .env
as appropriate.
If supported by the plugin type, its configuration can be tested using meltano config <plugin> test
.
Plugin settings
For plugin settings, refer to the specific plugin's documentation
(extractors, loaders),
or use meltano config <plugin> list
to list all available settings with their names, environment variables, and current values.
python
The python version to use for this plugin, specified as a path, or as the name of an executable to find within a directory in $PATH
. You can set it at the time you add a plugin using meltano add --python <python>
.
If not specified, the top-level python
setting will be used, or if it is not set, the python executable that was used to run Meltano will be used (within a separate virtual environment).
This setting only applies when creating new virtual environments. If you've already created a virtual environment and you'd like to use a new Python version for it, you'll need to delete it from within .meltano/
, then run meltano install
for that plugin again.
This setting only applies to base plugins, which have their own virtual environment. Inherited plugins necessarily use the same virtual environment (and thus, the Python version) as their base plugin.
Example:
plugins:
extractors:
- name: tap-gitlab
variant: meltanolabs
python: /path/to/python3.10
loaders:
- name: target-postgres
variant: meltanolabs
python: python3.10 # if it's in your $PATH
Your Meltano project
These are settings specific to your Meltano project.
python
- Environment variable:
MELTANO_PYTHON
The python version to use for plugins, specified as a path, or as the name of an executable to find within a directory in $PATH
.
If not specified, the python executable that was used to run Meltano will be used (within a separate virtual environment).
This can be overridden on a per-plugin basis by setting the python
property for the plugin.
This setting only applies when creating new virtual environments. If you've already created a virtual environment and you'd like to use a new Python version for it, you'll need to delete it from within .meltano/
, then run meltano install
for that plugin again.
This setting only applies to base plugins, which have their own virtual environment. Inherited plugins necessarily use the same virtual environment (and thus, the Python version) as their base plugin.
Example:
python: /path/to/python3.10 # or just python3.10 if it's in your $PATH
plugins:
extractors: ...
loaders: ...
send_anonymous_usage_stats
- Environment variable:
MELTANO_SEND_ANONYMOUS_USAGE_STATS
meltano init
CLI option:--no-usage-stats
(implies valuefalse
)- Default:
true
Meltano is open source software thats free for anyone to use. The best thing a user could do to give back to the community, aside from contributing code or reporting issues, is contribute anonymous usage stats to allow the maintainers to understand how features are being utilized ultimately helping the community build a better product.
By default, Meltano shares anonymous usage data with the Meltano team using Snowplow. We use this data to learn about the size of our user base and the specific Meltano features they are using, which helps us determine the highest impact changes we can make in each release to make Meltano even more useful for you and others like you.
We also provide some of this data back to the community via MeltanoHub to help users understand the overall usage of plugins within Meltano.
If enabled, Meltano will use the value of the project_id
setting to uniquely identify your project. If the project ID is a UUID, then it will be sent unchanged. Otherwise, it will be hashed, and its hash will be used to derive a UUID which will be used to uniquely identify your project.
This project ID is also sent along when Meltano requests available plugins from the URLs identified by the hub_url
.
If you'd like to send the tracking data to a different Snowplow account than the one run by the Meltano team,
the collector endpoints can be configured using the snowplow.collector_endpoints
setting.
See more about our anonymization standards and anonymous usage stats Q&A below for more details. Also refer to the Meltano data team handbook page for our "Philosophy of Telemetry".
With all that said, if you'd still prefer to use Meltano without sending the maintainers this kind of data, you're able to disable tracking entirely using one of these methods:
- When creating a new project, pass
--no-usage-stats
tomeltano init
- In an existing project, set the
send_anonymous_usage_stats
setting tofalse
- To disable tracking in all projects in one go, set the
MELTANO_SEND_ANONYMOUS_USAGE_STATS
environment variable tofalse
How to use
- meltano config
- env
- meltano init
meltano config meltano set send_anonymous_usage_stats false
export MELTANO_SEND_ANONYMOUS_USAGE_STATS=false
meltano init --no-usage-stats demo-project
Anonymization Standards
Unless otherwise approved, any user-entered data is anonymized client-side before being submitted to Meltano. This section describes which data is sent in clear text and which data is obfuscated via one-way hashing.
We capture these in clear text:
- plugin names
- plugin variant names
- command names
- execution context, such as:
- OS version
- Python version
- project ID
We anonymize these with one-way hashing before reporting:
- CLI args
- plugin config
These items will never be collected or reported back to meltano:
- your settings values
- your secrets or credentials
- the contents of your
meltano.yml
file
Anonymous Usage Stats Q&A
Q: What is a one way hash and how is it helpful?
A:
One-way hashing is a way of obfuscating sensitive data such that:
- The same input value always produces the same output value (aka "hash").
- The results are mathematically and statistically extremely difficult (read: near impossible) to reverse engineer back to the source value.
- Hash results are extremely helpful in safely and anonymously detecting changes to a file or configuration. Without passing the entire configuration, and without providing a hacker any means of decoding/decrypting the data back to its source, we can see that a file (such as
meltano.yml
) has not changed since its last hash was generated.
Q: Why does Meltano use hashing?
A:
Meltano hashes any fields at all which could be used by a hacker to compromise a project or user. We will never know what freeform text arguments you passed in via the command line, we won't have any data at all which could be used to compromise your environment, and whatever data we collect, we'll never sell, share, or trade your data with any third parties.
Should I enable or disable anonymous reporting?
A:
We hope you will choose to enable reporting, because this really does help us - and it helps the Meltano community in a very real way.
If you still have any concerns about keeping anonymous reporting enabled, we hope you'll share those concerns with us. You can do so by emailing hello@meltano.com
or by logging an issue in our Meltano Issue Tracker.
project_id
- Environment variable:
MELTANO_PROJECT_ID
- Default: None
Used by Meltano to uniquely identify your project if the send_anonymous_usage_stats
setting is enabled.
How to use
- meltano config
- env
meltano config meltano set project_id '<unique identifier>'
export MELTANO_PROJECT_ID='<unique identifier>'
database_uri
- Environment variable:
MELTANO_DATABASE_URI
meltano *
CLI option:--database-uri
- Default:
sqlite:///$MELTANO_SYS_DIR_ROOT/meltano.db
Meltano stores various types of metadata in a project-specific system database,
that takes the shape of a SQLite database stored inside the .meltano
directory at .meltano/meltano.db
by default.
You can choose to use a different system database backend or configuration using the --database-uri
option of meltano
subcommands, or the MELTANO_DATABASE_URI
environment variable.
The database URI should be a valid SQLAlchemy database URL, and can be used to connect to a variety of database backends.
Because internal database migrations make of use of the ALTER TABLE table RENAME COLUMN oldname TO newname
syntax starting with Meltano v2.2.0
, the minimum required SQLite version is now 3.25.1
.
Some systems may come with an older version by default. You can run sqlite3 --version
to check your version.
How to use
PostgreSQL
- meltano config
- env
- meltano run
meltano config meltano set database_uri postgresql+psycopg://<username>:<password>@<host>:<port>/<database>
export MELTANO_DATABASE_URI=postgresql+psycopg://<username>:<password>@<host>:<port>/<database>
meltano run --database-uri=postgresql+psycopg://<username>:<password>@<host>:<port>/<database> ...
SQL Server (MSSQL)
- meltano config
- env
- meltano run
meltano config meltano set database_uri mssql+pymssql://<username>:<password>@<host>:<port>/<database>
export MELTANO_DATABASE_URI=mssql+pymssql://<username>:<password>@<host>:<port>/<database>
meltano run --database-uri=mssql+pymssql://<username>:<password>@<host>:<port>/<database> ...
Using databases other than SQLite requires installing Meltano with extra components.
Targeting a PostgreSQL Schema
When using PostgreSQL as your system database, you can choose the target schema within that database by adding
?options=-csearch_path%3D<schema>
directly to the end of your database_uri
and MELTANO_DATABASE_URI
.
You are also able to add multiple schemas, which PostgreSQL will work through from left to right until it finds a valid schema to target, by using ?options=-csearch_path%3D<schema>,<schema_two>
If you dont target a schema then by default PostgreSQL will try to use the public
schema.
postgresql+psycopg://<username>:<password>@<host>:<port>/<database>?options=-csearch_path%3D<schema>
database_max_retries
- Environment variable:
MELTANO_DATABASE_MAX_RETRIES
- Default:
3
This sets the maximum number of reconnection attempts in case the initial connection to the database fails because it isn't available when Meltano starts up.
Note: This affects the initial connection attempt only after which the connection is cached. Subsequent disconnections are handled by SQLALchemy
How to use
- meltano config
- env
meltano config meltano set database_max_retries 3
export MELTANO_DATABASE_MAX_RETRIES=3
database_retry_timeout
- Environment variable:
MELTANO_DATABASE_RETRY_TIMEOUT
- Default:
5
(seconds)
This controls the retry interval (in seconds) in case the initial connection to the database fails because it isn't available when Meltano starts up.
Note: This affects the initial connection attempt only after which the connection is cached. Subsequent disconnections are handled by SQLALchemy
How to use
- meltano config
- env
meltano config meltano set database_retry_timeout 5
export MELTANO_DATABASE_RETRY_TIMEOUT=5
project_readonly
- Environment variable:
MELTANO_PROJECT_READONLY
- Default:
false
Enable this setting to indicate that your Meltano project is deployed as read-only, and to block all modifications to project files through the CLI in this environment.
Specifically, this prevents adding plugins or pipeline schedules to your meltano.yml
project file, as well as modifying plugin configuration stored in meltano.yml
or .env
.
Note that meltano config <plugin> set
can still be used to store configuration in the system database, but that settings that are already set in the environment or meltano.yml
take precedence and cannot be overridden.
How to use
- meltano config
- env
meltano config meltano set project_readonly true
export MELTANO_PROJECT_READONLY=true
hub_api_root
- Environment variable:
MELTANO_HUB_API_ROOT
- Default: None
This sets the value of the root url for the hub api.
If provided, this setting overrides the hub_url
.
How to use
- meltano config
- env
meltano config meltano set hub_api_root "https://mysite.com/my-plugins"
meltano config meltano set hub_api_root false
export MELTANO_HUB_API_ROOT="https://mysite.com/my-plugins"
export MELTANO_HUB_API_ROOT=false
hub_url
- Environment variable:
MELTANO_HUB_URL
- Default:
https://hub.meltano.com
Where Meltano can find the Hub that lists all discoverable plugins.
The Hub is primarily used by meltano add
and meltano lock
. It is also used in cases where the full plugin definition is needed but no lock artifact is found.
How to use
- meltano config
- env
meltano config meltano set hub_url http://localhost:4000
export MELTANO_HUB_URL=http://localhost:4000
hub_url_auth
- Environment variable:
MELTANO_HUB_URL_AUTH
- Default: None
The value of the Authorization
header sent when making a request to hub_url
.
No Authorization
header is applied under the following conditions:
hub_url_auth
is not sethub_url_auth
is set tofalse
,null
or an empty string
How to use
- meltano config
- env
meltano config meltano set hub_url_auth "Bearer $ACCESS_TOKEN"
meltano config meltano set hub_url_auth false
export MELTANO_HUB_URL_AUTH="Bearer $ACCESS_TOKEN"
export MELTANO_HUB_URL_AUTH=false
auto_install
- Environment variable:
MELTANO_AUTO_INSTALL
- Default:
true
Whether to automatically install any required plugins on command invocation. A plugin will be auto-installed when its virtual environment does not already exist or pip_url
is changed.
Auto-install pertains to the following commands:
meltano add
meltano config <plugin> test
meltano select --list
meltano test
meltano invoke
meltano el
/meltano elt
meltano run
How to use
- meltano config
- env
meltano config meltano set auto_install true
meltano config meltano set auto_install false
export MELTANO_AUTO_INSTALL=true
export MELTANO_AUTO_INSTALL=false
meltano
CLI
These settings can be used to modify the behavior of the meltano
CLI.
cli.log_level
- Environment variable:
MELTANO_CLI_LOG_LEVEL
. meltano
CLI option:--log-level
- Options:
debug
,info
,warning
,error
,critical
- Default:
info
The granularity of CLI logging. Ignored if a local logging config is found.
How to use
- meltano config
- env
- command
meltano config meltano set cli log_level debug
export MELTANO_CLI_LOG_LEVEL=debug
meltano --log-level=debug ...
cli.log_config
- Environment variable:
MELTANO_CLI_LOG_CONFIG
. meltano
CLI option:--log-config
- Default:
logging.yaml
The path of a valid yaml formatted python logging dict config file to use to configure logging if present.
How to use
- meltano config
- env
- command
meltano config meltano set cli log_config /path/to/logging.yaml
export MELTANO_CLI_LOG_CONFIG=/path/to/logging.yaml
meltano --log-config=/path/to/logging.yaml ...
A sample logging config:
version: 1
disable_existing_loggers: false
formatters:
default:
format: "[%(asctime)s] [%(process)d|%(threadName)10s|%(name)s] [%(levelname)s] %(message)s"
structured_plain:
(): meltano.core.logging.console_log_formatter
colors: False
structured_colored:
(): meltano.core.logging.console_log_formatter
colors: True
key_value:
(): meltano.core.logging.key_value_formatter
sort_keys: False
json:
(): meltano.core.logging.json_formatter
handlers:
console:
class: logging.StreamHandler
level: DEBUG
formatter: structured_colored
stream: "ext://sys.stderr"
file:
class: logging.FileHandler
level: INFO
filename: /var/log/meltano.log
formatter: json
root:
level: DEBUG
propagate: yes
handlers: [console, file]
cli.cwd
meltano
CLI option:--cwd
- Default:
Current directory
With --cwd
option you can run Meltano as if had been started in a specified directory.
How to use
Specify path to a directory which contains a valid meltano.yml
project file.
meltano --cwd '/path/containing/meltano_yml'
meltano elt
These settings can be used to modify the behavior of meltano el
and meltano elt
.
elt.buffer_size
- Environment variable:
MELTANO_ELT_BUFFER_SIZE
- Default:
104857600
(100MiB in bytes)
Size (in bytes) of the buffer between extractor and loader (Singer tap and target) that stores messages output by the extractor while they are waiting to be processed by the loader.
When an extractor generates messages (records) faster than the loader can process them, the buffer may fill up completely, at which point the extractor will be blocked until the loader has worked through enough messages to make half of the buffer size available again for new extractor output.
The length of a single line of extractor output is limited to half the buffer size. With a default buffer size of 100MiB, the maximum message size would therefore be 50MiB.
How to use
- meltano config
- env
meltano config meltano set elt.buffer_size 52428800 # 50MiB in bytes
export MELTANO_ELT_BUFFER_SIZE=52428800
State Backends
state_backend.uri
- Environment variable:
MELTANO_STATE_BACKEND_URI
- Default:
systemdb
URI for the state backend where you'd like Meltano to store state.
How to use
- meltano config
- env
meltano config meltano set state_backend.uri "s3://your_bucket/meltano/state"
export MELTANO_STATE_BACKEND_URI="s3://your_bucket/meltano/state"
state_backend.lock_timeout_seconds
- Environment variable:
MELTANO_STATE_BACKEND_LOCK_TIMEOUT_SECONDS
- Default:
360
Number of seconds that a lock for a state ID should be considered valid in a state backend
How to use
- meltano config
- env
meltano config meltano set state_backend.lock_timeout_seconds 720
export MELTANO_STATE_BACKEND_LOCK_TIMEOUT_SECONDS=720
state_backend.lock_retry_seconds
- Environment variable:
MELTANO_STATE_BACKEND_LOCK_RETRY_SECONDS
- Default:
360
Number of seconds that a Meltano should wait if trying to access or modify state for a state ID that is locked
How to use
- meltano config
- env
meltano config meltano set state_backend.lock_retry_seconds 720
export MELTANO_STATE_BACKEND_LOCK_RETRY_SECONDS=720
Azure-Specific Settings
state_backend.azure.storage_account_url
- Environment variable:
MELTANO_STATE_BACKEND_AZURE_STORAGE_ACCOUNT_URL
- Default: None
One can Sign-in to Azure using the Azure CLI.
The storage_account_url
will be used to fetch the default Azure credentials in the host system.
At least one of state_backend.azure.storage_account_url
and state_backend.azure.connection_string
has to be set in order to use Azure Blob Storage as a state backend. If state_backend.azure.storage_account_url
is not set, Meltano will to try to use state_backend.azure.connection_string
.
How to use
- meltano config
- env
meltano config meltano set state_backend.azure.storage_account_url "https://<myStorageAccountName>.blob.core.windows.net"
export MELTANO_STATE_BACKEND_AZURE_STORAGE_ACCOUNT_URL="https://<myStorageAccountName>.blob.core.windows.net"
state_backend.azure.connection_string
- Environment variable:
MELTANO_STATE_BACKEND_AZURE_CONNECTION_STRING
- Default: None
The Azure connection string to use when authenticating to Azure.
How to use
- meltano config
- env
meltano config meltano set state_backend.azure.connection_string "DefaultEndpointsProtocol=https;AccountName=myAccountName;AccountKey=myAccountKey"
export MELTANO_STATE_BACKEND_AZURE_CONNECTION_STRING="DefaultEndpointsProtocol=https;AccountName=myAccountName;AccountKey=myAccountKey"
S3-Specific Settings
state_backend.s3.aws_access_key_id
- Environment variable:
MELTANO_STATE_BACKEND_AWS_ACCESS_KEY_ID
- Default: None
The AWS access key ID to use when authenticating to S3.
How to use
- meltano config
- env
meltano config meltano set state_backend.s3.aws_access_key_id "someaccesskeyid"
export MELTANO_STATE_BACKEND_S3_AWS_ACCESS_KEY_ID="someaccesskeyid"
state_backend.s3.aws_secret_access_key
- Environment variable:
MELTANO_STATE_BACKEND_AWS_SECRET_ACCESS_KEY
- Default: None
The AWS secret access key to use when authenticating to S3.
How to use
- meltano config
- env
meltano config meltano set state_backend.s3.aws_secret_access_key "somesecretaccesskey"
export MELTANO_STATE_BACKEND_S3_AWS_SECRET_ACCESS_KEY="somesecretaccesskey"
state_backend.s3.endpoint_url
- Environment variable:
MELTANO_STATE_BACKEND_AWS_ENDPOINT_URL
- Default: None
The endpoint URL to use when connecting to S3. Only necessary if using S3-compatible storage not hosted by AWS (e.g. Minio)
How to use
- meltano config
- env
meltano config meltano set state_backend.s3.endpoint_url "https://play.min.io:9000"
export MELTANO_STATE_BACKEND_S3_ENDPOINT_URL="https://play.min.io:9000"
GCS-Specific Settings
state_backend.gcs.application_credentials
- Environment variable:
MELTANO_STATE_BACKEND_APPLICATION_CREDENTIALS
- Default: None
Path to the credential file to use in authenticating to Google Cloud Storage
How to use
- meltano config
- env
meltano config meltano set state_backend.gcs.application_credentials "path/to/creds.json"
export MELTANO_STATE_BACKEND_GCS_APPLICATION_CREDENTIALS="path/to/creds.json"
Virtual environments
venv.backend
- Environment variable:
MELTANO_VENV_BACKEND
- Options:
virtualenv
,uv
- Default:
virtualenv
- meltano config
- env
meltano config meltano set venv.backend uv
meltano install --clean
MELTANO_VENV_BACKEND=uv meltano install --clean
Snowplow Tracking
snowplow.collector_endpoints
- Environment variable:
MELTANO_SNOWPLOW_COLLECTOR_ENDPOINTS
- Default:
["https://sp.meltano.com"]
Snowplow collector endpoints to be used if the send_anonymous_usage_stats
setting is enabled. Events will be sent to all of these collectors.
Feature Flags
ff.strict_env_var_mode
- Environment variable:
MELTANO_FF_STRICT_ENV_VAR_MODE
- Default:
False
Causes an exception to be raised if an environment variable is used within the project's Meltano configuration but that environment variable is not set.
ff.plugin_locks_required
- Environment variable:
MELTANO_FF_PLUGIN_LOCKS_REQUIRED
- Default:
False
When this flag is enabled, plugins will only use lock files to determine the settings, installation source, etc with the exception of the meltano add
operations. This means that calling meltano run
will fail if a lock file is not present for one of the plugins.