Azure synapse spark import spark sql functions failed

sakuraime 2,341 Reputation points
2022-01-05T13:34:25.323+00:00

How to import org.apache.spark.sql.functions._ in synapse spark pool python notebook ? I got error

162415-image.png

anyone has the idea ?

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.
5,373 questions
{count} votes

1 answer

Sort by: Most helpful
  1. PRADEEPCHEEKATLA 90,641 Reputation points Moderator
    2022-01-06T11:16:12.217+00:00

    Hello @sakuraime ,

    Thanks for the question and using MS Q&A platform.

    You can access the standard functions using the following import statement in your Scala application: import org.apache.spark.sql.functions._

    162816-image.png

    For more details, refer to Spark SQL Built-in Standard Functions.

    For Python, you need to use pyspark.sql.functions to List of built-in functions available for DataFrame.

    For more details, refer to pyspark.sql module.

    Hope this will help. Please let us know if any further queries.

    ------------------------------

    • Please don't forget to click on 130616-image.png or upvote 130671-image.png button whenever the information provided helps you. Original posters help the community find answers faster by identifying the correct answer. Here is how
    • Want a reminder to come back and check responses? Here is how to subscribe to a notification
    • If you are interested in joining the VM program and help shape the future of Q&A: Here is how you can be part of Q&A Volunteer Moderators

Your answer

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