JDBCParquetWriter 1.3.0-SNAPSHOT API

Base Package: com.manticore.jdbc

parquetwriter

JDBCParquetWriter.Dialect

[DUCKDB, CLICKHOUSE]

The enum Dialect.

JDBCParquetWriter

extends: Object

The JDBC parquet writer class.
JDBCParquetWriter ()
writeFileForQueryResult (folder, qryStr, targetTableName, conn, dialect, compressionCodecName) → String
Writes a query into a parquet file and returns an INSERT statement string for importing this file into a DuckDB table
File folder | folder the folder for writing the parquet file to
String qryStr | qryStr the query to execute
String targetTableName | targetTableName the target table name
Connection conn | conn the JDBC connection for executing the query
Dialect dialect | dialect the dialect for the INSERT statement
CompressionCodecName compressionCodecName | compressionCodecName the compression codec name
returns String | the INSERT statement text
writeFilesForQueryTables (folder, qryStr, conn, dialect, compressionCodecName) → String
Write all tables used in a query into parquet files and returns an INSERT statement string for importing all those file into DuckDB tables
File folder | folder the folder for writing the parquet file to
String qryStr | qryStr the query definition with the tables
Connection conn | conn the JDBC connection for executing the query
Dialect dialect | dialect the dialect for the INSERT statement
CompressionCodecName compressionCodecName | compressionCodecName the compression codec name
returns String | the INSERT statement text
write (file, tableName, conn) → long
Writes a source table into a ParquetFile using SNAPPY for compression
File file | file the destination File
String tableName | tableName the source table name
Connection conn | conn the source JDBC connection for accessing the source table
returns long | the tally of written rows
write (file, tableName, conn, compressionCodecName) → long
Writes a source table into a ParquetFile
File file | file the destination File
String tableName | tableName the source table name
Connection conn | conn the source JDBC connection for accessing the source table
CompressionCodecName compressionCodecName | compressionCodecName the compression codec name
returns long | the tally of written rows
write (f, tableName, rs) → long
Writes a ResultSet into a ParquetFile using SNAPPY for compression
File f | f the destination File
String tableName | tableName the destination table name
ResultSet rs | rs the ResultSet of data
returns long | the tally of written rows
write (f, tableName, rs, compressionCodecName) → long
Writes a ResultSet into a ParquetFile.
File f | f the destination File
String tableName | tableName the destination table name
ResultSet rs | rs the ResultSet of data
CompressionCodecName compressionCodecName | compressionCodecName the compression codec name
returns long | the tally of written rows
getParquetSchemaFromResultSet (tableName, metadata) → MessageType
Derive the parquet schema from a JDBC result set.
String tableName | tableName the table name
ResultSetMetaData metadata | metadata the JDBC metadata
returns MessageType | the parquet schema from result set

TableNamesFinder

extends: <any>

TableNamesFinder (sqlStr)
String sqlStr
getTargetTableName () → String
returns String
getSourceTableNames () → Set
returns Set
@Override
visit (insert, context) → Void
Insert insert
S context
returns Void
@Override
visit (merge, context) → Void
Merge merge
S context
returns Void
@Override
visit (update, context) → Void
Update update
S context
returns Void
@Override
visit (delete, context) → Void
Delete delete
S context
returns Void