Structured streaming - programming model

As shown in the previous code example, an output mode is required while writing resulted dataset to the sink. The following are the various output modes available with structured streaming:

  • append: Only new items appended to the resulted dataset will be written to the sink.
  • update: Only those items that are updated in the resulted dataset will be written to the sink.
  • complete: All items in the resulted dataset will be written to the sink. Handling duplicates in the case is the responsibility of the user.

If a user is performing some aggregation during the transformation of the incoming dataset, for example avg in the preceding example, then append mode cannot be used. update or complete modes will be applicable in such scenarios.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.142.212.160