Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

85
Views
Extending Snowflake with Javascript UDFs

I'm trying to extend Snowflake's functionality with generic javascript functions - especially for array processing - i.e. map, filter, reduce.

I've written this simple function which works fine

create function map(A array)
returns array
language javascript
as
$$
return A.map(x => x.balance)
$$

This works fine

select map(myarray) from mytable;

Now I want to pass my map requirement (x => x.balance) as a parameter to the function i.e.

create or replace function map(A array, MAP string)
returns array
language javascript
as
$$
return A.map(MAP)
$$

So I can execute

select map(myarray,'x => x.balance') from mytable;

but this doesn't work - how can I achieve this, and even better if I could create a completely generic snowflake function that give me all JS functions e.g.

create function JS (func string)
returns array
language javascript
as
$$
return func
$$

so I could then just run

select js(myarray.map(x => x.balance)) from mytable;

or then any javascript array function

Many thanks everyone for your suggestions :)

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!