acoustic-carpenter-78188
06/10/2023, 8:53 PMAsyncAgentExecutorMixin, and any agent task inherited from it can run locally.
import pandas as pd
from flytekit import kwtypes, StructuredDataset, workflow, task
from flytekitplugins.bigquery import BigQueryTask, BigQueryConfig
bigquery_doge_coin = BigQueryTask(
name=f"bigquery.doge_coin",
inputs=kwtypes(version=int),
query_template="SELECT * FROM `bigquery-public-data.crypto_dogecoin.transactions` WHERE version = @version LIMIT 10;",
output_structured_dataset_type=StructuredDataset,
task_config=BigQueryConfig(ProjectID="flyte-test-340607")
)
@task
def t1(sd: StructuredDataset):
print(sd.open(pd.DataFrame).all())
@workflow
def wf():
sd = bigquery_doge_coin(version=1)
bigquery_doge_coin(version=1)
t1(sd=sd)
if __name__ == '__main__':
wf()
Type
☐ Bug Fix
☑︎ Feature
☐ Plugin
Are all requirements met?
☑︎ Code completed
☑︎ Smoke tested
☐ Unit tests added
☐ Code documentation added
☐ Any pending items have an associated Issue
Complete description
^^^
Tracking Issue
NA
Follow-up issue
NA
flyteorg/flytekit
✅ All checks have passed
30/30 successful checksacoustic-carpenter-78188
06/14/2023, 1:00 AM