Class SchemaHelper
KafkaTableWriter.Options instance.- 
Constructor SummaryConstructorsConstructorDescriptionInstantiate a SchemaHelper instance.SchemaHelper(KafkaTableWriter.Options opts, @NotNull String partitionColumn) Instantiate a SchemaHelper instance.SchemaHelper(KafkaTableWriter.Options opts, @NotNull String partitionColumn, int storageType) Instantiate a SchemaHelper instance.
- 
Method SummaryModifier and TypeMethodDescriptionbooleanValidates the schema derived fromgetXmlSchema().Constructs a Core TableDefinition instance.io.deephaven.shadow.enterprise.com.illumon.iris.db.tables.TableDefinitionConstructs a DHE TableDefinition instance.io.deephaven.shadow.enterprise.com.illumon.iris.db.schema.SchemaConstructs a DHE Schema instance.booleanValidates the schema derived fromgetXmlSchema().voidValidates the schema derived fromgetXmlSchema().withGroupingCols(@NotNull String... groupingCols) Define column(s) as GroupingColumns.withGroupingCols(@NotNull Collection<String> groupingCols) Define column(s) as GroupingColumns.withMergeKeyFormula(@Nullable String mergeKeyFormula) Define KeyFormula used for merge process.withSymbolTableNone(@NotNull String... symbolTableNone) Define column(s) which should be written without a SymbolTable.withSymbolTableNone(@NotNull Collection<String> symbolTableNone) Define column(s) which should be written without a SymbolTable.
- 
Constructor Details- 
SchemaHelperpublic SchemaHelper(@NotNull KafkaTableWriter.Options opts, @NotNull @NotNull String partitionColumn, int storageType) Instantiate a SchemaHelper instance.- Parameters:
- opts- the- KafkaTableWriter.Optionsto use
- partitionColumn- the partitioningColumn for the schema
- storageType- the StorageType for the schema
 
- 
SchemaHelperpublic SchemaHelper(@NotNull KafkaTableWriter.Options opts, @NotNull @NotNull String partitionColumn) Instantiate a SchemaHelper instance.Will use a default storageType of STORAGETYPE_NESTEDPARTITIONEDONDISK - Parameters:
- opts- the- KafkaTableWriter.Optionsto use
- partitionColumn- the partitioningColumn for the schema
 
- 
SchemaHelperInstantiate a SchemaHelper instance.Will use a default storageType of STORAGETYPE_NESTEDPARTITIONEDONDISK and a default partitionColumn of "Date" - Parameters:
- opts- the- KafkaTableWriter.Optionsto use
 
 
- 
- 
Method Details- 
withGroupingColsDefine column(s) as GroupingColumns.By default, columns are not defined as grouping columns - Parameters:
- groupingCols- column(s) which should be defined as GroupingColumns
- Returns:
- this SchemaHelper instance
 
- 
withGroupingColsDefine column(s) as GroupingColumns.By default, columns are not defined as grouping columns - Parameters:
- groupingCols- column(s) which should be defined as GroupingColumns
- Returns:
- this SchemaHelper instance
 
- 
withSymbolTableNone@ScriptApi public SchemaHelper withSymbolTableNone(@NotNull @NotNull Collection<String> symbolTableNone) Define column(s) which should be written without a SymbolTable.By default, String columns are written with a SymbolTable - Parameters:
- symbolTableNone- column(s) which should be written without a SymbolTable
- Returns:
- this SchemaHelper instance
 
- 
withSymbolTableNoneDefine column(s) which should be written without a SymbolTable.By default, String columns are written with a SymbolTable - Parameters:
- symbolTableNone- column(s) which should be written without a SymbolTable
- Returns:
- this SchemaHelper instance
 
- 
withMergeKeyFormulaDefine KeyFormula used for merge process.Defaults to "${autobalance_single}". To disable merge, set to null. - Parameters:
- mergeKeyFormula- new merge keyFormula for schema
- Returns:
- this SchemaHelper instance
 
- 
getCoreDefinitionConstructs a Core TableDefinition instance.Uses the KeySpec, ValueSpec, and KafkaProperties values of the pre-defined KafkaTableWriter.Options- Returns:
- a Core TableDefinition instance
 
- 
getTableDefinitionpublic io.deephaven.shadow.enterprise.com.illumon.iris.db.tables.TableDefinition getTableDefinition()Constructs a DHE TableDefinition instance.Converted from the Core TableDefinition returned by getCoreDefinition()- Returns:
- a DHE TableDefinition instance
 
- 
getXmlSchemapublic io.deephaven.shadow.enterprise.com.illumon.iris.db.schema.Schema getXmlSchema()Constructs a DHE Schema instance.Derived from the DHE TableDefinition returned by getTableDefinition()- Returns:
- a DHE Schema instance
 
- 
validateSchema@ScriptApi public void validateSchema() throws io.deephaven.shadow.enterprise.com.illumon.iris.db.schema.SchemaValidationExceptionValidates the schema derived fromgetXmlSchema().Validates the schema against the latest schema known by the SchemaService. If the schema does not exist within the SchemaService or if the schemas do not match, an appropriate exception is thrown - Throws:
- io.deephaven.shadow.enterprise.com.illumon.iris.db.schema.SchemaValidationException- an exception describing the cause of the validation failure
 
- 
addOrValidateSchema@ScriptApi public boolean addOrValidateSchema() throws io.deephaven.shadow.enterprise.com.illumon.iris.db.schema.SchemaValidationExceptionValidates the schema derived fromgetXmlSchema().Validates the schema against the latest schema known by the SchemaService. If the schema does not exist within the SchemaService, the schema will be added. If the schema does not match the latest schema, then an appropriate exception is thrown - Returns:
- true if the schema is added by this call, else false if the schema matches the current schema
- Throws:
- io.deephaven.shadow.enterprise.com.illumon.iris.db.schema.SchemaValidationException- an exception describing the cause of the validation failure
 
- 
validateOrUpdateSchemaValidates the schema derived fromgetXmlSchema().Validates the schema against the latest schema known by the SchemaService. If the schema does not exist within the SchemaService, the schema will be added. If the schema does not match the current schema, then an attempt is made to update the schema within the SchemaService. The only schema-changes permitted are adding or removing columns, changes to SymbolTable, Grouping, and merge KeyFormula. Any other schema change will throw an exception Existing partitions cannot be appended after a schema change takes effect. A schema change should only be done prior to adding data for a given partition (e.g. "Date") - Returns:
- true if the schema is added or updated by this call, else false if the schema matches the current schema
 
 
-