billowy-winter-86593
05/31/2023, 5:24 PM[3/3] currentAttempt done. Last Error: SYSTEM::Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/flytekit/exceptions/scopes.py", line 165, in system_entry_point
return wrapped(*args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/flytekit/core/base_task.py", line 530, in dispatch_execute
raise type(exc)(msg) from exc
Message:
Failed to convert inputs of task 'flytesnacks.convert_bq_table_to_pandas_dataframe':
Protocol not known: bq
SYSTEM ERROR! Contact platform administrators.
billowy-winter-86593
05/31/2023, 5:25 PMDogeCoinDataset = Annotated[
StructuredDataset, kwtypes(hash=str, size=int, block_number=int)
]
bigquery_task_templatized_query = BigQueryTask(
name="sql.bigquery.w_io",
# Define inputs as well as their types that can be used to customize the query.
inputs=kwtypes(version=int),
output_structured_dataset_type=pd.DataFrame,
task_config=BigQueryConfig(ProjectID=""),
query_template="SELECT * FROM `bigquery-public-data.crypto_dogecoin.transactions` WHERE version = @version LIMIT 10;",
)
# %%
# StructuredDataset transformer can convert query result to pandas dataframe here.
# We can also change "pandas.dataframe" to "pyarrow.Table", and convert result to Arrow table.
@task(container_image=python_image)
def convert_bq_table_to_pandas_dataframe(sd: pd.DataFrame):
print(sd)
freezing-boots-56761
billowy-winter-86593
05/31/2023, 5:34 PMflytekit==1.6.2
flytekitplugins-bigquery==1.6.1
freezing-boots-56761
freezing-boots-56761
freezing-boots-56761
import google.cloud.bigquery
to the top of the module?freezing-boots-56761
billowy-winter-86593
05/31/2023, 5:45 PMbillowy-winter-86593
05/31/2023, 7:02 PMpython_image = ImageSpec(name="python",
base_image="python:3.10-slim-buster",
registry="registry",
packages=["flytekitplugins-pandera","flytekitplugins-bigquery" ,"pandas", "numpy", "pretty_html_table", "google-cloud-bigquery-storage", "google-cloud-bigquery"])
elegant-toddler-67101
07/04/2023, 2:21 PM