Member since
06-26-2015
515
Posts
140
Kudos Received
114
Solutions
My Accepted Solutions
| Title | Views | Posted |
|---|---|---|
| 2569 | 09-20-2022 03:33 PM | |
| 6937 | 09-19-2022 04:47 PM | |
| 3665 | 09-11-2022 05:01 PM | |
| 4274 | 09-06-2022 02:23 PM | |
| 6776 | 09-06-2022 04:30 AM |
02-10-2022
11:31 PM
Is this a CDP Data Hub? How did you create the VM?
... View more
02-10-2022
09:23 PM
Is this related to CDP? Where is your environment? Without the context we can't help.
... View more
02-10-2022
06:50 PM
Please see this answer: https://community.cloudera.com/t5/Support-Questions/How-to-apply-https-archive-cloudera-com-cdh6-Download/m-p/335828/highlight/true#M232040
... View more
02-10-2022
06:45 PM
I don't know if it's possible to do this generically and recursively using Jolt. Nevertheless, if your schema is well know you can achieve want you want with something like this: { "Completed": { "*": { "*": { "@1": "&3.&2" } } }, "Accepted": { "*": { "*": { "@1": "&3.&2" } } }, "Approved": { "*": { "*": { "@1": "&3.&2" } } }, "*": { "*": { "@1": "&2" } } } Cheers, Andre
... View more
02-10-2022
04:32 PM
2 Kudos
Which repository are you referring to? An internal NiFi repository or the location your flow is writing data to? You can use the EncryptContent processor to encrypt the whole content of the flowfile, but there isn't an easy way to a single field of a record. To do this you will have to use something like the ScriptedTransformRecord and provide a script that encrypts parts of your data. Here's an example of using ScriptedTransformRecord with a Groovy script to encrypt the field "name": import javax.crypto.Cipher import javax.crypto.SecretKey import javax.crypto.SecretKeyFactory import javax.crypto.spec.IvParameterSpec import javax.crypto.spec.PBEKeySpec import javax.crypto.spec.SecretKeySpec import java.security.Key import java.security.spec.KeySpec String encryptionKey = "#{encryption.key}" Key aesKey = new SecretKeySpec(encryptionKey.getBytes("UTF-8"), "AES") Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding") cipher.init(Cipher.ENCRYPT_MODE, aesKey) record.setValue("name", cipher.doFinal(record.getValue("name").getBytes("UTF-8")).encodeBase64()) record To decrypt it you could use: import javax.crypto.Cipher import javax.crypto.SecretKey import javax.crypto.SecretKeyFactory import javax.crypto.spec.IvParameterSpec import javax.crypto.spec.PBEKeySpec import javax.crypto.spec.SecretKeySpec import java.security.Key import java.security.spec.KeySpec import java.util.Base64 String encryptionKey = "#{encryption.key}" Key aesKey = new SecretKeySpec(encryptionKey.getBytes("UTF-8"), "AES") Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding") cipher.init(Cipher.DECRYPT_MODE, aesKey) record.setValue("name", cipher.doFinal(Base64.getDecoder().decode(record.getValue("name")))) record The encrypt key is specified through a NiFi parameter called encryption.key. Cheers, André
... View more
02-10-2022
03:33 PM
Which version of NiFi are you using?
... View more
02-09-2022
09:26 PM
Hi, @Sam2020 , Run the following and try again: mv \ /opt/cloudera/parcel-repo/CDH-7.1.7-1.cdh7.1.7.p74.21057765-el7.parcel.sha1 \ /opt/cloudera/parcel-repo/CDH-7.1.7-1.cdh7.1.7.p74.21057765-el7.parcel.sha chown cloudera-scm:cloudera-scm/opt/cloudera/parcel-repo/* Please let me know if this helped. Cheers, André
... View more
02-09-2022
08:11 PM
1 Kudo
You can use a QueryRecord processor before the PutDatabaseRecord. You can add a relation to the QueryRecord processor with the following associated query: select "field one" as field_one, "field two" as field_two, "field three" as field_three from flowfile In the query above you can reference one field names using double-quotes if they have spaces. You can specify an alias for that column, which is the field name that will be used in the output. Cheers, Andre
... View more
02-09-2022
07:49 PM
1 Kudo
The alternative your mentioned of using GenerateFlow file is the way to go here.
... View more
02-09-2022
07:47 PM
@hjfigueira , I ran a test with your schema and data and it worked without problems for me. I think there's something else in your environment that hasn't been described here that's contributing to the problem. André
... View more