Share via

Javascript UDFs in Synapse Dedicated/Serverless SQL Pools

Jayamadhuri Neelam 1 Reputation point
2022-04-22T09:34:00.243+00:00

can we create javascript UDFs in Synapse Dedicated/Serverless SQL Pools?

Azure Synapse Analytics
Azure Synapse Analytics

An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.


1 answer

Sort by: Most helpful
  1. Ronen Ariely 15,221 Reputation points
    2022-04-22T11:49:03.867+00:00

    I am not sure what do you mean or what is your idea by "create javascript UDFs in Synapse"

    Do you mean create UDF with javascrip or execute javascrip in UDF?

    (1) You can create UDF using javascript but this will not be a " javascript UDF" but a "Synapse UDF"

    The language you sue to create the object is not relevant to the object itself.

    You can create tables in javascript (using queries send in javascript) or you can create the table using C# or using vb.Net and so on... the table will be a database object and not a "C# table" or "javascrip table"

    (2) If you mean to create a function that directly execute javascript code then it is not supported even in on-premises SQL Server. SQL Server 2019 supports Java, C#, Python, and R runtimes using CREATE EXTERNAL LANGUAGE, but this feature is not supported in Synapse

    In this case the answer to your question is: no.

    (3) With that said, the Java SDK can connect to a SPark pool in Synapse so you can bypass the limitation probably and use SPark

    Check this document: https://learn.microsoft.com/en-us/java/api/overview/azure/analytics-synapse-spark-readme?view=azure-java-preview&WT.mc_id=DP-MVP-5001699

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.