You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nifi.apache.org by Mike Thomsen <mi...@gmail.com> on 2018/12/10 17:05:07 UTC

Think I hit a regression in the record api

Schema:

{
    "type": "record",
    "name": "TSTest",
    "fields": [
        { "name": "uuid", "type":"string" },
        { "name": "ts", "type": { "type": "long", "logicalType":
"timestamp-millis" }}
    ]
}

Example input:

{
  "uuid": "4e64ce00-e6cc-492c-a4d6-57d3f43c4101",
  "ts": 1544460087689
}

I had a JsonTreeReader set on PutElasticSearchHttpRecord, and it used the
format below:

yyyy-MM-dd'T'HH:mm:ss'Z'

ElasticSearch reported invalid input, and when I looked at the output being
sent to Elastic it appeared to be hard set to use yyyy-MM-dd HH:mm:ss

I added that format to the date field in Elastic, and Elastic was happy
with the input.

Best I can tell, it appears that in 1.8 it's ignoring the user-supplied
timestamp formatter.

Re: Think I hit a regression in the record api

Posted by Otto Fowler <ot...@gmail.com>.
Is there a unit test for that?


On December 10, 2018 at 12:05:22, Mike Thomsen (mikerthomsen@gmail.com)
wrote:

Schema:

{
"type": "record",
"name": "TSTest",
"fields": [
{ "name": "uuid", "type":"string" },
{ "name": "ts", "type": { "type": "long", "logicalType":
"timestamp-millis" }}
]
}

Example input:

{
"uuid": "4e64ce00-e6cc-492c-a4d6-57d3f43c4101",
"ts": 1544460087689
}

I had a JsonTreeReader set on PutElasticSearchHttpRecord, and it used the
format below:

yyyy-MM-dd'T'HH:mm:ss'Z'

ElasticSearch reported invalid input, and when I looked at the output being
sent to Elastic it appeared to be hard set to use yyyy-MM-dd HH:mm:ss

I added that format to the date field in Elastic, and Elastic was happy
with the input.

Best I can tell, it appears that in 1.8 it's ignoring the user-supplied
timestamp formatter.