Hey,
I m having some issues with converting a regular timestamp in cassandra with Apache Nifi.
My use case is following:
I have a csv file with a date in it looking like this ('2015010109') and I want to put it in cassandra by converting this string ('2015010109') to an proper format: 2015-01-01 09:00 -> yyyy/MM/dd HH:mm (I dont exactly need the minutes, but I guess it is more useful for later usage)
So far I got this propertie in my UpdateAttribute processor when trying to convert this string to a timestamp:
date : ${csvfiledate:toDate("yyyyMMddHH","GMT"):format("yyyy-MM-dd-HH")}
but then there is an error occuring in my PutCassandraQL processor: Unable to coerce '2015-01-01-09' to a formatted date (long).
By now I didnt try to set the minutes (always mm = 00), because I dont have them in my string out of the csv-file yet. But I guess I need them, because of the certain set of string date formats which can only be coerced: http://docs.datastax.com/en/archived/cql/3.0/cql/cql_reference/timestamp_type_r.html
I didnt manage to do it though, maybe you got some tipps.
Thanks in advance.