Clarke Bishop
Clarke Bishop

Reputation: 11

Snowflake: copy into SQL with UDF

Is it possible to call a Javascript UDF in Snowflake while ingesting data via copy into.

When I try it, I get an error saying:

SQL Compilation error: Function 'JAVASCRIPT_V' not supported within a COPY

Still, I'm surprised this does not work as my Javascript UDF is only parsing and splitting one data field.

Upvotes: 0

Views: 1243

Answers (1)

Mike Walton
Mike Walton

Reputation: 7369

No, you can't, but if your UDF is as simple as suggested, and uses the following list of accepted functions, then you can do it with a select in your COPY INTO statement:

https://docs.snowflake.net/manuals/user-guide/querying-stage.html#supported-functions

Upvotes: 2

Related Questions