Package com.illumon.iris.db.v2.parquet
Class ParquetTableWriter
java.lang.Object
com.illumon.iris.db.v2.parquet.ParquetTableWriter
public class ParquetTableWriter extends Object
API for writing DH tables in parquet format
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classParquetTableWriter.DestinationInfoInformation about a writing destination (e.g. -
Field Summary
Fields Modifier and Type Field Description static StringBEGIN_POSstatic StringEND_POSstatic StringGROUPING_KEYstatic StringMETADATA_KEYstatic StringPARQUET_FILE_EXTENSION -
Constructor Summary
Constructors Constructor Description ParquetTableWriter() -
Method Summary
Modifier and Type Method Description static Function<String,String>defaultGroupingFileName(String path)static voidwrite(Table table, TableDefinition definition, ParquetInstructions writeInstructions, String path, Map<String,String> tableMeta, TableInfo.Builder tableInfoBuilder)Writes a table in parquet format under a given pathstatic voidwrite(Table t, TableDefinition definition, ParquetInstructions writeInstructions, String path, Map<String,String> incomingMeta, String... groupingColumns)static voidwrite(Table t, TableDefinition definition, ParquetInstructions writeInstructions, String destPathName, Map<String,String> incomingMeta, Function<String,String> groupingPathFactory, String... groupingColumns)Writes a table in parquet format under a given pathstatic voidwrite(Table t, String path, Map<String,String> incomingMeta, String... groupingColumns)static voidwrite(Table t, String path, Map<String,String> incomingMeta, Function<String,String> groupingPathFactory, String... groupingColumns)Writes a table in parquet format under a given pathstatic voidwrite(ParquetTableWriter.DestinationInfo[] destinationInfos, ParquetInstructions instructions, TableDefinition definition)Writes a table in parquet format under a given path
-
Field Details
-
METADATA_KEY
- See Also:
- Constant Field Values
-
BEGIN_POS
- See Also:
- Constant Field Values
-
END_POS
- See Also:
- Constant Field Values
-
GROUPING_KEY
- See Also:
- Constant Field Values
-
PARQUET_FILE_EXTENSION
- See Also:
- Constant Field Values
-
-
Constructor Details
-
ParquetTableWriter
public ParquetTableWriter()
-
-
Method Details
-
defaultGroupingFileName
-
write
public static void write(@NotNull ParquetTableWriter.DestinationInfo[] destinationInfos, @NotNull ParquetInstructions instructions, @NotNull TableDefinition definition) throws SchemaMappingException, IOExceptionWrites a table in parquet format under a given path- Parameters:
destinationInfos- Destination information coupling input data, output path, and grouping metadata for each desired result tableinstructions- TheParquetInstructionscontaining write directives.definition- The definition to use for the output tables- Throws:
SchemaMappingException- Error creating a parquet table schema for the given table (likely due to unsupported types)IOException- For file writing related errors
-
write
public static void write(Table t, String path, Map<String,String> incomingMeta, Function<String,String> groupingPathFactory, String... groupingColumns) throws SchemaMappingException, IOExceptionWrites a table in parquet format under a given path- Parameters:
t- The table to writepath- The destination pathincomingMeta- A map of metadata values to be stores in the file footergroupingPathFactory-groupingColumns- List of columns the tables are grouped by (the write operation will store the grouping info)- Throws:
SchemaMappingException- Error creating a parquet table schema for the given table (likely due to unsupported types)IOException- For file writing related errors
-
write
public static void write(Table t, String path, Map<String,String> incomingMeta, String... groupingColumns) throws SchemaMappingException, IOException- Throws:
SchemaMappingExceptionIOException
-
write
public static void write(Table t, TableDefinition definition, ParquetInstructions writeInstructions, String destPathName, Map<String,String> incomingMeta, Function<String,String> groupingPathFactory, String... groupingColumns) throws SchemaMappingException, IOExceptionWrites a table in parquet format under a given path- Parameters:
t- The table to writedefinition- Table definitionwriteInstructions- Write instructions for customizations while writingdestPathName- The destination pathincomingMeta- A map of metadata values to be stores in the file footergroupingPathFactory-groupingColumns- List of columns the tables are grouped by (the write operation will store the grouping info)- Throws:
SchemaMappingException- Error creating a parquet table schema for the given table (likely due to unsupported types)IOException- For file writing related errors
-
write
public static void write(Table t, TableDefinition definition, ParquetInstructions writeInstructions, String path, Map<String,String> incomingMeta, String... groupingColumns) throws SchemaMappingException, IOException- Throws:
SchemaMappingExceptionIOException
-
write
public static void write(Table table, TableDefinition definition, ParquetInstructions writeInstructions, String path, Map<String,String> tableMeta, TableInfo.Builder tableInfoBuilder) throws SchemaMappingException, IOExceptionWrites a table in parquet format under a given path- Parameters:
table- The table to writedefinition- The table definitionwriteInstructions- Write instructions for customizations while writingpath- The destination pathtableMeta- A map of metadata values to be stores in the file footertableInfoBuilder- A partially-constructed builder for the metadata object- Throws:
SchemaMappingException- Error creating a parquet table schema for the given table (likely due to unsupported types)IOException- For file writing related errors
-