Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug where bigquery extracts fail due to missing import #1359

Merged
merged 1 commit into from
May 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import json
from typing import Any, Dict, List, Optional

import pandas as pd
from aqueduct_executor.operators.connectors.data import common, config, connector, extract, load
from aqueduct_executor.operators.utils.enums import ArtifactType
from aqueduct_executor.operators.utils.saved_object_delete import SavedObjectDelete
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,7 @@ def setup_connector(
elif connector_name == common.Name.BIG_QUERY:
try:
from google.cloud import bigquery
import db_dtypes
except:
raise MissingConnectorDependencyException(
"Unable to initialize the BigQuery connector. Have you run `aqueduct install bigquery`?"
Expand Down
2 changes: 2 additions & 0 deletions src/python/bin/aqueduct
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ CHUNK_SIZE = 4096
PYMONGO_VERSION_BOUND = "<=4.3.3"
PSYCOPG2_VERSION_BOUND = "<=2.9.5"
BIGQUERY_VERSION_BOUND = "<=3.5.0"
DB_DTYPES_VERSION_BOUND = "<=1.1.1"
SNOWFLAKE_VERSION_BOUND = "<=1.4.4"
PYARROW_VERSION_BOUND = "<=11.0.0"
AWS_WRANGLER_VERSION_BOUND = "<=2.19.0"
Expand Down Expand Up @@ -475,6 +476,7 @@ def install_postgres():

def install_bigquery():
execute_command([sys.executable, "-m", "pip", "install", "google-cloud-bigquery%s" % BIGQUERY_VERSION_BOUND])
execute_command([sys.executable, "-m", "pip", "install", "db-dtypes%s" % DB_DTYPES_VERSION_BOUND])


def install_snowflake():
Expand Down