Search
 
SCRIPT & CODE EXAMPLE
 

SCALA

foreach batch spark scala

streamingDF.writeStream.foreachBatch { (batchDF: DataFrame, batchId: Long) =>
  batchDF.persist()
  batchDF.write.format(...).save(...)  // location 1
  batchDF.write.format(...).save(...)  // location 2
  batchDF.unpersist()
}
Comment

PREVIOUS NEXT
Code Example
Scala :: How to make immutable variable in scala 
Scala :: scala option 
Scala :: scala predicate 
Scala :: scala yield how to share one loop 
Scala :: scala list all permutations 
Scala :: scala get set of chars from string 
Actionscript :: read pdf web on android 
Actionscript :: mount_osxfuse : Input/output error 
Excel :: google sheets select item from split 
Excel :: excel column number 
Excel :: select full column in excel 
Perl :: perl read file 
Perl :: perl mechanize infinite scroll 
Pascal :: pascal pause until key is pressed 
Pascal :: pascal 
Powershell :: powershell replace character in string 
Gdscript :: gdscript while loop 
Abap :: abap if statement 
Assembly :: assembly fibonacci 
Assembly :: dataframe.shape return what? 
Assembly :: enter 64 bit mode 
Javascript :: jquery vslidation remove spaces from input 
Javascript :: jquery 2 decimal places 
Javascript :: how to insatll react-router-dom 
Javascript :: jquery delay 1 second 
Javascript :: chrome design mode console 
Javascript :: f.select on change jquery 
Javascript :: execute after one second javascript 
Javascript :: electron hide menu bar 
Javascript :: javacsript update text in span 
ADD CONTENT
Topic
Content
Source link
Name
2+7 =