Skip to content

Commit

Permalink
docs: Added YAML docs examples of global and per-plugin python exec…
Browse files Browse the repository at this point in the history
…utable option (#8544)

docs: Added docs examples of global and per-plugin `python` executable option
  • Loading branch information
edgarrmondragon committed May 15, 2024
1 parent 5c69bff commit 6323b55
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
2 changes: 2 additions & 0 deletions docs/docs/reference/command-line-interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,8 @@ Then regardless of the Python version used when the plugin is installed, `tap-gi

- `--force-install`: Ignore the required Python version declared by the plugins.

- `--python`: The Python version to use for the plugin. See [the setting documentation](/reference/settings#python) for more information.

### Using `add` with Environments

The `add` command does not run relative to a [Meltano Environment](https://docs.meltano.com/concepts/environments). The `--environment` flag and [`default_environment` setting](https://docs.meltano.com/concepts/environments#default-environments) in your `meltano.yml` file will be ignored if set.
Expand Down
25 changes: 24 additions & 1 deletion docs/docs/reference/settings.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,28 @@ to list all available settings with their names, environment variables, and curr

### <a name="plugin-python"></a>`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`.
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>`](/reference/command-line-interface#add).

If not specified, [the top-level `python` setting will be used](#project-python), 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:

```yaml
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](/concepts/project).
Expand All @@ -57,6 +71,15 @@ This setting only applies when creating new virtual environments. If you've alre

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:

```yaml
python: /path/to/python3.10 # or just python3.10 if it's in your $PATH
plugins:
extractors: ...
loaders: ...
```

### <a name="send_anonymous_usage_stats"></a>`send_anonymous_usage_stats`

- [Environment variable](../guide/configuration#configuring-settings): `MELTANO_SEND_ANONYMOUS_USAGE_STATS`
Expand Down

0 comments on commit 6323b55

Please sign in to comment.