Object

com.github.mjakubowski84.parquet4s

ParquetStreams

Related Doc: package parquet4s

Permalink

object ParquetStreams

Holds factory of Akka Streams sources and sinks that allow reading from and writing to Parquet files.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ParquetStreams
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. def fromParquet[T](path: String, options: Options = ParquetReader.Options(), filter: Filter = Filter.noopFilter)(implicit arg0: ParquetRecordDecoder[T]): Source[T, NotUsed]

    Permalink

    Creates a akka.stream.scaladsl.Source that reads Parquet data from the specified path.

    Creates a akka.stream.scaladsl.Source that reads Parquet data from the specified path. If there are multiple files at path then the order in which files are loaded is determined by underlying filesystem.
    Path can refer to local file, HDFS, AWS S3, Google Storage, Azure, etc. Please refer to Hadoop client documentation or your data provider in order to know how to configure the connection.
    Can read also partitioned directories. Filter applies also to partition values. Partition values are set as fields in read entities at path defined by partition name. Path can be a simple column name or a dot-separated path to nested field. Missing intermediate fields are automatically created for each read record.

    Take note! that due to an issue with implicit resolution in Scala 2.11 you may need to define all parameters of ParquetStreams.fromParquet even if some have default values. It specifically refers to a case when you would like to omit options but define filter. Such situation doesn't appear in Scala 2.12 and 2.13.

    T

    type of data that represent the schema of the Parquet data, e.g.:

    case class MyData(id: Long, name: String, created: java.sql.Timestamp)
    path

    URI to Parquet files, e.g.:

    "file:///data/users"
    options

    configuration of how Parquet files should be read

    filter

    optional before-read filter; no filtering is applied by default; check Filter for more details

    returns

    The source of Parquet data

  10. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  11. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  12. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  13. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  14. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  15. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  16. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  17. def toParquetSingleFile[T](path: String, options: Options = ParquetWriter.Options())(implicit arg0: ParquetRecordEncoder[T], arg1: ParquetSchemaResolver[T]): Sink[T, Future[Done]]

    Permalink

    Creates a akka.stream.scaladsl.Sink that writes Parquet data to single file at the specified path (including file name).

    Creates a akka.stream.scaladsl.Sink that writes Parquet data to single file at the specified path (including file name).
    Path can refer to local file, HDFS, AWS S3, Google Storage, Azure, etc. Please refer to Hadoop client documentation or your data provider in order to know how to configure the connection.

    T

    type of data that represent the schema of the Parquet data, e.g.:

    case class MyData(id: Long, name: String, created: java.sql.Timestamp)
    path

    URI to Parquet files, e.g.:

    "file:///data/users/users-2019-01-01.parquet"
    options

    set of options that define how Parquet files will be created

    returns

    The sink that writes Parquet file

  18. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  19. def viaParquet[T](path: String): Builder[T, T]

    Permalink

    Builds a flow that:

    Builds a flow that:

    • Is designed to write Parquet files indefinitely
    • Is able to (optionally) partition data by a list of provided fields
    • Flushes and rotates files after given number of rows is written or given time period elapses
    • Outputs incoming message after it is written but can write an effect of provided message transformation.
    T

    type of message that flow is meant to accept

    path

    URI to Parquet files, e.g.:

    "file:///data/users"
    returns

    Builder of ParquetPartitioningFlow

  20. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  21. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  22. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def toParquetIndefinite[In, ToWrite, Mat](path: String, maxChunkSize: Int, chunkWriteTimeWindow: FiniteDuration, buildChunkPath: ChunkPathBuilder[In] = ChunkPathBuilder.default, preWriteTransformation: (In) ⇒ ToWrite = identity[In], postWriteSink: Sink[Seq[In], Mat] = Sink.ignore, options: Options = ParquetWriter.Options())(implicit arg0: ParquetWriterFactory[ToWrite]): Sink[In, Mat]

    Permalink

    Creates a akka.stream.scaladsl.Sink that writes Parquet data to files at the specified path.

    Creates a akka.stream.scaladsl.Sink that writes Parquet data to files at the specified path. Sink splits files when maxChunkSize is reached or time equal to chunkWriteTimeWindow elapses. Files are named and written to path according to buildChunkPath. By default path looks like

    PATH/part-RANDOM_UUID.parquet
    
    . Objects coming into sink can be optionally transformed using preWriteTransformation and later handled by means of postWriteSink after transformed object is saved to file.


    Path can refer to local file, HDFS, AWS S3, Google Storage, Azure, etc. Please refer to Hadoop client documentation or your data provider in order to know how to configure the connection.

    PATH/part-RANDOM_UUID.parquet Objects coming into sink can be optionally transformed using preWriteTransformation and later handled by means of postWriteSink after transformed object is saved to file.
    Path can refer to local file, HDFS, AWS S3, Google Storage, Azure, etc. Please refer to Hadoop client documentation or your data provider in order to know how to configure the connection.

    In

    type of incoming objects

    ToWrite

    type of data that represent the schema of the Parquet data, e.g.:

    case class MyData(id: Long, name: String, created: java.sql.Timestamp)
    Mat

    type of sink's materalized value

    path

    URI to Parquet files, e.g.:

    "file:///data/users"
    maxChunkSize

    maximum number of records that can be saved to single parquet file

    chunkWriteTimeWindow

    maximum time that sink will wait before saving (non-empty) file

    buildChunkPath

    factory function to define custom path for each saved file

    preWriteTransformation

    function that transforms incoming object into data that are written to the file

    postWriteSink

    allows to to define action to be taken after each incoming object is successfully written to the file

    options

    set of options that define how Parquet files will be created

    returns

    The sink that writes Parquet files

    Annotations
    @deprecated
    Deprecated

    (Since version 1.3.0) Use viaParquet instead

  2. def toParquetParallelUnordered[T](path: String, parallelism: Int, options: Options = ParquetWriter.Options())(implicit arg0: ParquetRecordEncoder[T], arg1: ParquetSchemaResolver[T]): Sink[T, Future[Done]]

    Permalink

    Creates a akka.stream.scaladsl.Sink that writes Parquet data to files at the specified path.

    Creates a akka.stream.scaladsl.Sink that writes Parquet data to files at the specified path. Sink splits files into number of pieces equal to parallelism. Files are written in parallel. Data is written in unordered way.


    Path can refer to local file, HDFS, AWS S3, Google Storage, Azure, etc. Please refer to Hadoop client documentation or your data provider in order to know how to configure the connection.

    T

    type of data that represent the schema of the Parquet data, e.g.:

    case class MyData(id: Long, name: String, created: java.sql.Timestamp)
    path

    URI to Parquet files, e.g.:

    "file:///data/users"
    parallelism

    defines how many files are created and how many parallel threads are responsible for it

    options

    set of options that define how Parquet files will be created

    returns

    The sink that writes Parquet files

    Annotations
    @deprecated
    Deprecated

    (Since version 1.4.0) In the future only viaParquet and toParquetSingleFile may be only supported writers

  3. def toParquetSequentialWithFileSplit[T](path: String, maxRecordsPerFile: Long, options: Options = ParquetWriter.Options())(implicit arg0: ParquetRecordEncoder[T], arg1: ParquetSchemaResolver[T]): Sink[T, Future[Done]]

    Permalink

    Creates a akka.stream.scaladsl.Sink that writes Parquet data to files at the specified path.

    Creates a akka.stream.scaladsl.Sink that writes Parquet data to files at the specified path. Sink splits files sequentially into pieces. Each file contains maximal number of records according to maxRecordsPerFile. It is recommended to define maxRecordsPerFile as a multiple of com.github.mjakubowski84.parquet4s.ParquetWriter.Options.rowGroupSize.


    Path can refer to local file, HDFS, AWS S3, Google Storage, Azure, etc. Please refer to Hadoop client documentation or your data provider in order to know how to configure the connection.

    T

    type of data that represent the schema of the Parquet data, e.g.:

    case class MyData(id: Long, name: String, created: java.sql.Timestamp)
    path

    URI to Parquet files, e.g.:

    "file:///data/users"
    maxRecordsPerFile

    the maximum size of file

    options

    set of options that define how Parquet files will be created

    returns

    The sink that writes Parquet files

    Annotations
    @deprecated
    Deprecated

    (Since version 1.4.0) In the future only viaParquet and toParquetSingleFile may be only supported writers

Inherited from AnyRef

Inherited from Any

Ungrouped