0

I have a Stream Analytics job streaming data from an EventHub. The job makes use of multiple Javascript functions to perform some calculations. I would like to pass in some configuration (preferrably JSON from Blob Storage) to those functions. Is there any way to do this?

I could read the configuration from Blob Storage as reference data input but I don't want to join the config (JSON) with thousands of input rows from the event hub as that becomes extremely inefficient. I just want to fecth a single config object and pass it into the functions.

Any ideas?

SomeData AS (  
    SELECT
        Data, 
        UDF.PerformSomeCalculations(Data.Cars, Data.Trains, ConfigFromBlob) AS ProcessedData,
    FROM DataFromPreviousStep
)
Ezombort
  • 1,892
  • 3
  • 16
  • 20

1 Answers1

0

UDF can only access data from inputs (streaming or reference) via the data plane. You will need to use joins if you want to go this route.

From a UDF, you won't be able to call external resources. So there really is no other way to pass configuration data other than re-starting the job with a new UDF definition.

Dharman
  • 30,962
  • 25
  • 85
  • 135
Florian Eiden
  • 832
  • 5
  • 9