Member since
05-30-2023
41
Posts
4
Kudos Received
0
Solutions
10-02-2023
10:12 AM
Thats right. I intend to convert the json using JoltTransfomationRecord into csv format and then save the file in my local machine.
... View more
10-02-2023
09:40 AM
@SAMSAL thank you for responding. I am infact using/converting the output from ExecuteSql from Arvo to Json using ConvertAvroToJson processor. Below is the output of the same processor: I am also wondering if I am providing the json format, its throwing error for avro. Can you suggest something?
... View more
10-02-2023
09:19 AM
@araujo I am trying to implement your suggested way. My json is : { "Id" : "some int", "TenantId" : "some double value" } and I am using chain jolt transform method as: [ { "operation": "shift", "spec": { "*": { "@(1,Id)": "[&1].Id", "@(1,TenantId)": "[&1].TenantId" } } }] However, I am getting a error as: Can you tell where I am going wrong? Thanks.
... View more
09-22-2023
01:36 AM
Any feedback will be appreciated. Thanks.
... View more
09-21-2023
12:48 PM
Hi, I have a python code which is trying to authenticates to my NIFI server and start a processor inside it. Please see code below: from flask import Flask import nipyapi import requests app = Flask(__name__) @app.route('/') def home(): nifi_url = "https://mynifiinstance:port/nifi-api/access" processor_id = <processorID> nifi_general = "https://mynifiinstance/nifi-api" start_processor_url = f"{nifi_general}/processors/{processor_id}/run-status" headers = {'Content-Type': 'application/x-www-form-urlencoded'} username = "username" password = "password" data = { "username": username, "password": password } response = requests.post(url=nifi_url, data=data,verify=False, headers=headers) if response.status_code == 200: # if successfully authenticated, then start the processor start_processor = requests.put(url=start_processor_url, headers=headers) print(start_processor.status_code) if start_processor.status_code == 200: return("Processor started successfully.") else: return(f"Starting processor failed. Status code: {start_processor.status_code}") else: return(f"Failed to start processor. Status code: {response.status_code}") if __name__ == '__main__': app.run() However, I am unable to authenticate with the given username and password. Note: that I have not made any changes in the nifi.properties file. Does it have to be changed? Looking fwd to your responses.
... View more
Labels:
- Labels:
-
Apache NiFi
-
NiFi Registry
09-01-2023
01:44 AM
I am trying to make a conenction to my Sql Server using "zxJDBC". Below is my code in ExecuteScript processor: from com.ziclix.python.sql import zxJDBC d, u, p, v = "jdbc:sqlserver://<servername>;Database=<databasename>;encrypt=true;trustServerCertificate=true;user=<username>;password=<password>;integratedSecurity=true", None, None, " com.microsoft.sqlserver.jdbc.SQLServerDriver" db = zxJDBC.connect(d, u, p, v) c = db.cursor() However, I am getting an error " zxjdbc.database error driver com.microsoft.sqlserver.jdbc.SQLServerDriver not found" My limted research in internet found out that it is dependent on some jar files how how can we add jar files classpath in nifi processors. Please guide in making this Sql server connection successful. Thanks.
... View more
Labels:
- Labels:
-
Apache NiFi
-
NiFi Registry
08-31-2023
08:17 AM
@SAMSAL, hey I know I accepted the solution and it did work for when I had 1 user details to fetch and store it's values to the processor's attributes. I wanted to ask if it is possible to store multiple values to a single attribute of a processor since I now have many users' details to store. Is this possible otherwise I would have to change the logic? Thanks.
... View more
08-30-2023
02:57 AM
1 Kudo
Yes, I ended up changing my ExecuteScript in a way that all column's values are now attributes of my flowFile. Next, I have added PutSql processor and inserting data using ${attributename}. Thanks @SAMSAL for responding.
... View more
08-29-2023
01:30 PM
Thanks @SAMSAL for responding. I will explain what I am trying to accomplish. The ExecuteStreamCommand gives me below results: and I want to use displayName and mail key's values from this result and store it into the database. My current workflow is based on the flow that I will store these two key's value as a attribute and use it in the subsequent processors. However, using AttributestoJson aint also working for me. Can you suggest any other better appraoach to ingest these two values in my database? I have other columns' value to ingest that as well so may be ExecuteSQLCommand processor would be a better choice to use.
... View more