PutParquet

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, record

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 NiFi Expression Language.

Display NameAPI NameDefault ValueAllowable ValuesDescription
Hadoop Configuration ResourcesHadoop Configuration ResourcesA 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. To use swebhdfs, see 'Additional Details' section of PutHDFS's documentation.

This property expects a comma-separated list of file resources.

Supports Expression Language: true (will be evaluated using variable registry only)
Kerberos Credentials Servicekerberos-credentials-serviceController Service API:
KerberosCredentialsService
Implementation: KeytabCredentialsService
Specifies the Kerberos Credentials Controller Service that should be used for authenticating with Kerberos
Kerberos User Servicekerberos-user-serviceController Service API:
KerberosUserService
Implementations: KerberosKeytabUserService
KerberosPasswordUserService
KerberosTicketCacheUserService
Specifies the Kerberos User Controller Service that should be used for authenticating with Kerberos
Kerberos PrincipalKerberos PrincipalKerberos principal to authenticate as. Requires nifi.kerberos.krb5.file to be set in your nifi.properties
Supports Expression Language: true (will be evaluated using variable registry only)
Kerberos KeytabKerberos KeytabKerberos keytab associated with the principal. Requires nifi.kerberos.krb5.file to be set in your nifi.properties

This property requires exactly one file to be provided..

Supports Expression Language: true (will be evaluated using variable registry only)
Kerberos PasswordKerberos PasswordKerberos password associated with the principal.
Sensitive Property: true
Kerberos Relogin PeriodKerberos Relogin Period4 hoursPeriod of time which should pass before attempting a kerberos relogin. This property has been deprecated, and has no effect on processing. Relogins now occur automatically.
Supports Expression Language: true (will be evaluated using variable registry only)
Additional Classpath ResourcesAdditional Classpath ResourcesA comma-separated list of paths to files and/or directories that will be added to the classpath and used for loading native libraries. When specifying a directory, all files with in the directory will be added to the classpath, but further sub-directories will not be included.

This property expects a comma-separated list of resources. Each of the resources may be of any of the following types: directory, file.
Record Readerrecord-readerController Service API:
RecordReaderFactory
Implementations: Syslog5424Reader
CEFReader
ReaderLookup
CiscoEmblemSyslogMessageReader
CSVReader
GrokReader
SyslogReader
JsonTreeReader
JsonPathReader
XMLReader
AvroReader
JASN1Reader
ExcelReader
ParquetReader
EBCDICRecordReader
WindowsEventLogReader
IPFIXReader
ScriptedReader
The service for reading records from incoming flow files.
DirectoryDirectoryThe parent directory to which files should be written. Will be created if it doesn't exist.
Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)
Compression Typecompression-typeUNCOMPRESSED
  • UNCOMPRESSED
  • SNAPPY
  • GZIP
  • LZO
  • BROTLI
  • LZ4
  • ZSTD
  • LZ4_RAW
The type of compression for the file being written.
Overwrite Filesoverwritefalse
  • 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 umaskpermissions-umaskA umask represented as an octal number which determines the permissions of files written to HDFS. This overrides the Hadoop Configuration dfs.umaskmode
Remote Groupremote-groupChanges 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 Ownerremote-ownerChanges 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 Sizerow-group-sizeThe 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 (will be evaluated using flow file attributes and variable registry)
Page Sizepage-sizeThe 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 (will be evaluated using flow file attributes and variable registry)
Dictionary Page Sizedictionary-page-sizeThe 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 (will be evaluated using flow file attributes and variable registry)
Max Padding Sizemax-padding-sizeThe 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 (will be evaluated using flow file attributes and variable registry)
Enable Dictionary Encodingenable-dictionary-encoding
  • true
  • false
Specifies whether dictionary encoding should be enabled for the Parquet writer
Enable Validationenable-validation
  • true
  • false
Specifies whether validation should be enabled for the Parquet writer
Writer Versionwriter-version
  • PARQUET_1_0
  • PARQUET_2_0
Specifies the version used by Parquet writer
Avro Write Old List Structureavro-write-old-list-structuretrue
  • true
  • false
Specifies the value for 'parquet.avro.write-old-list-structure' in the underlying Parquet library
Avro Add List Element Recordsavro-add-list-element-recordstrue
  • true
  • false
Specifies the value for 'parquet.avro.add-list-element-records' in the underlying Parquet library
Remove CRC Filesremove-crc-filesfalse
  • true
  • false
Specifies whether the corresponding CRC file should be deleted upon successfully writing a Parquet file

Relationships:

NameDescription
retryFlow Files that could not be processed due to issues that can be retried are transferred to this relationship
successFlow Files that have been successfully processed are transferred to this relationship
failureFlow Files that could not be processed due to issue that cannot be retried are transferred to this relationship

Reads Attributes:

NameDescription
filenameThe name of the file to write comes from the value of this attribute.

Writes Attributes:

NameDescription
filenameThe name of the file is stored in this attribute.
absolute.hdfs.pathThe absolute path to the file is stored in this attribute.
hadoop.file.urlThe hadoop url for the file is stored in this attribute.
record.countThe number of records written to the Parquet file

State management:

This component does not store state.

Restricted:

Required PermissionExplanation
write distributed filesystemProvides operator the ability to write any file that NiFi has access to in HDFS or the local filesystem.

Input requirement:

This component requires an incoming relationship.

System Resource Considerations:

None specified.