Member since
03-13-2025
3
Posts
0
Kudos Received
0
Solutions
03-15-2025
05:51 PM
Hi I'm running Apache Nifi 2.3.0 MS SQL EXPRESS JDBC Driver mssql-jdbc-12.8.1.jre11.jar I've configured Controller Service (DBCPConnectionPool 2.3.0). It was successfully enabled. Problem: When I try to configure any processor that uses DBCP, I don't see the connection pool. I tried different connection pools but facing the same issue. No sure what is causing this. Appreciate any help
... View more
Labels:
- Labels:
-
Apache NiFi
03-13-2025
10:49 PM
Thanks @DianaTorres . So, let me give more details about my issue. Below is how my process group look like: 1) GenerateFlowFile Processor: I define there the attributes that I want to pass in InvokeHTTP processor. This includes: Authorization content-type grant_type 2) LogAttribute-BeforeINVOKE: This processor is to log attributes in Logfile before HTTPInvoke 3) InvokeHTTP: This processor is where I make API call to get access_token. (Screenshots below). I've the property Request Body Enabled set as true. 4) LogAttribute-AFTERINVOKE: This processor is to log attributes in Logfile after HTTPInvoke My observations: If I make the request using curl "e.g. curl -X POST https://SERVER_NAME/auth/token -H "Content-Type: application/x-www-form-urlencoded;charset=UTF-8" -H "authorization: Basic CLIENT_SECRET_VALUE" -d "grant_type=client_credentials", I get access_token. I'm suspecting that InvokeHTTP processor when sending the request, some of the parameters might be not parsed properly because of special characters in content-type or authorization. I hope that @MattWho or @SAMSAL or @Shelton can help me with this. It's driving me crazy. Attributes of InvokeHTTP (SEND) Attributes of InvokeHTTP (ATTRIBUTES_MODIFIED)
... View more
03-13-2025
09:05 AM
Hi. I'm new to working with Apache Nifi. Currently, I've Apache Nifi 2.3.0 I'm trying to get access_token so that I can use it in future API calls. Currently, I use Postman to test getting access_token value and it works. I want to do this via Nifi. Here is what I setup Postman to get access_token I'm currently using Postman in order to call an API that generates access_token that I will use later to call other APIs. I want to do the same using Apachi Nifi 2.3.0. The Apache Nifi should generate a file called tokens.txt that contains the access token. Here is what I do in Postman: POST URL: https://URL/auth/token Headers: Content-Type: application/x-www-form-urlencoded;charset=UTF-8 Authorization: Basic <BASE_64_ENCODED_CLIENT_CREDENTIALS> Body: grant_type: client_credentials The response is in JSON format and contains the access token, expiration time of the access token. Here is an example response: { "access_token": "eyJ4NXQjUzI1NiI...KtK5elB38rcAbgFtVP9A", "token_type": "Bearer", "expires_in": 3600 } What do I need to achieve? I want to simulate the above in Apache Nifi where I get the access_token and then store it in a file. Every time a new access token arrives, it needs to re-write the value. I tried to use the following components GenerateFlowFile -> EncodeContent -> UpdateAttribute (headers and body) -> InvokeHTTP -> LogAttribute (API-Response) -> EvaluateJsonPath -> UpdateAttribute (filename) -> PutFile But for some reason, the InvokeHTTP was not working (not getting the response in JSON format).
... View more
Labels:
- Labels:
-
Apache NiFi