Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
add docstrings and typing
Signed-off-by: Cody Lin <codyl@twitter.com>
  • Loading branch information
Cody Lin committed Jun 24, 2021
commit e87dad093fefff98eb33110659d942531d2b2676
7 changes: 5 additions & 2 deletions sdk/python/feast/infra/offline_stores/bigquery.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,12 +224,15 @@ def to_df(self):
df = self.client.query(self.query).to_dataframe(create_bqstorage_client=True)
return df

def to_sql(self):
def to_sql(self) -> str:
"""
Returns the SQL query that can be modified and run by the user to create the BQ table.
Comment thread
codyjlin marked this conversation as resolved.
Outdated
"""
return self.query

def to_bigquery(self, job_config: bigquery.QueryJobConfig = None) -> Optional[str]:
"""
Uploads the results of the BigQueryRetrievalJob directly to BigQuery
Uploads the results of the BigQueryRetrievalJob directly to BigQuery.
Comment thread
codyjlin marked this conversation as resolved.
Outdated

Args:
job_config: A bigquery.QueryJobConfig to specify options like destination table, dry run, etc.
Comment thread
codyjlin marked this conversation as resolved.
Outdated
Expand Down