Skip to main content
Gathering Interest

Spark SQL user defined functions?

  • October 22, 2024
  • 3 replies
  • 143 views

Marwen TALEB
MVP

Hello, 

 

Is there a way that users can define their user defined function in CDF so they can be used in transformations? 

We duplicate the same logic in different transformation and we would like to centralize it in one function. (Similar to what you are doing with `is_new` or `cdf_assetSubtree` function internally)

 

Thanks,

MT

3 replies

Mithila Jayalath
Seasoned Practitioner
Forum|alt.badge.img+8

@Marwen TALEB I checked with the enginnering team regarding your question. Currently it is not possible. But there might be a workaround but it’s not recommended.

You could try running cdp-spark-datasource on your own Spark/Databricks cluster and possibly extend it. However, be aware that it's not well-documented, may not be compatible with the latest library versions, and lacks feature parity with the Transformation service (such as schedules and other functionalities it provides beyond just connecting CDF as a Spark datasource).

If  you would like to have this feature in the future, I can convert this into a product idea. Please let me know on how to proceed.


Marwen TALEB
MVP
  • Author
  • MVP
  • October 22, 2024

Hi @Mithila Jayalath , please let’s convert it into a product idea. Thanks


Mithila Jayalath
Seasoned Practitioner
Forum|alt.badge.img+8
  • Seasoned Practitioner
  • January 20, 2025
NewGathering Interest