[ 
https://issues.apache.org/jira/browse/NIFI-12404?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17791006#comment-17791006
 ] 

ASF subversion and git services commented on NIFI-12404:
--------------------------------------------------------

Commit 9154b708cc8701674450fc66668ca66fa27d0087 in nifi's branch 
refs/heads/main from dan-s1
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=9154b708cc ]

NIFI-12404 Added documentation indicating this controller service does not 
resolve YAML aliases.

This closes #8070.

Signed-off-by: Pierre Villard <[email protected]>


> YamlTreeReader does not support Yaml aliases
> --------------------------------------------
>
>                 Key: NIFI-12404
>                 URL: https://issues.apache.org/jira/browse/NIFI-12404
>             Project: Apache NiFi
>          Issue Type: Bug
>            Reporter: Daniel Stieglitz
>            Assignee: Daniel Stieglitz
>            Priority: Minor
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> Utilizing the Jackson library to parse YAML allowed for reuse of much of the 
> code used by the JsonTreeReader. A side effect though is Jackson does not 
> support the resolution of Yaml aliases. An example would be the following 
> Yaml where the ship-to value references the anchor defined in the bill-to 
> section.
>  
> {code:java}
> bill-to:  &id001
>     street: |
>             123 Tornado Alley
>             Suite 16
>     city:   East Centerville
>     state:  KS
> ship-to:  *id001
> {code}
>  
> The above Yaml is transformed to the following JSON  when using ConvertRecord 
> configured with the YamlTreeReader and the JsonRecordSetWriter:
> {code:java}
> [ {
>   "bill-to" : {
>     "street" : "123 Tornado Alley\nSuite 16\n",
>     "city" : "East Centerville",
>     "state" : "KS"
>   },
>   "ship-to" : "id001"
> } ]{code}
>  
> Note how the "ship-to" does not contain the same value as "bill-to" but 
> rather a string with the name of the alias.
> This is a known bug in Jackson as seen 
> [here|https://github.com/FasterXML/jackson-dataformats-text/issues/98]
> The aim of this ticket is to add to the YamlTreeReader documentation the fact 
> that Yaml aliases are not resolved.
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to