Execute DMN rules using Databricks Notebook

I need some help getting started with using the DMN library in Databricks. I have installed the latest (1.12.4) feel-engine package on our cluster and read through the DMN Feel documentation online but that is as far as I was able to get without any examples. Here is the scenario I am trying to accomplish:

  1. Create a set of decision tables using Camunda Modeler and save to DMN file
  2. Using a Databricks notebook, create a dataframe from reading in a data file (CSV, Excel, JSON, etc.)
  3. Using the DMN library, open and read the DMN file and execute the decision table rules against the input columns in the dataframe and output the decision results as a column added to this data frame.

Unfortunately it looks like this requires a lot of programming to get this to work but I am hoping I am just missing something and it will be easy.

Any help appreciated!

Hi @kskistad,

I don’t know Databricks. Please explain more what you’re struggling with.

What did you try so far?
Which part from the Camunda stack is not working as expected?

You can read more about the DMN engine and how to use it here: https://docs.camunda.org/manual/7.14/user-guide/dmn-engine/evaluate-decisions/

Best regards,
Philipp

1 Like

Hi Philipp,

Databricks is just a managed Spark platform with some optimization enhancements. It manages the auto-scaling of clusters and installation of libraries. You write your programs using Jupyter-like notebooks and can schedule jobs.

Within these notebooks we are working with spark dataframes and would like to use the Camunda DMN libraries to evaluate rules written using the Camunda Modeler to create the DMN file. The challenge we have is 1) We are not experts at writing python/scala (we are mostly a Microsoft .NET shop) and 2) we are not familiar with the Camunda DMN libraries.

Thanks

Kory

Thank you for the insides. The easiest option for you could be to use the REST API to evaluate the decisions. See here https://docs.camunda.org/manual/7.14/reference/rest/decision-definition/post-evaluate/

It seems that there is also a .Net client: https://github.com/jlucansky/Camunda.Api.Client