Data sinks

After the data transformations are done, we need to save the results somewhere. The following are some options that Flink DataSet API provides to save the results:

  • writeAsText(): This writes records one line at a time as strings.
  • writeAsCsV(): This writes tuples as comma-separated value files. Row and field delimiters can also be configured.
  • print()/printErr(): This writes records to the standard output. You can also choose to write to a standard error.
  • write(): This supports writing data in a custom FileOutputFormat.
  • output(): This is used for datasets which are not file-based. This can be used where we want to write data to some database.
..................Content has been hidden....................

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