PutHBaseRecord 2.3.0.4.10.0.0-147

Bundle
org.apache.nifi | nifi-hbase-nar
Description
Adds rows to HBase based on the contents of a flowfile using a configured record reader.
Tags
hadoop, hbase, put, record
Input Requirement
REQUIRED
Supports Sensitive Dynamic Properties
false
  • Additional Details for PutHBaseRecord 2.3.0.4.10.0.0-147

    PutHBaseRecord

    Visibility Labels:

    PutHBaseRecord provides the ability to define a branch of the record as a map which contains an association between column qualifiers and the visibility label that they should have assigned to them.

    Example Schema

    {
      "type": "record",
      "name": "SampleRecord",
      "fields": [
        {
          "name": "name",
          "type": "string"
        },
        {
          "name": "address",
          "type": "string"
        },
        {
          "name": "dob",
          "type": "string"
        },
        {
          "name": "attendingPhysician",
          "type": "string"
        },
        {
          "name": "accountNumber",
          "type": "string"
        },
        {
          "name": "visibility_labels",
          "type": {
            "type": "map",
            "values": "string"
          }
        }
      ]
    }
    

    Example Record

    {
      "name": "John Smith",
      "address": "12345 Main Street",
      "dob": "1970-01-01",
      "attendingPhysician": "Dr. Jane Doe",
      "accountNumber": "1234-567-890-ABC",
      "visibility_labels": {
        "name": "OPEN",
        "address": "PII",
        "dob": "PII",
        "attendingPhysician": "PII&PHI",
        "accountNumber": "PII&BILLING"
      }
    }
    

    Results in HBase

    Example is for row with ID patient-1 and column family patient

    Row Value Visibility
    patient-1:patient:name John Smith OPEN
    patient-1:patient:address 12345 Main Street PII
    patient-1:patient: 1970-01-01 PII
    patient-1:patient:attendingPhysician Dr. Jane Doe PII&PHI
    patient-1:patient:accountNumber 1234-567-890-ABC PII&BILLING

    In addition to the branch for visibility labels, the same methods used for PutHBaseCell and PutHBaseJSON can be used. They are:

    • Attributes on the flowfile.
    • Dynamic properties added to the processor.

    When the dynamic properties are defined on the processor, they will be the default value, but can be overridden by attributes set on the flowfile. The naming convention for both (property name and attribute name) is:

    • visibility.COLUMN_FAMILY - every column qualifier under the column family will get this.
    • visibility.COLUMN_FAMILY.COLUMN_VISIBILITY - the qualified column qualifier will be assigned this value.
Properties
Dynamic Properties
Relationships
Name Description
success A FlowFile is routed to this relationship after it has been successfully stored in HBase
failure A FlowFile is routed to this relationship if it cannot be sent to HBase
Reads Attributes
Name Description
restart.index Reads restart.index when it needs to replay part of a record set that did not get into HBase.
Writes Attributes
Name Description
restart.index Writes restart.index when a batch fails to be insert into HBase