Uploaded image for project: 'Apache NiFi'
  1. Apache NiFi
  2. NIFI-2165

PutCassandraQL is handling timestamps as strings

    XMLWordPrintableJSON

    Details

      Description

      PutCassandraQL fails when attempting to insert a (iso-8601-formatted) timestamp on both Nifi 0.6 and 1.0 due to handling timestamps as strings.

      Input:
      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(?,?,?)

      Output:
      com.datastax.driver.core.exceptions.CodecNotFoundException: Codec not found for requested operation: [timestamp <-> java.lang.String]
      Record does not get inserted into Cassandra

      Expected output:
      Record gets inserted into Cassandra

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                jeffoxenberg Jeff Oxenberg
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 1h
                  1h
                  Remaining:
                  Remaining Estimate - 1h
                  1h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified