Has anyone had any issues regarding the target-big...
# troubleshooting
s
Has anyone had any issues regarding the target-bigquery tap? This morning I suddenly got some credential errors:
Copy code
WARNING Compute Engine Metadata server unavailable on attempt 1 of 3. Reason: timed out
WARNING Compute Engine Metadata server unavailable on attempt 2 of 3. Reason: [Errno 113] No route to host
WARNING Compute Engine Metadata server unavailable on attempt 3 of 3. Reason: timed out
WARNING Authentication failed using Compute Engine authentication due to unavailable metadata server.
Traceback (most recent call last):
  File "/project/.meltano/loaders/target-bigquery/venv/bin/target-bigquery", line 8, in <module>
    sys.exit(main())
  File "/project/.meltano/loaders/target-bigquery/venv/lib/python3.8/site-packages/target_bigquery/__init__.py", line 93, in main
    client, dataset = ensure_dataset(project_id, dataset_id, location)
  File "/project/.meltano/loaders/target-bigquery/venv/lib/python3.8/site-packages/target_bigquery/utils.py", line 43, in ensure_dataset
    client = bigquery.Client(project=project_id, location=location)
  File "/project/.meltano/loaders/target-bigquery/venv/lib/python3.8/site-packages/google/cloud/bigquery/client.py", line 206, in __init__
    super(Client, self).__init__(
  File "/project/.meltano/loaders/target-bigquery/venv/lib/python3.8/site-packages/google/cloud/client/__init__.py", line 321, in __init__
    Client.__init__(
  File "/project/.meltano/loaders/target-bigquery/venv/lib/python3.8/site-packages/google/cloud/client/__init__.py", line 178, in __init__
    credentials, _ = google.auth.default(scopes=scopes)
  File "/project/.meltano/loaders/target-bigquery/venv/lib/python3.8/site-packages/google/auth/_default.py", line 579, in default
    raise exceptions.DefaultCredentialsError(_HELP_MESSAGE)
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>
v
smells like env variables set in a non "restart" friendly way
s
I fixed it setting the GOOGLE_APPLICATION_CREDENTIALS directly in env
Copy code
- name: staging
  config:
    plugins:
      extractors:
      - name: tap-github
        select:
        - repositories.*
        - pull_requests.*
        - pull_request_commits.*
      loaders:
      - name: target-bigquery
        config:
          project_id: potloc-staging
          credentials_path: .secrets/gbq-client_secrets-staging.json
  env:
    TARGET_STITCH__SNAPCHAT_TOKEN: ""
    TARGET_STITCH__WRIKE_TOKEN: ""
    TARGET_STITCH__HUBSPOT_V3_TOKEN: ""
    GOOGLE_APPLICATION_CREDENTIALS: .secrets/gbq-client_secrets-staging.json
before I had only the credentials_path portion
Although I definitely need to upgrade how I manage my env 😛
v
What you did look sgreat