Skip to main content

Configuration properties

Properties for an Avro Loading Topic are defined by name in the dlc.avro.topics namespace, and are picked up as configurations for the DLC.
KeyRequiredTypeDefaultDescription
file-patternStringPath matcher.
schema-pathStringPath to schema.
columnsList<String>Columns will implicitly come from the store which is being published to.The order of columns in the file. If a column name matches a datastore column, its parser will be implied. For columns that do not match a datastore column, a parser must be provided in the channel as a Custom Field. Columns without a matching datastore column or parser are skipped.
channelsSet<Channel>A channel is created using the topic’s name as the name of the target.Channels.
restrict-to-sourcesSet<String> Sources to which the topic is restricted. See source to topic matching.
restrict-from-sourcesSet<String> Sources from which the topic is restricted. See source to topic matching.

YAML example

This configuration does not specify a target for the data.
If the topic is not named the same as the store, the target must be explicitly specified in the channel of the topic.
  • The target is implicitly the Atoti table named “Trades”.
  • The format comes from the schema file specified in the configuration.
dlc:
  avro:
    topics:
      Trades:
        file-pattern: glob:trades*.avro
        schema-path: schemas/schema.avsc

Java configuration

AvroTopicDescription Spring Beans are picked up as configurations for the DLC.
ParameterRequiredTypeDefaultDescription
nameYStringName of the topic.
filePatternStringPath matcher.
schemaPathStringPath to schema.
columnsList<String>Columns will implicitly come from the store which is being published to.The order of columns in the file. If a column name matches a datastore column, its parser will be implied. For columns that do not match a datastore column, a parser must be provided in the channel as a Custom Field. Columns without a matching datastore column or parser are skipped.
channelsSet<ChannelDescription>A channel is created using the topic’s name as the name of the targetChannel Descriptions which belong to the topic.
restrictToSourcesSet<String>Sources to which the topic is restricted. See source to topic matching.
restrictFromSourcesSet<String>Sources from which the topic is restricted. See source to topic matching.

Java example

This configuration does not specify a target for the data.
If the topic is not named the same as the store, the target must be explicitly specified in the channel of the topic.
  • The target is implicitly the Atoti table named “Trades”.
  • The format comes from the schema file specified in the configuration.
@Bean
public AvroTopicDescription tradesTopic() {
    return AvroTopicDescription.builder("Trades", "glob:trades*.avro", "schemas/schema.avsc")
            .build();
}