title: structured streaming writing to multiple streams
body: <p>my Scenario</p>
  
  <ol>
  <li>Gets data from a stream and call a UDF which return a json string. one of the attribute in JSON string is UniqueId, which UDF is generating as guid.newGuid() (C#). 
  
  <ol start="2">
  <li>DataFrame output of UDF is written to multiple streams/sinks based on some fiter.</li>
  </ol></li>
  </ol>
  
  <p>issue: </p>
  
  <ol>
  <li>each sink is getting a new value for the UniqueId which was generated by UDF. How can i maintain the same UniqueId for all sinks. </li>
  <li>If each sink is getting different values for UniqueId, does that mean my UDF is getting called multiple times for each sink?</li>
  <li>If UDF is getting invoked twice, what is the option to get it called once and then just write same data to different sinks</li>
  </ol>
  
  <pre><code>inData = spark.readstream().format("eventhub")
  
  udfdata = indata.select(from_json(myudf("column"), schema)).as("result").select(result.*)
  
  filter1 =  udfdata.filter("column =='filter1'")
  filter 2 = udfdata.filter("column =='filter2'") 
  
  # write filter1 to two differnt sinks
  filter1.writestream().format(delta).start(table1)
  filter1.writestream().format(eventhub).start()
  
  # write filter2 to two differnt sinks
  filter2.writestream().format(delta).start(table2)
  filter2.writestream().format(eventhub).start()
  </code></pre>