question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

feature: Set Meltano system database_uri for different Meltano Environments in meltano.yml env block

See original GitHub issue

Feature scope

Configuration (settings parsing, validation, etc.)

Description

I would like to be able to set a different Meltano system database_uri (this setting) under an env block in meltano.yml. Currently, the only way to change this setting across environments is to change the MELTANO_DATABASE_URI environment variable (&/or .env file variable).

This is not currently possible.

It would look something like this:

environments:
- name: dev
  config:
    database_uri: postgresql://test:test@test.com:5432/postgres
    plugins:
      loaders: ...

Why is this a useful feature?

  • Keeping the system db separate in different environments is helpful. I like to limit shared resources between environments bc sharing them makes accidentally overwriting from one environment to the other more likely)
  • Allowing this setting to be included in meltano.yml makes it more visible and transparent to all users, and reduces the amount of manual differentiating that needs to be done in other places.

There is a discussion of this in Slack here: https://meltano.slack.com/archives/C01TCRBBJD7/p1664314402975189

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
qbattencommented, Oct 4, 2022

As a workaround, is it sufficient to specify this using an environment variable that you pre-configure before running Meltano CLI commands? The extra manual step of configuring the env variable is not ideal, but I’m curious if this makes a valid workaround for you for the time being. What do you think?

@aaronsteers yep, that’s what I’m doing right now and it works fine! This doesn’t feel critical to me, it just would be nice to have.

@tayloramurphy re: #6848, I havent run into any overwrites bc I was concerned about that happening and therefore decided to use different system DBs for dev and prod. I do think these two issues are sort of linked, in that they’re both about making environments work smoothly for users.

0reactions
aaronsteerscommented, Oct 19, 2022

Somewhat related, but it seems that the database_uri configuration option currently is also not expanding any $ variables from the .env or terminal env.

Good point.

Logged here:

Read more comments on GitHub >

github_iconTop Results From Across the Web

Settings - Meltano Documentation
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 ...
Read more >
Environments
As part of Meltano's vision to enable data teams to operate with best practices, ... A set of environment definitions looks like this...
Read more >
Manage Configuration
Meltano is responsible for managing the configuration of all of a project's plugins. It knows what settings are supported by each plugin, and...
Read more >
Command Line - Meltano Documentation
Meltano provides a command line interface (CLI) that makes it easy to manage your project, plugins, and EL(T) pipelines.To quickly find the meltano...
Read more >
The Latest Trend In DataOps: Meltano Environments
env ` files and also reduce the number of variables that need to be set manually. Configuration set for plugins in an environment...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found