[image: Inline image 1] here the code:
```
val df = func(rdd)
val writer = df.write
if (_resource != "") {
writer.option("path", _resource)
}
writer.options(_cfg).mode(SaveMode.valueOf(_mode)).format(_format).save()
```
and the configurations:
···
{
"name": "stream.output",
"params": [
{
"format": "carbondata",
"mode": "Append",
"tableName": "carbon1",
"compress": "true",
"useKettle": "false",
"tempCSV":"false"
}
]
}
···
