public class ResourceOperator extends Object
Each resource must be configured in the bolt configuration this way :
"resources": {
"myResourceName":{
"url": "http://my.api.com/resource/mytenant/enrichment.json",
"startup_loading": true,
"cron": "* * ? * * *",
"decoder": "org.thales.punch.libraries.punchlang.resource.decoders.CsvToTuple"
"decoder_settings": {
"separator": ";",
"hash_key": "id",
"infer_types": true,
"has_header": true,
"lower_case_keys": true
}
}
}
Fields description :
Tuple t = getResource("myResourceName").asTuple();
Or using one of the operator that uses remote resource (like validate operator) :
validateSchema("myResourceName").on([logs][log]).into([logs][error]);
Constructor and Description |
---|
ResourceOperator(String name) |
Copyright © 2023. All rights reserved.