Hey Matt,

Thanks for responding, I just had the time to update Nifi and retry.  I updated 
to 1.0 as of today.  I'm still unable to insert timestamps - if I omit the 
timestamp column (and rework the query/table to just be key and value), I can 
insert just fine.

Here's the error I'm getting now:

com.datastax.driver.core.exceptions.CodecNotFoundException: Codec not found for 
requested operation: [timestamp <-> java.lang.String]
Here's the relevant attributes of the flowfile:

FlowFile Attribute Map Content
Key: 'cql.args.1.type'
        Value: 'text'
Key: 'cql.args.1.value'
        Value: 'temp3'
Key: 'cql.args.2.type'
        Value: 'timestamp'
Key: 'cql.args.2.value'
        Value: '2016-06-30T20:04:36Z'
Key: 'cql.args.3.type'
        Value: 'float'
Key: 'cql.args.3.value'
        Value: '6.7'
Key: 'j.id'
        Value: 'temp3'
Key: 'j.ts'
        Value: '2016-06-30T20:04:36Z'
Key: 'j.value'
        Value: '6.7'
--------------------------------------------------
INSERT INTO test.test2 (sensor, ts, value) VALUES(?,?,?)

Thanks,


Jeff Oxenberg

-----Original Message-----
From: Matt Burgess [mailto:[email protected]] 
Sent: Tuesday, June 21, 2016 8:52 PM
To: [email protected]
Subject: Re: PutCassandraQL failing on ISO-8601-formatted timestamp

Jeff,

That appears to be a correct ISO-8601 date, so I'm not sure what's going on 
there. I checked the NiFi code and the Cassandra Java driver Jira and didn't 
see anything related (that wasn't already fixed, in the latter case). The 
upcoming 0.7.0 release has an updated Cassandra driver, perhaps that will solve 
your problem; if it doesn't, please feel free to file a Jira about this.

Regards,
Matt

On Tue, Jun 21, 2016 at 9:32 PM, Oxenberg, Jeff <[email protected]> wrote:
> Hey,
>
>
>
> As a learning exercise, I’ve created a flow that parses a kafka topic 
> of json messages and inserts them into Cassandra.  It’s a three column table:
> id (text), ts (timestamp), and value (float).  I set cql.args.x.type 
> to the proper data types for each column.
>
>
>
> PutCassandraQL is failing with the following:
>
>
>
> org.apache.nifi.processor.exception.ProcessException: The value of the 
> cql.args.2.value is '2016-06-21T20:23:41Z', which cannot be converted 
> into the necessary data type: timestamp
>
>
>
> This happens for each timestamp, but I’m pretty sure the format is correct.
> It’s in ISO-8601, and I’m able to insert them manually into the c* table.
> I’m on Nifi 0.6.1.
>
>
>
> Any help would be appreciated, thanks!

Reply via email to