Hi, we’re currently using Flyte version v1.15.3 in...
# flyte-v1-support
m
Hi, we’re currently using Flyte version v1.15.3 in our platform. I was experimenting with the Snowflake plugin using the agent service and noticed a difference in how the result is returned compared to the BigQuery plugin. In the Snowflake agent, the result is constructed like this:
Copy code
res = {
    "results": TypeEngine.to_literal(
        ctx,
        StructuredDataset(uri=uri),
        StructuredDataset,
        LiteralType(structured_dataset_type=StructuredDatasetType(format="")),
    )
}
Whereas in the BigQuery agent, it is returned more directly:
Copy code
res = {"results": StructuredDataset(uri=output_location)}
With the Snowflake approach (using
<http://TypeEngine.to|TypeEngine.to>_literal
), I’m not getting the expected output. Instead, the result from a SELECT query is coming back as type
PythonPickle
. However, when I created a custom image and modified the implementation to follow the BigQuery approach, it worked as expected. Could you help me understand what I might be missing here? Is there additional configuration or a step required when using the Snowflake agent approach? References: https://github.com/flyteorg/flytekit/blob/e1518f6bba37eead55aeb0ec98e4c49904023c57/plugins/flytekit-bigquery/flytekitplugins/bigquery/agent.py#L88-L89 https://github.com/flyteorg/flytekit/blob/e1518f6bba37eead55aeb0ec98e4c49904023c57/plugins/flytekit-snowflake/flytekitplugins/snowflake/agent.py#L116 Example I tried: https://docs-legacy.flyte.org/en/v1.14.1/flytesnacks/examples/snowflake_agent/snowflake_agent_example_usage.html (edited)
t
we don’t have to manually convert it to a literal. it can just follow the bigquery approach as flyte should handle that automatically. that said,
to_literal
should work as well. there might be an issue with the type being returned (i.e. no match for some reason). you can continue using the bigquery approach for the snowflake integration. you’re also welcome to upstream it if you’d like, but with production v2 coming in, we’d eventually want you to use that 🙂
👍 1