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

ASF GitHub Bot commented on NIFI-4024:
--------------------------------------

Github user bbende commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/1961#discussion_r126430219
  
    --- Diff: 
nifi-nar-bundles/nifi-hbase-bundle/nifi-hbase-processors/src/main/java/org/apache/nifi/hbase/PutHBaseRecord.java
 ---
    @@ -295,13 +302,21 @@ protected PutFlowFile createPut(ProcessContext 
context, Record record, RecordSch
                         if (name.equals(rowFieldName)) {
                             continue;
                         }
    -                    columns.add(new PutColumn(fam, 
clientService.toBytes(name), asBytes(name, 
schema.getField(name).get().getDataType().getFieldType(), record, asString)));
    +                    columns.add(new PutColumn(fam, 
clientService.toBytes(name), asBytes(name,
    +                            
schema.getField(name).get().getDataType().getFieldType(), record, asString, 
complexFieldStrategy)));
    +                }
    +                String rowIdValue = record.getAsString(rowFieldName);
    +                if (rowIdValue == null) {
    +                    throw new Exception(String.format("Row ID was null for 
flowfile with ID %s", flowFile.getAttribute("uuid")));
                     }
    -                retVal = new PutFlowFile(tableName, 
clientService.toBytes(record.getAsString(rowFieldName)), columns, flowFile);
    +                byte[] rowId =  getRow(rowIdValue, fieldEncodingStrategy);
    --- End diff --
    
    Should this be the "row encoding strategy" rather than the "field encoding 
strategy"? 
    
    There's actually separate properties for these (FIELD_ENCODING_STRATEGY vs. 
ROW_ID_ENCODING_STRATEGY).


> Create EvaluateRecordPath processor
> -----------------------------------
>
>                 Key: NIFI-4024
>                 URL: https://issues.apache.org/jira/browse/NIFI-4024
>             Project: Apache NiFi
>          Issue Type: New Feature
>            Reporter: Steve Champagne
>            Priority: Minor
>
> With the new RecordPath DSL, it would be nice if there was a processor that 
> could pull fields into attributes of the flowfile based on a RecordPath. This 
> would be similar to the EvaluateJsonPath processor that currently exists, 
> except it could be used to pull fields from arbitrary record formats. My 
> current use case for it would be pulling fields out of Avro records while 
> skipping the steps of having to convert Avro to JSON, evaluate JsonPath, and 
> then converting back to Avro. 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to