Member since
01-07-2026
2
Posts
0
Kudos Received
0
Solutions
01-07-2026
07:32 PM
By changing `Suppress Null Values` to `Always Suppress` the problem get solved, now by removing nulls, Nifi writes correct JSON to database, but now the question is why? Why did solve the issue? was that intentional or a accidental side effect? Will it behave the same in future releases?
... View more
01-07-2026
05:17 PM
I have a process which creates a big JSON (the content is between 5k to 400k), (and has embedded objects, arrays, arrays of objects....) my flow-file has an attribute, named ETL_ID, I want to persist the JSON to a CLOB column of an Oracle table. Well using standard PutSQL won't work as JSON content is more than 4000 chars. With some JOLT transformers I converted the content of flow file to something like: { "ID": 1234, // ETL_ID "REQUEST": { the very big json } } then I used PutDatabaseRecord processor to write it down, but then instead of JSON something like MapRecord[{ContractId=null, PrintDocumentNo=1402/101/53034/53034/6, CompanyLifeProposalNo=qsn-190, InsurerId=116118216, FieldId=501, BranchId=null, AgencyId=130946, IntroducerBrokerId=null, IntroducerBranchId=null, IntroducerAgencyId=130946, BeginDate=2023-09-05, EndDate=2033-09-05, IssueDate=2023-09-05, PaymentType=233, Installment=10, InstallmentPeriod=242, Salary=null, SalaryPremiumPercentage=null, GuaranteedProfitCeiling=229, LicenceNo=null, LicenceRegisterDate=null, LicenceExpireDate=null, PostalCode=null, Insureds=[Ljava.lang.Object;@2ac5e7fb, Beneficiaries=[Ljava.lang.Object;@6cf36437, InsuredCoverages=[Ljava.lang.Object;@211a9f0a, AnnualCalculations=[Ljava.lang.Object;@49a84289}] as you can see for nested Objects, and Arrays the toString() of them is written! is written to the CLOB field, the problem is everything was okay with Nifi 2.0.0, but it does not work with Apache Nifi 2.7.1.
... View more
Labels:
- Labels:
-
Apache NiFi