Description:

Reads records from an incoming FlowFile using the provided Record Reader, and writes those records to a Parquet file. The schema for the Parquet file must be provided in the processor properties. This processor will first write a temporary dot file and upon successfully writing every record to the dot file, it will rename the dot file to it’s final name. If the dot file cannot be renamed, the rename operation will be attempted up to 10 times, and if still not successful, the dot file will be deleted and the flow file will be routed to failure. If any error occurs while reading records from the input, or writing records to the output, the entire dot file will be removed and the flow file will be routed to failure or retry, depending on the error.

Tags:

put, parquet, hadoop, HDFS, filesystem, restricted

Properties:

In the list below, the names of required properties appear in bold. Any other properties (not in bold) are considered optional. The table also indicates any default values, and whether a property supports the Expression Language Guide.

Name

Default Value

Allowable Values

Description

Hadoop Configuration Resources A file or comma separated list of files which contains the Hadoop file system configuration. Without this, Hadoop will search the classpath for a 'core-site.xml' and 'hdfs-site.xml' file or will revert to a default configuration.
Kerberos Principal Kerberos principal to authenticate as. Requires nifi.kerberos.krb5.file to be set in your nifi.properties
Kerberos Keytab Kerberos keytab associated with the principal. Requires nifi.kerberos.krb5.file to be set in your nifi.properties
Kerberos Relogin Period 4 hours Period of time which should pass before attempting a kerberos relogin
Additional Classpath Resources A comma-separated list of paths to files and/or directories that will be added to the classpath. When specifying a directory, all files with in the directory will be added to the classpath, but further sub-directories will not be included.

Record Reader

Controller Service API: 


RecordReaderFactory

Implementations: 

JsonPathReader


CSVReader


ScriptedReader


AvroReader


GrokReader


JsonTreeReader


The service for reading records from incoming flow files.

Directory

The parent directory to which files should be written. Will be created if it doesn't exist.

Supports Expression Language: true


Schema Access Strategy

schema-name
  • Use 'Schema Name' Property
  • Use 'Schema Text' Property
  • HWX Schema Reference Attributes
  • HWX Content-Encoded Schema Reference
Specifies how to obtain the schema that is to be used for writing the data.
Schema Registry

Controller Service API: 


SchemaRegistry

Implementations: 

AvroSchemaRegistry


HortonworksSchemaRegistry


Specifies the Controller Service to use for the Schema Registry
Schema Name ${schema.name} Specifies the name of the schema to lookup in the Schema Registry property

Supports Expression Language: true


Schema Text ${avro.schema} The text of an Avro-formatted Schema

Supports Expression Language: true


Compression Type

UNCOMPRESSED
  • UNCOMPRESSED
  • SNAPPY
  • GZIP
  • LZO
The type of compression for the file being written.

Overwrite Files

false
  • true
  • false
Whether or not to overwrite existing files in the same directory with the same name. When set to false, flow files will be routed to failure when a file exists in the same directory with the same name.
Permissions umask A umask represented as an octal number which determines the permissions of files written to HDFS. This overrides the Hadoop Configuration dfs.umaskmode
Remote Group Changes the group of the HDFS file to this value after it is written. This only works if NiFi is running as a user that has HDFS super user privilege to change group
Remote Owner Changes the owner of the HDFS file to this value after it is written. This only works if NiFi is running as a user that has HDFS super user privilege to change owner
Row Group Size The row group size used by the Parquet writer. The value is specified in the format of <Data Size> <Data Unit> where Data Unit is one of B, KB, MB, GB, TB.

Supports Expression Language: true


Page Size The page size used by the Parquet writer. The value is specified in the format of <Data Size> <Data Unit> where Data Unit is one of B, KB, MB, GB, TB.

Supports Expression Language: true


Dictionary Page Size The dictionary page size used by the Parquet writer. The value is specified in the format of <Data Size> <Data Unit> where Data Unit is one of B, KB, MB, GB, TB.

Supports Expression Language: true


Max Padding Size The maximum amount of padding that will be used to align row groups with blocks in the underlying filesystem. If the underlying filesystem is not a block filesystem like HDFS, this has no effect. The value is specified in the format of <Data Size> <Data Unit> where Data Unit is one of B, KB, MB, GB, TB.

Supports Expression Language: true


Enable Dictionary Encoding
  • true
  • false
Specifies whether dictionary encoding should be enabled for the Parquet writer
Enable Validation
  • true
  • false
Specifies whether validation should be enabled for the Parquet writer
Writer Version
  • PARQUET_1_0
  • PARQUET_2_0
Specifies the version used by Parquet writer
Remove CRC Files false
  • true
  • false
Specifies whether the corresponding CRC file should be deleted upon successfully writing a Parquet file

Relationships:

Name

Description

retry Flow Files that could not be processed due to issues that can be retried are transferred to this relationship
success Flow Files that have been successfully processed are transferred to this relationship
failure Flow Files that could not be processed due to issue that cannot be retried are transferred to this relationship

Reads Attributes:

Name

Description

filename The name of the file to write comes from the value of this attribute.

Writes Attributes:

Name

Description

filename The name of the file is stored in this attribute.
absolute.hdfs.path The absolute path to the file is stored in this attribute.
record.count The number of records written to the Parquet file

State management:

This component does not store state.

Restricted:

Provides operator the ability to write to any file that NiFi has access to in HDFS or the local filesystem.

Input requirement:

This component requires an incoming relationship.