Hi, fellows! I am new to Meltano, sorry for the no...
# announcements
z
Hi, fellows! I am new to Meltano, sorry for the noob question. I am trying to set it up and this is the error that I receive on "meltano init PROJECT": ```[2020-10-04 155523,818] [23524|MainThread|root] [CRITICAL] Could not update meltano.yml: 'WindowsPath' object has no attribute 'decode' Traceback (most recent call last): File "c:\users\ivano\appdata\local\programs\python\python37\lib\runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "c:\users\ivano\appdata\local\programs\python\python37\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\Users\ivano\AppData\Local\Programs\Python\Python37\Scripts\meltano.exe\__main__.py", line 7, in <module> File "c:\users\ivano\appdata\local\programs\python\python37\lib\site-packages\meltano\cli\__init__.py", line 38, in main cli(obj={"project": None}) File "c:\users\ivano\appdata\local\programs\python\python37\lib\site-packages\click\core.py", line 764, in call return self.main(*args, **kwargs) File "c:\users\ivano\appdata\local\programs\python\python37\lib\site-packages\click\core.py", line 717, in main rv = self.invoke(ctx) File "c:\users\ivano\appdata\local\programs\python\python37\lib\site-packages\click\core.py", line 1137, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "c:\users\ivano\appdata\local\programs\python\python37\lib\site-packages\click\core.py", line 956, in invoke return ctx.invoke(self.callback, **ctx.params) File "c:\users\ivano\appdata\local\programs\python\python37\lib\site-packages\click\core.py", line 555, in invoke return callback(*args, **kwargs) File "c:\users\ivano\appdata\local\programs\python\python37\lib\site-packages\click\decorators.py", line 17, in new_func return f(get_current_context(), *args, **kwargs) File "c:\users\ivano\appdata\local\programs\python\python37\lib\site-packages\meltano\cli\params.py", line 23, in decorate return func(*args, **kwargs) File "c:\users\ivano\appdata\local\programs\python\python37\lib\site-packages\meltano\cli\initialize.py", line 46, in init project = init_service.init() File "c:\users\ivano\appdata\local\programs\python\python37\lib\site-packages\meltano\core\project_init_service.py", line 39, in init self.set_send_anonymous_usage_stats() File "c:\users\ivano\appdata\local\programs\python\python37\lib\site-packages\meltano\core\project_init_service.py", line 61, in set_send_anonymous_usage_stats store=SettingValueStore.MELTANO_YML, File "c:\users\ivano\appdata\local\programs\python\python37\lib\site-packages\meltano\core\settings_service.py", line 286, in set value, _ = self.set_with_metadata(*args, **kwargs) File "c:\users\ivano\appdata\local\programs\python\python37\lib\site-packages\meltano\core\settings_service.py", line 279, in set_with_metadata set_metadata = manager.set(name, path, value, setting_def=setting_def) File "c:\users\ivano\appdata\local\programs\python\python37\lib\site-packages\meltano\core\settings_store.py", line 301, in set self.log(f"Set path '{path}' in `meltano.yml`: {value!r}") File "c:\users\ivano\appdata\local\programs\python\python37\lib\contextlib.py", line 119, in exit next(self.gen) File "c:\users\ivano\appdata\local\programs\python\python37\lib\site-packages\meltano\core\settings_store.py", line 344, in update_config self.settings_service._update_meltano_yml_config(config) File "c:\users\ivano\appdata\local\programs\python\python37\lib\site-packages\meltano\core\project_settings_service.py", line 55, in _update_meltano_yml_config self.config_service.update_config(config) File "c:\users\ivano\appdata\local\programs\python\python37\lib\site-packages\meltano\core\config_service.py", line 46, in update_config meltano.extras = config File "c:\users\ivano\appdata\local\programs\python\python37\lib\contextlib.py", line 119, in exit next(self.gen) File "c:\users\ivano\appdata\local\progra…
d
@zlatan Welcome Zlatan! Per https://meltano.com/docs/installation.html#unix-like-environment, Windows is not currently supported officially, and WSL or Docker are recommended. Is using either of those an option for you? Of course we'd still like to support Windows natively if possible. Can you please create a new issue for this bug on https://gitlab.com/meltano/meltano/-/issues? From a quick look at the source code, I think we could resolve this by updating the
atomicwrites
package to version 1.4.0, which includes this bugfix: https://github.com/untitaker/python-atomicwrites/commit/2a91f2ef3e85b6a6c4dca3209a02eaba9b003059
z
Thanks for the response, Douwe! I've tried running Meltano through Docker, but then I issues with installing the tap-facebook. The error is that pip is lower version and I couldn't understand how can I upgrade meltano to use higher pip version in the Docker container.
d
@zlatan Is the pip issue similar to what's being discussed and addressed in https://gitlab.com/meltano/meltano/-/issues/2372?
z
It seem so. Is there a solution for it?
d
@zlatan A solution is being implemented in https://gitlab.com/meltano/meltano/-/merge_requests/1894 🙂 Can you share more about the tap-facebook issue you ran into? There may be a temporary workaround
z
Yup, give me some minutes to replicate the issue, and I will write back 🙂
Copy code
C:\devABI\fb_project\try1>docker run -v %cd%:/projects -w /projects meltano/meltano add --custom extractor tap-facebook
Adding new custom extractor with name 'tap-facebook'...

Specify the plugin's namespace, which will serve as the:
- identifier to find related/compatible plugins
- preferred database schema (`load_schema` extra),
  for use by loaders that support a target schema

Hit Return to accept the default: plugin name with underscores instead of dashes

(namespace) [tap_facebook]: Aborted!
Weird, now it spits out "Aborted!". Yesterday I could specify namespace and settings and it began to install..
d
z
Worked, thanks.
BTW, the default tap-facebook is using a deprecated API version, thus is not working.
z
@douwe_maan just followed the advice to change the pip_url for tap-facebook in meltano.yml to aiohttp=2.0.0 tap-facebook, but I receive this response:
Copy code
C:\devABI\fb_project\try1>docker run --interactive -v %cd%:/projects -w /projects meltano/meltano install extractor tap-facebook
Installing 1 plugins...
Installing extractor 'tap-facebook'...
Extractor 'tap-facebook' could not be installed: failed to install plugin 'tap-facebook'.
Invalid requirement: 'aiohttp=2.0.0'
= is not a valid operator. Did you mean == ?
You are using pip version 18.1, however version 20.2.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

Failed to install plugin(s)
d
@zlatan My bad, you need 2
==
s there!
z
Ah, sorry for my illiteracy!
d
No worries, I fixed the comment 🙂
z
@douwe_maan Moving forward, I am getting excited! Installed and set up FB, it seems that it returns results now. I installed target-bigquery and meltano config target-bigquery list returns this:
Copy code
C:\devABI\fb_project\try1>docker run --interactive -v %cd%:/projects -w /projects meltano/meltano config target-bigquery list
Traceback (most recent call last):
  File "/usr/local/bin/meltano", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.6/site-packages/meltano/cli/__init__.py", line 38, in main
    cli(obj={"project": None})
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/meltano/cli/config.py", line 200, in list_settings
    full_config = settings.config_with_metadata(session=session, extras=load_extras)
  File "/usr/local/lib/python3.6/site-packages/meltano/core/settings_service.py", line 115, in config_with_metadata
    for setting_def in self.definitions(extras=extras):
  File "/usr/local/lib/python3.6/site-packages/meltano/core/settings_service.py", line 329, in definitions
    self._definitions, self.flat_meltano_yml_config
  File "/usr/local/lib/python3.6/site-packages/meltano/core/settings_service.py", line 87, in flat_meltano_yml_config
    return flatten(self._meltano_yml_config, "dot")
  File "/usr/local/lib/python3.6/site-packages/meltano/core/plugin/settings_service.py", line 135, in _meltano_yml_config
    **{f"_{k}": v for k, v in project_plugin.current_extras.items()},
TypeError: 'str' object is not a mapping
d
@zlatan Can you share the
meltano.yml
definition for
target-bigquery
?
z
Now it returns
Copy code
C:\devABI\fb_project\try1>docker run --interactive -v %cd%:/projects -w /projects meltano/meltano config target-bigquery list
Traceback (most recent call last):
  File "/usr/local/bin/meltano", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.6/site-packages/meltano/cli/__init__.py", line 38, in main
    cli(obj={"project": None})
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/meltano/cli/config.py", line 200, in list_settings
    full_config = settings.config_with_metadata(session=session, extras=load_extras)
  File "/usr/local/lib/python3.6/site-packages/meltano/core/settings_service.py", line 124, in config_with_metadata
    **kwargs,
  File "/usr/local/lib/python3.6/site-packages/meltano/core/settings_service.py", line 187, in get_with_metadata
    if setting_def and setting_def.is_extra:
  File "/usr/local/lib/python3.6/site-packages/meltano/core/setting_definition.py", line 126, in is_extra
    return self.name.startswith("_")
AttributeError: 'NoneType' object has no attribute 'startswith'
message has been deleted
Sorry, access token was in there
d
Ah, that doesn't look quite right; it looks like your newlines were picked up as
\r
😬 Can you change
namespace
to
bigquery
,
executable
to
target-bigquery
and remove
settings
entirely?
And drop the
\r
at the end of
pip_url
as well
z
OK, will let you know of results
d
Note that you'll still need to configure
target-bigquery
, of course
z
yes, i'll try to get the command "meltano config target-bigquery list"
d
That won't list anything though, since Meltano doesn't know about the target's settings yet 🙂 Did you enter the setting names when
meltano add --custom
asked you about them?
Since we just removed
settings
, you can either restore it and add
- name: <name>
for each setting, or just configure the settings as custom settings: https://meltano.com/docs/configuration.html#custom-settings
z
Okay, I'll try now
Settings should be the config file generated through BigQuery, correct? E.g client_id, project_id, auth_uri, token_uri etc.
d
z
Oh, and where do the OAuth settings go?
d
Judging by the README, in a file named
client_secrets.json
in your project dir: https://github.com/RealSelf/target-bigquery#step-1-activate-the-google-bigquery-api
z
Ah, I'll get to reading. Thanks, man
```C:\devABI\fb_project\try1>docker run --interactive -v %cd%:/projects -w /projects meltano/meltano elt tap-facebook target-bigquery meltano | Running extract & load... meltano | No state was found, complete import. target-bigquery | Traceback (most recent call last): target-bigquery | File "/projects/.meltano/loaders/target-bigquery/venv/bin/target-bigquery", line 6, in <module> target-bigquery | from pkg_resources import load_entry_point target-bigquery | File "/projects/.meltano/loaders/target-bigquery/venv/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3126, in <module> target-bigquery | @_call_aside target-bigquery | File "/projects/.meltano/loaders/target-bigquery/venv/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3110, in _call_aside target-bigquery | f(*args, **kwargs) target-bigquery | File "/projects/.meltano/loaders/target-bigquery/venv/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3139, in _initialize_master_working_set target-bigquery | working_set = WorkingSet._build_master() target-bigquery | File "/projects/.meltano/loaders/target-bigquery/venv/lib/python3.6/site-packages/pkg_resources/__init__.py", line 581, in _build_master target-bigquery | ws.require(requires) target-bigquery | File "/projects/.meltano/loaders/target-bigquery/venv/lib/python3.6/site-packages/pkg_resources/__init__.py", line 898, in require target-bigquery | needed = self.resolve(parse_requirements(requirements)) target-bigquery | File "/projects/.meltano/loaders/target-bigquery/venv/lib/python3.6/site-packages/pkg_resources/__init__.py", line 784, in resolve target-bigquery | raise DistributionNotFound(req, requirers) target-bigquery | pkg_resources.DistributionNotFound: The 'grpcio<2.0dev,>=1.29.0; extra == "grpc"' distribution was not found and is required by google-api-core tap-facebook | INFO Syncing adcreative, fields {'thumbnail_url', 'title', 'object_story_id', 'image_url', 'applink_treatment', 'adlabels', 'instagram_actor_id', 'effective_object_story_id', 'product_set_id', 'template_url', 'body', 'call_to_action_type', 'template_url_spec', 'id', 'object_story_spec', 'object_id', 'account_id', 'status', 'instagram_permalink_url', 'link_url', 'actor_id', 'object_url', 'name', 'image_hash', 'effective_instagram_story_id', 'link_og_id', 'object_type', 'instagram_story_id', 'image_crops', 'video_id', 'url_tags'} tap-facebook | ERROR [Errno 32] Broken pipe tap-facebook | Traceback (most recent call last): tap-facebook | File "/projects/.meltano/extractors/tap-facebook/venv/lib/python3.6/site-packages/tap_facebook/__init__.py", line 740, in main tap-facebook | main_impl() tap-facebook | File "/projects/.meltano/extractors/tap-facebook/venv/lib/python3.6/site-packages/tap_facebook/__init__.py", line 733, in main_impl tap-facebook | do_sync(account, catalog, args.state) tap-facebook | File "/projects/.meltano/extractors/tap-facebook/venv/lib/python3.6/site-packages/tap_facebook/__init__.py", line 624, in do_sync tap-facebook | singer.write_schema(stream.name, schema, stream.key_properties, bookmark_key, stream.stream_alias) tap-facebook | File "/projects/.meltano/extractors/tap-facebook/venv/lib/python3.6/site-packages/singer/messages.py", line 269, in write_schema tap-facebook | bookmark_properties=bookmark_properties)) tap-facebook | File "/projects/.meltano/extractors/tap-facebook/venv/lib/python3.6/site-packages/singer/messages.py", line 226, in write_message tap-facebook | sys.stdout.write(format_message(message) + '\n') tap-facebook | BrokenPipeError: [Errno 32] Broken pipe tap-facebook | CRITICAL [Errno 32] Broken pipe tap-facebook | Traceback (most recent call last): tap-facebook | File "/projects/.meltano/extractors/tap-facebook/venv/bin/tap-facebook", line 11, in <module> tap-facebook | load_entry_point('tap…
Doh, almost worked 😄
```C:\devABI\fb_project\try1>docker run --interactive -v %cd%:/projects -w /projects meltano/meltano elt tap-facebook target-bigquery meltano | Running extract & load... meltano | No state was found, complete import. tap-facebook | INFO Syncing adcreative, fields {'thumbnail_url', 'object_story_id', 'link_url', 'instagram_permalink_url', 'account_id', 'image_crops', 'id', 'adlabels', 'object_id', 'object_type', 'status', 'call_to_action_type', 'template_url', 'image_hash', 'title', 'product_set_id', 'video_id', 'body', 'applink_treatment', 'link_og_id', 'object_url', 'effective_object_story_id', 'actor_id', 'instagram_story_id', 'effective_instagram_story_id', 'instagram_actor_id', 'template_url_spec', 'url_tags', 'name', 'image_url', 'object_story_spec'} target-bigquery | WARNING Compute Engine Metadata server unavailable onattempt 1 of 3. Reason: [Errno 111] Connection refused target-bigquery | WARNING Compute Engine Metadata server unavailable onattempt 2 of 3. Reason: [Errno 111] Connection refused target-bigquery | WARNING Compute Engine Metadata server unavailable onattempt 3 of 3. Reason: [Errno 111] Connection refused target-bigquery | WARNING Authentication failed using Compute Engine authentication due to unavailable metadata server. target-bigquery | Traceback (most recent call last): target-bigquery | File "/projects/.meltano/loaders/target-bigquery/venv/bin/target-bigquery", line 11, in <module> target-bigquery | load_entry_point('target-bigquery==0.10.2', 'console_scripts', 'target-bigquery')() target-bigquery | File "/projects/.meltano/loaders/target-bigquery/venv/lib/python3.6/site-packages/target_bigquery/__init__.py", line 61, in main target-bigquery | client, dataset = ensure_dataset(project_id, dataset_id, location) target-bigquery | File "/projects/.meltano/loaders/target-bigquery/venv/lib/python3.6/site-packages/target_bigquery/utils.py", line 28, in ensure_dataset target-bigquery | client = bigquery.Client(project=project_id, location=location) target-bigquery | File "/projects/.meltano/loaders/target-bigquery/venv/lib/python3.6/site-packages/google/cloud/bigquery/client.py", line 179, in init target-bigquery | project=project, credentials=credentials, _http=_http target-bigquery | File "/projects/.meltano/loaders/target-bigquery/venv/lib/python3.6/site-packages/google/cloud/client.py", line 250, in init target-bigquery | Client.__init__(self, credentials=credentials, client_options=client_options, _http=_http) target-bigquery | File "/projects/.meltano/loaders/target-bigquery/venv/lib/python3.6/site-packages/google/cloud/client.py", line 151, in init target-bigquery | credentials, _ = google.auth.default(scopes=scopes) target-bigquery | File "/projects/.meltano/loaders/target-bigquery/venv/lib/python3.6/site-packages/google/auth/_default.py", line 354, in default target-bigquery | raise exceptions.DefaultCredentialsError(_HELP_MESSAGE) target-bigquery | google.auth.exceptions.DefaultCredentialsError: Could not automatically determine credentials. Please set GOOGLE_APPLICATION_CREDENTIALS or explicitly create credentials and re-run the application. For more information, please see https://cloud.google.com/docs/authentication/getting-started tap-facebook | ERROR [Errno 32] Broken pipe tap-facebook | Traceback (most recent call last): tap-facebook | File "/projects/.meltano/extractors/tap-facebook/venv/lib/python3.6/site-packages/tap_facebook/__init__.py", line 740, in main tap-facebook | main_impl() tap-facebook | File "/projects/.meltano/extractors/tap-facebook/venv/lib/python3.6/site-packages/tap_facebook/__init__.py", line 733, in main_impl tap-facebook | do_sync(account, catalog, args.state) tap-facebook | File "/projects/.meltano/extractors/tap-facebook/venv/lib/python3.6/site-packages/tap_facebook/__init__.py", line 628, in do_sync tap-facebook | stream.sync() tap-faceboo…
I found a newly updated target-bigquery from Adswerve here: https://github.com/adswerve/target-bigquery It also almost worked with this error:
It has authentication issues. I've generated a client_secrets.json and also added GOOGLE_APPLICATION_CREDENTIALS environment variable, but it is still not working. Not sure if this is Meltano related, tho..
d
@zlatan That doesn't look specific to Meltano, no. If you run
meltano --log-level=debug elt ...
, you should see the exact command arguments and env vars
target-bigquery
was invoked with. Is
GOOGLE_APPLICATION_CREDENTIALS
listed there?
z
Not found
Is there a way to force it to load?
d
How are you setting the
GOOGLE_APPLICATION_CREDENTIALS
?
If you're using Docker, the easiest method will be to add it to
.env
z
Just tried it, but it still gives the same error. Tried to have "path" and without the ".
d
@zlatan That looks correct. It should work without the
TARGET_BIGQUERY_
prefix since I think the Google/BigQuery API package itself reads the env var. Did you say that the env vars do not show up in the
Env:
hash when you run
meltano --log-level=debug elt ...
? That's what we'll want to fix first. Can you try wrapping the values in
.env
in double quotes to make sure it's not a syntax issue?
z
Hi, Douwe! I'll try it out now
Yes, I tried with TARGET_BIGQUERY_ just to check if it would work
Tried with wrapped values in .env. No GOOGLE_APPLICATION_CREDENTIALS found when running
Copy code
meltano --log-level=debug elt
This is the INVOKING of target-bigquery
```DEBUG Invoking: ['/projects/.meltano/loaders/target-bigquery/venv/bin/target-bigquery', '--config', '/projects/.meltano/run/elt/2020-10-06T174456--tap-facebook--target-bigquery/bed1e815-9ff8-4b4f-8a0e-c0765902283a/target.config.json'] meltano | DEBUG Env: {'PATH': '/projects/.meltano/loaders/target-bigquery/venv/bin/usr/local/bin/usr/local/sbin/usr/local/bin/usr/sbin/usr/bin/sbin:/bin', 'HOSTNAME': '13f381fa5f51', 'LANG': 'C.UTF-8', 'GPG_KEY': '0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D', 'PYTHON_VERSION': '3.6.12', 'PYTHON_PIP_VERSION': '20.2.3', 'PYTHON_GET_PIP_URL': 'https://github.com/pypa/get-pip/raw/fa7dc83944936bf09a0e4cb5d5ec852c0d256599/get-pip.py', 'PYTHON_GET_PIP_SHA256': '6e0bb0a2c2533361d7f297ed547237caf1b7507f197835974c0dd7eba998c53c', 'NODE_VERSION': '10', 'HOME': '/root', 'MELTANO_JOB_TRIGGER': 'cli', 'MELTANO_PROJECT_ROOT': '/projects', 'MELTANO_SEND_ANONYMOUS_USAGE_STATS': 'true', 'MELTANO_PROJECT_ID': 'a04ac3e3-782c-4694-819c-174e6aadc13f', 'MELTANO_DATABASE_URI': 'sqlite:////projects/.meltano/meltano.db', 'MELTANO_PROJECT_READONLY': 'false', 'MELTANO_DISCOVERY_URL': 'https://www.meltano.com/discovery.yml', 'MELTANO_CLI_LOG_LEVEL': 'debug', 'MELTANO_UI_BIND_HOST': '0.0.0.0', 'MELTANO_API_HOSTNAME': '0.0.0.0', 'MELTANO_UI_BIND_PORT': '5000', 'MELTANO_API_PORT': '5000', 'PORT': '5000', 'MELTANO_UI_SECRET_KEY': 'thisisnotapropersecretkey', 'MELTANO_UI_PASSWORD_SALT': 'b4c124932584ad6e69f2774a0ae5c138', 'MELTANO_UI_WORKERS': '4', 'WORKERS': '4', 'WEB_CONCURRENCY': '4', 'MELTANO_UI_FORWARDED_ALLOW_IPS': '127.0.0.1', 'FORWARDED_ALLOW_IPS': '127.0.0.1', 'MELTANO_UI_READONLY': 'false', 'MELTANO_READONLY': 'false', 'MELTANO_UI_AUTHENTICATION': 'false', 'MELTANO_AUTHENTICATION': 'false', 'MELTANO_UI_ANONYMOUS_READONLY': 'false', 'MELTANO_UI_NOTIFICATION': 'false', 'MELTANO_NOTIFICATION': 'false', 'MELTANO_UI_ANALYSIS': 'true', 'MAIL_SERVER': 'localhost', 'MELTANO_MAIL_SERVER': 'localhost', 'MAIL_PORT': '1025', 'MELTANO_MAIL_PORT': '1025', 'MAIL_DEFAULT_SENDER': '"Meltano" <bot@meltano.com>', 'MELTANO_MAIL_DEFAULT_SENDER': '"Meltano" <bot@meltano.com>', 'MAIL_USE_TLS': 'false', 'MELTANO_MAIL_USE_TLS': 'false', 'MAIL_DEBUG': 'false', 'MELTANO_MAIL_DEBUG': 'false', 'MELTANO_OAUTH_SERVICE_PROVIDERS': 'all', 'MELTANO_TRACKING_IDS_CLI': 'UA-132758957-3', 'MELTANO_CLI_TRACKING_ID': 'UA-132758957-3', 'MELTANO_TRACKING_IDS_UI': 'UA-132758957-2', 'MELTANO_UI_TRACKING_ID': 'UA-132758957-2', 'MELTANO_TRACKING_IDS_UI_EMBED': 'UA-132758957-6', 'MELTANO_EMBED_TRACKING_ID': 'UA-132758957-6', 'MELTANO_EXTRACTOR_NAME': 'tap-facebook', 'MELTANO_EXTRACTOR_PROFILE': 'default', 'MELTANO_EXTRACTOR_NAMESPACE': 'tap_facebook', 'TAP_FACEBOOK_ACCOUNT_ID': '367982704370551', 'MELTANO_EXTRACT_ACCOUNT_ID': '367982704370551', 'TAP_FACEBOOK_ACCESS_TOKEN': 'HIDDEN', 'TAP_FACEBOOK_START_DATE': '2020-09-09', 'MELTANO_EXTRACT_START_DATE': '2020-09-09', 'TAP_FACEBOOK_INSIGHTS_BUFFER_DAYS': '0', 'MELTANO_EXTRACT_INSIGHTS_BUFFER_DAYS': '0', 'TAP_FACEBOOK__LOAD_SCHEMA': 'tap_facebook', 'MELTANO_EXTRACT__LOAD_SCHEMA': 'tap_facebook', 'TAP_FACEBOOK__SELECT': '["*."]', 'MELTANO_EXTRACT__SELECT': '[".*"]', 'TAP_FACEBOOK__METADATA': '{}', 'MELTANO_EXTRACT__METADATA': '{}', 'TAP_FACEBOOK__SCHEMA': '{}', 'MELTANO_EXTRACT__SCHEMA': '{}', 'TAP_FACEBOOK__SELECT_FILTER': '[]', 'MELTANO_EXTRACT__SELECT_FILTER': '[]', 'MELTANO_LOADER_NAME': 'target-bigquery', 'MELTANO_LOADER_PROFILE': 'default', 'MELTANO_LOADER_NAMESPACE': 'target-bigquery', 'TARGET_BIGQUERY__DIALECT': 'target-bigquery', 'MELTANO_LOAD__DIALECT': 'target-bigquery', 'TARGET_BIGQUERY_PROJECT_ID': 'digitalabi', 'MELTANO_LOAD_PROJECT_ID': 'digitalabi', 'TARGET_BIGQUERY_DATASET_ID': 'meltano_try', 'MELTANO_LOAD_DATASET_ID': 'meltano_try', 'TARGET_BIGQUERY_LOCATION': 'US', 'MELTANO_LOAD_LOCATION': 'US', 'TARGET_BIGQUERY_TABLE_ID': 'testing_meltano', 'MELTANO_LOAD_TABLE_ID': 'testing_meltano', 'TARGET_BIGQUERY_VALIDATE_RECORDS': 'true', 'MELTANO_LOAD_VALIDATE_RECORDS': 'tr…
d
@zlatan If env vars defined in
.env
are not making it to the plugin when it's invoked, we're looking at a Meltano bug 😬 Can you please create an issue at https://gitlab.com/meltano/meltano/-/issues?
z
Yes, sure, I'll add it there
Do you think there could be a simple tweak for it, or is it more major?
d
In the mean time, try this workaround: In your
meltano.yml
, under
settings
, add a dummy setting with `env: GOOGLE_APPLICATION_CREDENTIALS`:
Copy code
settings:
- name: credentials_path
  env: GOOGLE_APPLICATION_CREDENTIALS
Then you can add
credentials_path: path-to-credentials.json
under
config:
, or keep setting
GOOGLE_APPLICATION_CREDENTIALS
through
.env
as you are doing now
Defining it as a setting (even if it's one that the tap doesn't actually support by name, only env var) will ensure the env var is passed on
z
OK, will try it now
d
Great, let me know how it goes 🙂 If you file the issue, I can make sure the workaround won't be needed in the future
z
Should look like this, correct?
Copy code
meltano         | Extraction failed (1): BrokenPipeError: [Errno 32] Broken pipe
meltano         | Loading failed (1): google.auth.exceptions.DefaultCredentialsError: File C:/devABI/fb_project/try1/client_secrets.json was not found.
ELT could not be completed: Tap and target failed
It says it cannot find the file, but when copy/pasting the exact URL into the CMD it opens the file.
d
Meltano is running inside Docker right? Then
C:/
wouldn't be available from inside the container 🙂
Can you put the
client_secrets.json
file inside of the project directory, so that it gets mounted into the container, and then set the setting to a relative path (
./client_secrets.json
) instead of an absolute one?
z
@douwe_maan you are a genius, my friend!
It connected to BigQuery
Some other errors came up with the BigQuery loading, but I think it is related to the schema, I should include a default schema. Will get back with what happens. I really appreciate your help @douwe_maan! I hope you realize how helpful you are!
d
@zlatan That's great to hear! And thanks for the kind words 😄
z
Yup! I will upload it tomorrow first thing (it's 0:19 AM here, going to bed now). 🙂