Interface DatasetFactory

All Superinterfaces:
AutoCloseable
All Known Implementing Classes:
FileSystemDatasetFactory, NativeDatasetFactory

public interface DatasetFactory extends AutoCloseable
DatasetFactory provides a way to inspect a Dataset potential schema before materializing it. Thus, the user can peek the schema for data sources and decide on a unified schema.
  • Method Summary

    Modifier and Type
    Method
    Description
    Create a Dataset with auto-inferred schema.
    finish(Schema schema)
    Create a Dataset with predefined schema.
    Get unified schema for the resulting Dataset.

    Methods inherited from interface java.lang.AutoCloseable

    close
  • Method Details

    • inspect

      Schema inspect()
      Get unified schema for the resulting Dataset.
      Returns:
      the schema object inspected
    • finish

      Dataset finish()
      Create a Dataset with auto-inferred schema. Which means, the schema of the resulting Dataset will be the same with calling inspect() manually.
      Returns:
      the Dataset instance
    • finish

      Dataset finish(Schema schema)
      Create a Dataset with predefined schema. Schema inference will not be performed.
      Parameters:
      schema - a predefined schema
      Returns:
      the Dataset instance