Skip to content

Commit 0bbf094

Browse files
committed
Use google cloud bigquery package
1 parent 8117d0b commit 0bbf094

File tree

10 files changed

+1125
-105
lines changed

10 files changed

+1125
-105
lines changed

infra/docker/docker-compose.test.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,16 @@ services:
198198
tmpfs:
199199
- /var/lib/firebird/data
200200

201+
bigquery:
202+
image: ghcr.io/goccy/bigquery-emulator:latest
203+
container_name: sqlit-test-bigquery
204+
command:
205+
- "--project=${BIGQUERY_PROJECT:-test-project}"
206+
- "--dataset=${BIGQUERY_DATASET:-test_sqlit}"
207+
ports:
208+
- "9050:9050"
209+
- "9060:9060"
210+
201211
# SSH server for testing SSH tunnel connections
202212
# Connects to postgres container on docker network
203213
ssh:

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ all = [
4747
"teradatasql>=20.0.0",
4848
"trino>=0.329.0",
4949
"presto-python-client>=0.8.4",
50-
"sqlalchemy-bigquery",
50+
"google-cloud-bigquery",
5151
"duckdb>=1.1.0", # min avoids known CVEs
5252
"clickhouse-connect>=0.7.0",
5353
"requests>=2.32.4", # min avoids known CVEs
@@ -71,7 +71,7 @@ hana = ["hdbcli>=2.20.0"]
7171
teradata = ["teradatasql>=20.0.0"]
7272
trino = ["trino>=0.329.0"]
7373
presto = ["presto-python-client>=0.8.4"]
74-
bigquery = ["sqlalchemy-bigquery"]
74+
bigquery = ["google-cloud-bigquery"]
7575
redshift = ["redshift-connector"]
7676
duckdb = ["duckdb>=1.1.0"] # min avoids known CVEs
7777
clickhouse = ["clickhouse-connect>=0.7.0"]

sqlit/domains/connections/domain/passwords.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,17 @@
33
from __future__ import annotations
44

55
from sqlit.domains.connections.domain.config import ConnectionConfig
6-
from sqlit.domains.connections.providers.metadata import is_file_based
6+
from sqlit.domains.connections.providers.metadata import is_file_based, requires_auth
77

88

99
def needs_db_password(config: ConnectionConfig) -> bool:
1010
"""Return True if the database password should be prompted."""
1111
if is_file_based(config.db_type):
1212
return False
1313

14+
if not requires_auth(config.db_type):
15+
return False
16+
1417
auth_type = config.get_option("auth_type")
1518
if auth_type in ("ad_default", "ad_integrated", "windows"):
1619
return False

0 commit comments

Comments
 (0)