Member since
07-19-2018
613
Posts
101
Kudos Received
117
Solutions
My Accepted Solutions
| Title | Views | Posted |
|---|---|---|
| 5688 | 01-11-2021 05:54 AM | |
| 3812 | 01-11-2021 05:52 AM | |
| 9488 | 01-08-2021 05:23 AM | |
| 9289 | 01-04-2021 04:08 AM | |
| 38616 | 12-18-2020 05:42 AM |
04-08-2020
12:06 PM
@Pe If you have a new question, you can post it and reference the article. However, since im already responding, I will be brief. Yes, all dev, test,prod to usually Prod NiFi Registry. Or sometimes all to Dev, your preference. To connect to existing keystores, would just add the new certs from the nifi registry host to all the other existing keystores/truststores.
... View more
04-08-2020
11:51 AM
Notice my settings for All Properties and I use Regex. If you don't want to use Regex, change Replacement Strategy. I would recommend doing it as I have shown, with regex on complete flow file. Not line by line. Also, you can append and prepend more text and transformations in same replace too. For Example: PREPEND ${'$1':replace('"',''):replace(',',' '):replace('\n',',\n')} APPEND
... View more
04-08-2020
10:00 AM
@ForrestGump I believe you are using ReplaceText. I use it like this:
... View more
04-08-2020
03:35 AM
1 Kudo
The creation of large database schemas can be a very complicated task. In this article, I am going to share how I used NiFi to fully automate a monstrous task. For my project, I needed to create very large Avro Schemas, and corresponding Hive Tables for five or more Data Sources, each having from 400-500+ different CSV columns. Doing this manually would have been a nightmare just to manage the initial schema creations. Managing schema changes an even bigger task over time. My answer was the Schema Generator API using NiFi and Schema Registry.
Please reference the following NiFi Template:
Schema Generator API Demo Template
Schema Generator API
The above NiFi template provides the following capabilities:
A NiFi API is capable of the following:
Accepting POST for a new table, given the tables data columns and data types is in CSV Format
Creating Schema Registry Entity (POST: create)
Creating Schema Registry Avro Schema (POST: parse)
Creating Hive HQL Schema
Executing Hive HQL Statement
A sample call to create Schema Registry Entity (demo).
A sample call to parse Data Columns (22 string columns).
Lots of helpful labels with notes.
The following are the template setup instructions:
Download, Upload Template, and Drag Template to your NiFi Pallette.
Make sure a Schema Registry is Setup within reach of NiFi.
Edit the following Schema Generator Demo Process Group's Variables:
schemaGeneratorApiHost
schemaGeneratorApiPort
schemaRegistryUrl
hiveDatabaseName
hiveDatabaseConnectionUrl (jdbc string)
hiveConfigurationResources (path to hive-site.xml)
Enable controller services in Schema Generator API process group:
StandardHttpContextMap for HandleHttpRequest & Response
HiveConnectionPool for PutHiveQl
Start Schema Generator API Processor group.
Navigate to samples and execute Sample Call 1, then 2 by switching appropriate GenerateFlowFile On/Off. These 2 proc are disabled by default as you should switch them On and Off immediately. These are the only 2 proc that should not always run. Disable them again when done.
This is just a basic demonstration to get you started with Schema Registry and Data Source Schema Automation. Parts of this template are also helpful for anyone who needs to automate creating Avro Schemas and/or Hive Schemas for large CSVs which could still be done without Schema Registry. The demo above has been tested up to 500 columns and includes mapping various different column types to hive data types.
Important Information
The template is built and tested on NiFi 1.9, Single Node Nifi Cluster, with local Schema Registry Installed.
The Schema Registry UI doesn't have full capability. Learn the API to work with your Schemas Directly. For Example: Delete. See my previous post Using the Schema Registry API for detailed API info.
Versioning Schema Forward and Backward can be very problematic. Be Warned.
Use a proper and consistent table and column naming conventions. Complicated column names will break Avro and Hive. Example characters include but not limited to: spaces, /, \, $, *, [, ], (, ), etc.
Schema Registry Entities and Associated Avro Schemas can be used in NiFi Record Readers, using HortonworksSchemaRegistry, and other Controller Services.
... View more
Labels:
04-03-2020
10:08 AM
I have now completed the DFHz Hue Management Pack which you can now use to install Hue 3 or Hue 4 in HDP 2 or HDP3. Just be careful in selecting your correct version(s) and getting the correct mpack install command. They are each very specific. Check out the repo: https://github.com/steven-dfheinz/dfhz_hue_mpack
... View more
04-02-2020
11:45 AM
@Gubbi I think your ListFile proc is still executing 0 sec. Reference our private message.
... View more
04-02-2020
06:46 AM
@Gubbi please share you nifi info: How many nodes? How much ram and how many cores per node? What is min/max memory setting in NiFi? Have you done anything with configuring nifi for performance? For example Increasing Min/Max Ram? Disk Partitioning? Changing the Max Thread Count in Admin->Controller Services? Setting Concurrent Tasks in processor scheduling tab?
... View more
04-02-2020
06:32 AM
1 Kudo
@Gubbi The next solution here is to just add each route for today, yesterday, day before yesterday. Then route all 3 to the next proc. Anything not matching won't be routed.
... View more
04-02-2020
06:29 AM
1 Kudo
@Gubbi The solution here is a now minute 24 hours: Yesterday: ${now():minus(86400000):format('MM-dd-yyyy hh:mm:ss') } Day Before Yesterday: ${now():minus(86400000):minus(86400000):format('MM-dd-yyyy hh:mm:ss') }
... View more
04-01-2020
12:07 PM
Some more updates here: HDP 3.x with Hue 3.11.0 Custom Ambari Hue Service is operational. Repo Here HDP 3.x with Hue 4.6.0 Custom Ambari Hue Service is operational. Repo Here HDP 3.x with Hue 4.6.0 DFHz Management Pack is operational. Repo Here HDP 2.x with Hue 3.11.0 Custom Ambari Hue Service is operational. Repo Here HDP 2.x with Hue 4.6.0 Custom Ambari Hue Service is operational. Repo Here If anyone has questions or issues please open a new question and tag me in it. You can also reach out via Private Message for additional assistance with any of the above repos.
... View more