Skip to content

Commit

Permalink
[vdsql] bigquery use general ibis.connect() #1860
Browse files Browse the repository at this point in the history
  • Loading branch information
saulpw committed Nov 1, 2023
1 parent 8e25969 commit b864b5e
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions visidata/apps/vdsql/bigquery.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
'''
Specify the billing_project_id as the netloc, and the actual dataset_id as the path:
vdsql bigquery://<billing_project>/<dataset_id>''
'''


from visidata import vd, VisiData, Sheet, AttrColumn
from . import IbisTableSheet, IbisTableIndexSheet, IbisConnectionPool

import ibis
import ibis.expr.operations as ops


@VisiData.api
def openurl_bigquery(vd, p, filetype=None):
vd.configure_ibis()
Expand Down Expand Up @@ -39,8 +45,7 @@ class BigqueryDatabaseIndexSheet(Sheet):
def con(self):
if not self.ibis_con:
import ibis
self.ibis_con = ibis.bigquery.connect()
self.ibis_con.data_project = self.source.name
self.ibis_con = ibis.connect(self.source)
return self.ibis_con

def iterload(self):
Expand Down

0 comments on commit b864b5e

Please sign in to comment.