You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "David Voit (JIRA)" <ji...@apache.org> on 2018/10/12 13:51:00 UTC
[jira] [Updated] (NIFI-5690) JsonRecordSetWriter: coercion
RECORD/MAP/CHOICE/ARRAY to json string
[ https://issues.apache.org/jira/browse/NIFI-5690?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
David Voit updated NIFI-5690:
-----------------------------
Description:
Hi All,
Having the following json:
{"bla": \{"fasel": "bla"}}
with the following AVRO reading schema:
{
"type" : "record",
"name" : "BlaRecord",
"fields" : [ {
"name" : "bla",
"type" : {
"type" : "record",
"name" : "faselRecord",
"fields" : [
{ "name" : "fasel", "type" : "string" }
]
}
} ]
}
Using a ConvertRecord with JsonRecordSetWriter and the following output schema:
{
"type" : "record",
"name" : "BlaRecord",
"fields" : [
{ "name" : "bla", "type" : "string" }
]
}
a output like the following would be nice/expected:
{"bla": "\{\"fasel\": \"bla\"}"}
But we are getting:
[{"bla":"MapRecord[
{fasel=bla}
]"}]
Which seems completly useless this way. We needs this functionality to save a record in a hbase column as a json string.
Regards and Thanks,
David
was:
Hi All,
Having the following json:
{"bla": \{"fasel": "bla"}}
with the following AVRO reading schema:
{
"type" : "record",
"name" : "BlaRecord",
"fields" : [ {
"name" : "bla",
"type" : {
"type" : "record",
"name" : "faselRecord",
"fields" : [ {
"name" : "fasel",
"type" : "string"
} ]
}
} ]
}
Using a ConvertRecord with JsonRecordSetWriter and the following output schema:
{
"type" : "record",
"name" : "BlaRecord",
"fields" : [ {
"name" : "bla",
"type" : "string"
} ]
}
a output like the following would be nice/expected:
{"bla": "\{\"fasel\": \"bla\""}}
But we are getting:
[\{"bla":"MapRecord[{fasel=bla}]"}]
Which seems completly useless this way. We needs this functionality to save a record in a hbase column as a json string.
Regards and Thanks,
David
> JsonRecordSetWriter: coercion RECORD/MAP/CHOICE/ARRAY to json string
> --------------------------------------------------------------------
>
> Key: NIFI-5690
> URL: https://issues.apache.org/jira/browse/NIFI-5690
> Project: Apache NiFi
> Issue Type: Wish
> Affects Versions: 1.7.1
> Reporter: David Voit
> Priority: Major
>
> Hi All,
> Having the following json:
> {"bla": \{"fasel": "bla"}}
> with the following AVRO reading schema:
> {
> "type" : "record",
> "name" : "BlaRecord",
> "fields" : [ {
> "name" : "bla",
> "type" : {
> "type" : "record",
> "name" : "faselRecord",
> "fields" : [
> { "name" : "fasel", "type" : "string" }
> ]
> }
> } ]
> }
> Using a ConvertRecord with JsonRecordSetWriter and the following output schema:
> {
> "type" : "record",
> "name" : "BlaRecord",
> "fields" : [
> { "name" : "bla", "type" : "string" }
> ]
> }
>
> a output like the following would be nice/expected:
> {"bla": "\{\"fasel\": \"bla\"}"}
> But we are getting:
> [{"bla":"MapRecord[
> {fasel=bla}
> ]"}]
> Which seems completly useless this way. We needs this functionality to save a record in a hbase column as a json string.
>
> Regards and Thanks,
> David
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)