Member since
05-06-2021
37
Posts
1
Kudos Received
1
Solution
My Accepted Solutions
Title | Views | Posted |
---|---|---|
3611 | 05-17-2021 12:22 PM |
10-07-2022
07:51 AM
@MattWho Thank you very much, this worked perfectly for what I was needing. Can you tell me if this same flow also works with windows?
... View more
10-03-2022
11:59 PM
There should be two controllers configured: DistributedMapCacheClientService DistributedMapCacheServer Client is, eh, client, server is a backend for your cache. Without server client has nowhere to send a flowfile.
... View more
09-23-2022
07:47 AM
@Matt thank you very much for all the answer. We are still insisting on getting the Base64 field from Oracle because the PDF is already there. I'm using the Base64EncodeContent process to decode the Base64 field coming from Oracle. I was able to send a file to the E-mail with PDF format, but it still has an error when opening the PDF file sent in the E-mail. It seems to me that Nifi cannot say that the code it is decoding from the Base64 field that is coming from Oracle. Sorry for the lack of knowledge on the subject. ExecuteSQL UpdateAttribute Base64EncodeContent PutEmail PutEmail
... View more
09-15-2022
05:17 AM
We can't use PutEmail processor direct for attachment. We can use FetchFile processor and direct to PutEmail processor to send attachment, but it fetchFile will send the attachment for the first trigger only. Alternatively for send attachment, you can use ExecuteScript Processor using python module and pass the argument parameter of mailto and fromto to script. import smtplib from email.mime.base import MIMEBase from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText from email import encoders fromaddr = 'SENDER@EMAIL.COM' #$arg1 Argument from NIFI Flow toaddr = 'RECIPIENT@EMAIL.COM' #$arg2 Argument from NIFI Flow msg = MIMEMultipart() msg['From'] = fromaddr msg['To'] = toaddr msg['Subject'] = 'Define the Subject' body = 'Define Body' msg.attach(MIMEText(body)) files = ['/user/path/filename1', '/user/path/filename2'] for filename in files: attachment = open(filename, 'rb') part = MIMEBase("application", "octet-stream") part.set_payload(attachment.read()) encoders.encode_base64(part) part.add_header("Content-Disposition", f"attachment; filename= {filename}") msg.attach(part) msg = msg.as_string() try: server = smtplib.SMTP('smtp.email.com:21') server.ehlo() server.starttls() server.login(fromaddr, 'user') server.sendmail(fromaddr, toaddr, msg) server.quit() @leandrolinof wrote: @Aaki_08 good morning. I have a situation where I need to email buyers of a certain ID with a certain PDF attachment. This attachment will be saved in a field in a table in oracle. Today I'm already using PutEmail to send the E-mail, but I don't know how to send the attachment. Could you help me, please? @leandrolinof wrote: @Aaki_08 good morning. I have a situation where I need to email buyers of a certain ID with a certain PDF attachment. This attachment will be saved in a field in a table in oracle. Today I'm already using PutEmail to send the E-mail, but I don't know how to send the attachment. Could you help me, please?
... View more
06-01-2022
10:59 AM
1 Kudo
@steven-matison thank you so much.
... View more
06-16-2021
10:46 AM
@MattWho @pvillard @Shu_ashu @Dubeyji @VidyaSargur @TimothySpann can You help me?
... View more
05-21-2021
10:21 AM
@MattWho, Good afternoon. I changed my flow to make a counter by the processor "RouteOnAttribute 1.12.1" so every time I have a record to be sent to the API and have a return to store in Oracle, I do the LOOP through RouteOnAttribut. Thus sending one FlowFile at a time to the PROCEDURE call in Oracle by "ExecuteSQL 1.12.1" But what is happening at the moment is that from the second time it goes through the LOOP, it seems to me that the Flow to get the attributes "CODIGO" and "JSON_ORIGINAL" is not passing the values that I requested in the processor "EvaluateJsonPath 1.12.1" passing the parameters as null. Do you have any idea what may be happening in this second flow passage within the LOOP? This is the JSON ORIGINAL of the second stream that I must send to Oracle = This is OK with the CODE attribute as you can check. This is Split Configure Processor = This is EvaluateJsonPath 1.12.1 Configure Processor = This is MergeContent 1.12.1 Configure Processor = This is ExecuteSQL 1.12.1 Configure Processor =
... View more
05-20-2021
02:48 PM
1 Kudo
@leandrolinof NiFi Expression Language (NEL) [1] does not read content of the FlowFile. The RouteOnAttribute processor never looks at the content of a FlowFile. So verify your source FlowFile has attributes set with valid numeric only values. So your inbound FlowFile would need to have two attributes on it already: 1. cont 2. CONTADOR Note: NiFi is case sensitive as well. And both these attributes need to have assigned values to them. The NEL statement you have will return the value assigned to the FlowFile attribute "cont" and check to see if it is less than the value assigned to the FlowFile attribute "CONTADOR". If that resolves to "True", the FlowFile will be routed to the connection containing the new dynamically created "CONTINUE" relationship. Otherwise, it will route to the "unmatched" relationship which you appear to have auto-terminated. [1] https://nifi.apache.org/docs/nifi-docs/html/expression-language-guide.html If you found this addressed your query, please take a moment to login and click accept on this solution. Thank you, Matt
... View more
05-17-2021
12:22 PM
@MattWho I was able to use the following structure in the flow = Thanks a lot for the help. 😃
... View more
05-07-2021
11:02 AM
@MattWho Thanks for the time available for my problem, the "ExtractText" worked perfectly for my case and the data was saved in my database. Grateful.
... View more