CSV Topic
Configuration Properties
The configuration properties for a CSV Topic are picked up as configurations for the DLC.
Properties for the CSV Topic are defined by name in the dlc.csv-topics
namespace.
Key | Required | Type | Default | Description |
---|---|---|---|---|
channels | Set<Channel> | A channel is created using the topic’s name as the name of the target. | Channels. | |
file-pattern | String | Relative path matcher. | ||
parser | CsvParserProperties | Default Parser Properties. | CSV Parser Properties | |
restrict-to-sources | Set<String> | Sources to which the topic is restricted. | ||
restrict-from-sources | Set<String> | Sources from which the topic restricted. |
Yaml Example
dlc:
csv-topics:
Trades:
file-pattern: 'trades*.csv'
Vertices:
file-pattern: 'vertex*.csv'
JSON Example
{
"Trades": {
"filePattern": "trades*.csv"
}
}
Java Configuration
CsvTopicDescription
Spring Beans are picked up as configurations for the DLC.
CsvTopicDescription
Parameter | Required | Type | Default | Description |
---|---|---|---|---|
name | Y | String | Name of the topic. | |
channels | Set |
A channel is created using the topic’s name as the name of the target | Channel Descriptions which belong to the topic. | |
filePattern | String | Relative path matcher. | ||
parser | CsvParserDescription | Default Parser Description | CSV Parser Description. | |
restrictToSources | Set |
Sources to which topic is restricted. | ||
restrictFromSources | Set |
Sources from which topic is restricted. |
Example
@Bean
public CsvTopicDescription tradesTopic() {
return CsvTopicDescription.builder("Trades")
.filePattern("trades*.csv")
.build();
}
@Bean
public CsvTopicDescription verticesTopic() {
return CsvTopicDescription.builder("Vertices")
.filePattern("vertex*.csv")
.build();
}