You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "crissaegrim (Jira)" <ji...@apache.org> on 2023/05/17 21:33:00 UTC
[jira] [Commented] (NIFI-11562) ValidateRecord doesn't work correctly; routes all to 'valid' for invalid records
[ https://issues.apache.org/jira/browse/NIFI-11562?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17723735#comment-17723735 ]
crissaegrim commented on NIFI-11562:
------------------------------------
I'm expecting the `age` values to cause failures in `ValidateRecord` but it isn't failing.
id,name,age,employer
1,joe,30,mlp
2,bob,thirty,google
3,linda,32.123,yahoo
4,anne,31,
Avro IDL
{code:java}
protocol Test {
record TestEmployer {
int id;
string name;
int age;
string? employer = null;
}
}{code}
AVSC
{code:java}
{
"type" : "record",
"name" : "TestEmployer",
"fields" : [ {
"name" : "id",
"type" : "int"
}, {
"name" : "name",
"type" : "string"
}, {
"name" : "age",
"type" : "int"
}, {
"name" : "employer",
"type" : [ "null", "string" ],
"default" : null
} ]
}
{code}
> ValidateRecord doesn't work correctly; routes all to 'valid' for invalid records
> --------------------------------------------------------------------------------
>
> Key: NIFI-11562
> URL: https://issues.apache.org/jira/browse/NIFI-11562
> Project: Apache NiFi
> Issue Type: Bug
> Affects Versions: 1.20.0
> Environment: linux, docker
> Reporter: crissaegrim
> Priority: Major
> Attachments: image-2023-05-17-17-32-04-404.png
>
>
> Replicate this with. Expecting `age` field (int in schema) to cause failure. But it's not failing.
> # Generate Flow File
> id,name,age,employer
> 1,joe,30,mlp
> 2,bob,thirty,google
> 3,linda,32.123,yahoo
> 4,anne,31,
> # ValidateRecord
> # Connect `invalid` and `valid` to downstream to visualize
> Validate against this avro schema
>
> protocol Test {
> record TestEmployer {
> int id;
> string name;
> int age;
> string? employer = null;
> }
> }
> {
> "type" : "record",
> "name" : "TestEmployer",
> "fields" : [ {
> "name" : "id",
> "type" : "int"
> }, {
> "name" : "name",
> "type" : "string"
> }, {
> "name" : "age",
> "type" : "int"
> }, {
> "name" : "employer",
> "type" : [ "null", "string" ],
> "default" : null
> } ]
> }
> See that all records are routed to `valid`. Why?
--
This message was sent by Atlassian Jira
(v8.20.10#820010)