Class AvroToSQL

java.lang.Object
com.linkedin.venice.sql.AvroToSQL

public class AvroToSQL extends Object
Utility intended to convert Avro -> SQL, including DDL and DML statements. Initially, this implementation may have a DuckDB slant, though in the long-run it should ideally be vendor-neutral.
  • Method Details

    • createTableStatement

      @Nonnull public static String createTableStatement(@Nonnull String tableName, @Nonnull org.apache.avro.Schema avroSchema, @Nonnull Set<String> primaryKeyColumns, @Nonnull AvroToSQL.UnsupportedTypeHandling unsupportedTypeHandling)
    • upsertStatement

      @Nonnull public static String upsertStatement(@Nonnull String tableName, @Nonnull org.apache.avro.Schema recordSchema)
    • upsertProcessor

      @Nonnull public static BiConsumer<org.apache.avro.generic.GenericRecord,PreparedStatement> upsertProcessor(@Nonnull org.apache.avro.Schema recordSchema)