#196 Bigquery task example
Pull request opened by
pingsutw
Currently, just run this v2 BigQuery task in the v1 connector
from flyteplugins.connectors.bigquery.task import BigQueryConfig, BigQueryTask
import flyte
from
flyte.io import DataFrame
bigquery_task = BigQueryTask(
name="bigquery",
inputs={"version": int},
output_dataframe_type=DataFrame,
plugin_config=BigQueryConfig(ProjectID="dogfood-gcp-dataplane"),
query_template="SELECT * from dataset.flyte_table3;",
)
flyte.TaskEnvironment.from_task("bigquery_env", bigquery_task)
if
name == "__main__":
flyte.init_from_config()
run = flyte.with_runcontext(mode="remote").run(bigquery_task, 123)
print(run.url)
flyteorg/flyte-sdk