most-monkey-23419
04/04/2021, 7:56 PMsalmon-salesclerk-77709
04/04/2021, 7:56 PMmammoth-napkin-71897
04/04/2021, 8:11 PMmost-monkey-23419
04/04/2021, 8:16 PMm config target-postgres list
, but because of the naming convention for dbt projects i can not run m config tap-gitlab list
because this will always give me the loader config. correct?pip_url: <https://gitlab.com/meltano/dbt-tap-gitlab.git>
I can load a transform from an external git repo. but what if i want to define the transform locally? how would i load it and is there no way to name it other then to mirror the name of the respective extractor?mammoth-napkin-71897
04/04/2021, 8:37 PMmost-monkey-23419
04/04/2021, 8:52 PMextractor tap-gitlab
setup to loader target-postgres
Now i am struggling to get the transform tap-gitlab
working. i suspect there is an issue with the schema env variable.
running $ meltano config tap-gitlab list
gives me the current config of extractor tap-gitlab
. how do i get config of transform tap-gitlab
$ meltano config tap-gitlab list
results in:
api_url [env: TAP_GITLAB_API_URL] (default: '<https://gitlab.com>') current value: '<https://git.finnfrotscher.com>' (from `meltano.yml`)
GitLab Instance: GitLab API/instance URL. When an API path is omitted, `/api/v4/` is assumed.
private_token [env: TAP_GITLAB_PRIVATE_TOKEN, GITLAB_API_TOKEN] (default: '') current value: 'xxx' (from `meltano.yml`: '$GITLAB_TOKEN')
Access Token: GitLab personal access token or other API token.
groups [env: TAP_GITLAB_GROUPS, GITLAB_API_GROUPS] current value: '' (default)
Groups: Space-separated names of groups to extract data from. Leave empty and provide a project name if you'd like to pull data from a project in a personal user namespace.
transform/
folder?custom_dbt
being the result of dbt init custom_dbt
?mammoth-napkin-71897
04/04/2021, 10:11 PMmost-monkey-23419
04/05/2021, 11:33 AMcd transform && dbt run --profile-dir ./profile
salmon-salesclerk-77709
04/05/2021, 1:17 PMmeltano invoke dbt …
to run commands that way too.most-monkey-23419
04/05/2021, 1:19 PMmeltano invoke dbt run
but it works perfectly as expected when using dbt run
salmon-salesclerk-77709
04/05/2021, 1:20 PMmeltano --log-level=debug invoke …
most-monkey-23419
04/05/2021, 1:21 PM⟩ meltano --log-level=debug invoke dbt run ...ence/meltano/demo
[2021-04-05 15:21:12,787] [29112|MainThread|root] [DEBUG] Creating engine <meltano.core.project.Project object at 0x110f277f0>@sqlite:////Users/finnfrotscher/code/cofenster/business-intelligence/meltano/demo/.meltano/meltano.db
[2021-04-05 15:21:12,836] [29112|MainThread|urllib3.connectionpool] [DEBUG] Starting new HTTPS connection (1): <http://www.meltano.com:443|www.meltano.com:443>
[2021-04-05 15:21:13,544] [29112|MainThread|urllib3.connectionpool] [DEBUG] <https://www.meltano.com:443> "GET /discovery.yml HTTP/1.1" 200 91317
[2021-04-05 15:21:14,494] [29112|MainThread|root] [WARNING] The `discovery.yml` manifest received from <https://www.meltano.com/discovery.yml> has version 17, while this version of Meltano requires version 16.
[2021-04-05 15:21:14,494] [29112|MainThread|root] [WARNING] Please install the latest compatible version of Meltano using `meltano upgrade`.
[2021-04-05 15:21:14,494] [29112|MainThread|root] [WARNING] Falling back on the cached `discovery.yml` manifest...
[2021-04-05 15:21:14,699] [29112|MainThread|meltano.cli.utils] [DEBUG] argument type <class 'NoneType'> is not in the flattenalbe types (<class 'collections.abc.Mapping'>,)
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/meltano/cli/__init__.py", line 43, in main
cli(obj={"project": None})
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/meltano/cli/params.py", line 23, in decorate
return func(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/meltano/cli/params.py", line 57, in decorate
func(project, *args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/meltano/cli/invoke.py", line 45, in invoke
with invoker.prepared(session):
File "/usr/local/Cellar/python@3.9/3.9.2_4/Frameworks/Python.framework/Versions/3.9/lib/python3.9/contextlib.py", line 117, in __enter__
return next(self.gen)
File "/usr/local/lib/python3.9/site-packages/meltano/core/plugin_invoker.py", line 129, in prepared
self.prepare(session)
File "/usr/local/lib/python3.9/site-packages/meltano/core/plugin_invoker.py", line 102, in prepare
self.plugin_config = self.settings_service.as_dict(
File "/usr/local/lib/python3.9/site-packages/meltano/core/settings_service.py", line 134, in as_dict
config_metadata = self.config_with_metadata(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/meltano/core/settings_service.py", line 113, in config_with_metadata
for setting_def in self.definitions(extras=extras):
File "/usr/local/lib/python3.9/site-packages/meltano/core/settings_service.py", line 341, in definitions
for setting in self.setting_definitions
File "/usr/local/lib/python3.9/site-packages/meltano/core/plugin/settings_service.py", line 68, in setting_definitions
return self.plugin.settings_with_extras
File "/usr/local/lib/python3.9/site-packages/meltano/core/plugin/project_plugin.py", line 187, in settings_with_extras
return [*self.settings, *self.extra_settings]
File "/usr/local/lib/python3.9/site-packages/meltano/core/plugin/project_plugin.py", line 174, in settings
*SettingDefinition.from_missing(existing_settings, self.config),
File "/usr/local/lib/python3.9/site-packages/meltano/core/setting_definition.py", line 98, in from_missing
flat_config = flatten(config, "dot")
File "/usr/local/lib/python3.9/site-packages/meltano/core/utils/__init__.py", line 179, in flatten
return flatten_dict.flatten(d, reducer, **kwargs)
File "/usr/local/lib/python3.9/site-packages/flatten_dict/flatten_dict.py", line 46, in flatten
raise ValueError("argument type %s is not in the flattenalbe types %s"
ValueError: argument type <class 'NoneType'> is not in the flattenalbe types (<class 'collections.abc.Mapping'>,)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/meltano/cli/__init__.py", line 51, in main
raise CliError(str(err)) from err
meltano.cli.utils.CliError: argument type <class 'NoneType'> is not in the flattenalbe types (<class 'collections.abc.Mapping'>,)
argument type <class 'NoneType'> is not in the flattenalbe types (<class 'collections.abc.Mapping'>,)
salmon-salesclerk-77709
04/05/2021, 1:22 PMdbt run
I usually pass in something through --models
most-monkey-23419
04/05/2021, 1:23 PMmeltano invoke dbt
but its created when using dbt directlysalmon-salesclerk-77709
04/05/2021, 1:26 PMmost-monkey-23419
04/05/2021, 1:28 PMsalmon-salesclerk-77709
04/05/2021, 1:28 PM.env
file is a good methodbillowy-barista-37174
04/05/2021, 1:41 PMsalmon-salesclerk-77709
04/05/2021, 1:43 PMbillowy-barista-37174
04/05/2021, 1:44 PMmeltano install transformer dbt
?most-monkey-23419
04/05/2021, 1:51 PMmeltano add transformers dbt
python --version
resulting in 3.8.9
meltano | Transformation failed (1): hologram.ValidationError: Unable to create schema for 'Optional'
meltano --log-level=debug invoke dbt run
again, i get this interesting bit:
[DEBUG] Invoking: ['/Users/finnfrotscher/code/cofenster/business-intelligence/meltano/demo/.meltano/transformers/dbt/venv/bin/dbt', 'run']
[DEBUG] Env: {
...
'DBT_TARGET_SCHEMA': 'analytics',
'MELTANO_TRANSFORM_TARGET_SCHEMA': 'analytics',
'DBT_MODELS': ' my_meltano_project',
'MELTANO_TRANSFORM_MODELS': ' my_meltano_project'
'DBT_TARGET_SCHEMA': 'analytics',
'MELTANO_TRANSFORM_TARGET_SCHEMA': 'analytics',
'DBT_MODELS': ' my_meltano_project',
'MELTANO_TRANSFORM_MODELS': ' my_meltano_project'
}
' my_meltano_project'
why the empty spaces?
where does DBT_TARGET_SCHEMA: analytics
come from?salmon-salesclerk-77709
04/05/2021, 2:05 PMmy_meltano_project
it’s an artificat of how things are chained together. b/c you can pass multiple values to dbt run --models x y z
the space ensures things aren’t smushed together. but I’m not 100% sureanalytics
is the default schema defined in discovery.yml. It can be overriddenmost-monkey-23419
04/05/2021, 2:24 PMmeltano --log-level=debug invoke dbt run
contains the settings:
'DBT_TARGET_SCHEMA': 'api_testing',
'DBT_MODELS': 'my_meltano_project',
'MELTANO_TRANSFORM_MODELS': 'my_meltano_project'
i still get the error `Unable to create schema for 'Optional'``salmon-salesclerk-77709
04/05/2021, 2:30 PMmost-monkey-23419
04/05/2021, 2:45 PMsalmon-salesclerk-77709
04/05/2021, 2:45 PMmost-monkey-23419
04/05/2021, 2:46 PMm add loaders target-postgres
since setting up the venv for python3.8salmon-salesclerk-77709
04/05/2021, 2:48 PMsalmon-actor-23953
04/05/2021, 3:40 PMmost-monkey-23419
04/05/2021, 4:08 PMsalmon-salesclerk-77709
04/05/2021, 4:09 PMmost-monkey-23419
04/05/2021, 4:20 PMmeltano analytics
command. i allways find them helpfullsalmon-salesclerk-77709
04/05/2021, 4:53 PMmost-monkey-23419
04/13/2021, 9:51 AMsalmon-salesclerk-77709
04/13/2021, 3:10 PM