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

    • getTableDefinition

      @Nonnull public static TableDefinition getTableDefinition(@Nonnull String tableName, @Nonnull org.apache.avro.Schema keySchema, @Nonnull org.apache.avro.Schema valueSchema, @Nonnull Set<String> columnsToProject, @Nonnull AvroToSQL.UnsupportedTypeHandling unsupportedTypeHandling, boolean primaryKey)
    • upsertStatement

      @Nonnull public static String upsertStatement(@Nonnull String tableName, @Nonnull org.apache.avro.Schema keySchema, @Nonnull org.apache.avro.Schema valueSchema, @Nonnull Set<String> columnsToProject)
    • upsertProcessor

      @Nonnull public static PreparedStatementProcessor upsertProcessor(@Nonnull org.apache.avro.Schema keySchema, @Nonnull org.apache.avro.Schema valueSchema, @Nonnull Set<String> columnsToProject)
    • deleteStatement

      @Nonnull public static String deleteStatement(@Nonnull String tableName, @Nonnull org.apache.avro.Schema keySchema)
    • deleteProcessor

      @Nonnull public static PreparedStatementProcessor deleteProcessor(@Nonnull org.apache.avro.Schema keySchema)