INNER CODE UNIT · Python
append_dataset_to_bigquery
GoogleCloudPlatform/vertex-ai-samples · community-content/tf_agents_bandits_movie_recommendation_with_kfp_and_vertex_sdk/mlops_pipeline_tf_agents_bandits_movie_recommendation/src/logger/main.py:199
def append_dataset_to_bigquery(
project_id: str,
dataset_file: str,
bigquery_dataset_id: str,
bigquery_location: str,
bigquery_table_id: str) -> None:
"""Appends training dataset to BigQuery table.
Appends training dataset of `trajectories.Trajectory` in newline delimited
JSON to a BigQuery dataset and table, using a BigQuery client.
Args:
project_id: GCP project ID. This is required because otherwise the
BigQuery client will use the ID of the tenant GCP project created as a
result of KFP, which doesn't have proper access to BigQuery.
dataset_file: Path to a JSON file containing the training dataset.
bigquery_dataset_id: A string of the BigQuery dataset ID in the format of
"project.dataset".