Member since
07-08-2022
43
Posts
6
Kudos Received
1
Solution
My Accepted Solutions
Title | Views | Posted |
---|---|---|
1811 | 12-17-2022 10:54 PM |
07-21-2023
04:25 AM
Thanks @SAMSAL for recommending @MattWho
... View more
07-20-2023
10:22 PM
@MattWho wow. that worked as i'm expecting. so it won't merge the file till it has exact match file comes, right? and it won't fail either. if one of the file missed/delayed seems it is waiting till that file comes in. Thanks a lot Regards, pradeep
... View more
07-20-2023
08:11 AM
yes @SAMSAL , invoice number is unique, every time. Actually the input is single one i.e. JSON file will be converted to xml and pdf and later we need to implement this logic merging together and send it business. we need to merge in such a way same invoicenumber XML and pdf. and yes i've tried with filename as well in correlation attribute by giving ${filename:substringBeforeLast('.')} but no luck as well,
... View more
07-20-2023
12:07 AM
Yes @SAMSAL , Thanks for reply. yes i want to merge xml file + pdf file for each Invoice number. even i tried to merge using "Correlation Attribute Name" for ZIP merge strategy. its even merging for different invoice Numbers as well. Could you please suggest anything. note: i've filenames also same before the extentions(.xml and .pdf) ex: 1) BE01_915131_FR01111046_20230713_183211.pdf 2) BE01_915131_FR01111046_20230713_183211.xml
... View more
07-19-2023
11:52 AM
Hi , i've a flow where there two flows one for xml file and other for corresponding Pdf file. Currently i'm merging those using Mergecontent and generating the zip file out of it. by making sure minimum entries 2. if input files load are heavy the merge is not matching corresponding file means (same invoice file should be merged) but sometimes other invoice file merging due to big load from input at a time. i already implemented 10 secs delay for each flow and merging two files. is there a mechanism to merge files based on common attribute before mergecontent. Thanks in advance
... View more
Labels:
- Labels:
-
Apache NiFi
05-17-2023
11:31 AM
in Addition to above logic , if the input payload comes as below with number and Date combined in single array field. input: { "FatturaElettronicaBody": { "DatiGenerali": { "DatiGeneraliDocumento": { "TipoDocumento": "TD01", "Numero": "126587", "Data": "16.05.2023", "Divisa": "EUR", "ImportoTotaleDocumento": "7011.10" }, "DatiDDT": [ { "NumeroDDT": "126681-15.05.2023" }, { "NumeroDDT": "12680-10.05.2023" } ] } } } Used the spec below: [ { "operation": "modify-overwrite-beta", "spec": { "FatturaElettronicaBody": { "DatiGenerali": { "DatiDDT": { "*": { "b_NumeroDDT": "=split('[-.]',@(1,NumeroDDT))", "NumeroDDT": "@(1,b_NumeroDDT[0])", "DataDDT": "=concat(@(1,b_NumeroDDT[3]),'-',@(1,b_NumeroDDT[2]),'-',@(1,b_NumeroDDT[1]))" } } } } } }, { "operation": "shift", "spec": { "FatturaElettronicaBody": { "DatiGenerali": { "DatiGeneraliDocumento": "FatturaElettronicaBody.DatiGenerali.&", "DatiDDT": { "*": { "NumeroDDT": "FatturaElettronicaBody.DatiGenerali.DatiDDT[&1].NumeroDDT", "DataDDT": "FatturaElettronicaBody.DatiGenerali.DatiDDT[&1].Date" } } } } } } ] Output: { "FatturaElettronicaBody" : { "DatiGenerali" : { "DatiGeneraliDocumento" : { "TipoDocumento" : "TD01", "Numero" : "126587", "Data" : "16.05.2023", "Divisa" : "EUR", "ImportoTotaleDocumento" : "7011.10" }, "DatiDDT" : [ { "NumeroDDT" : "126681", "Date" : "2023-05-15" }, { "NumeroDDT" : "12680", "Date" : "2023-05-10" } ] } } }
... View more
05-11-2023
12:15 PM
Thanks @SAMSAL for the quick help. division got worked but after this division the value coming with 2 decimal values , where as i needed 8 decimal points after the dot. so far that i've used below logic in the same spec. but its giving empty value. "ScontoMaggiorazione": { "*": { "first_Importo": "=divide(@(1,Importo),@(3,Quantita))", "array_importo": "=split('.',@(1,first_Importo))", "pad_importo": "=rightPad(@(1,array_importo[1]), 8, '0')", "Importo": "=concat(@(1,array_importo[0]),'.',@(1,pad_importo))" } any idea on this too?
... View more
05-11-2023
11:16 AM
i'm trying to perform Importo= importo/Quantita for each line item value. but unable get the division even though i've used =divide function. Could you please help me input: { "FatturaElettronicaBody": { "DatiBeniServizi": { "DettaglioLinee": [ { "NumeroLinea": 1, "Quantita": "3.0", "PrezzoUnitario": "311.55000000", "AliquotaIVA": "22.00", "ScontoMaggiorazione": [ { "Tipo": "SC", "Percentuale": "28.00", "Importo": "261.69" } ], "Descrizione": "B66450458 SACCA DA GOLF", "PrezzoTotale": "672.96000000" }, { "NumeroLinea": 2, "Quantita": "1.00000000", "PrezzoUnitario": "311.55000000", "AliquotaIVA": "22.00", "ScontoMaggiorazione": [ { "Tipo": "SC", "Percentuale": "28.00", "Importo": "87.23000000" } ], "Descrizione": "B66450458 SACCA DA GOLF", "PrezzoTotale": "224.32000000" }, { "NumeroLinea": 3, "Quantita": "1.00000000", "PrezzoUnitario": "311.55000000", "AliquotaIVA": "22.00", "ScontoMaggiorazione": [ { "Tipo": "SC", "Percentuale": "28.00", "Importo": "87.23000000" } ], "Descrizione": "B66450458 SACCA DA GOLF", "PrezzoTotale": "224.32000000" }, { "NumeroLinea": 4, "Quantita": "3.00000000", "PrezzoUnitario": "2150.00000000", "AliquotaIVA": "22.00", "ScontoMaggiorazione": [ { "Tipo": "SC", "Percentuale": "16.00", "Importo": "1032.00000000" } ], "Descrizione": "A205330410780 INGRANAGGI E DIFFER. ANT.", "PrezzoTotale": "5418.00000000" }, { "NumeroLinea": 5, "Quantita": "7.00000000", "PrezzoUnitario": "202.96000000", "AliquotaIVA": "22.00", "ScontoMaggiorazione": [ { "Tipo": "SC", "Percentuale": "19.00", "Importo": "269.92000000" } ], "Descrizione": "A6510108918 COPERCHIO TESTATA CIL.", "PrezzoTotale": "1150.80000000" } ] } } } Jolt Spec: [{ "operation": "modify-overwrite-beta", "spec": { "FatturaElettronicaBody": { "DatiGenerali": { "DatiBeniServizi": { "DettaglioLinee": { "*": { "ScontoMaggiorazione": { "*": { "Importo": "=divide(@(1,Importo),@(1,Quantita))" } } } } } } } } }, { "operation": "shift", "spec": { "FatturaElettronicaBody": { "DatiBeniServizi": { "DettaglioLinee": { "*": { "NumeroLinea": "FatturaElettronicaBody.DatiBeniServizi.DettaglioLinee[&1].NumeroLinea", "Descrizione": "FatturaElettronicaBody.DatiBeniServizi.DettaglioLinee[&1].Descrizione", "Quantita": "FatturaElettronicaBody.DatiBeniServizi.DettaglioLinee[&1].Quantita", "PrezzoUnitario": "FatturaElettronicaBody.DatiBeniServizi.DettaglioLinee[&1].PrezzoUnitario", "ScontoMaggiorazione": { "*": { "Importo": "FatturaElettronicaBody.DatiBeniServizi.DettaglioLinee[&3].ScontoMaggiorazione[&3].Importo" } } } } } } } }]
... View more
Labels:
- Labels:
-
Apache NiFi
05-08-2023
12:52 PM
thank you so much for the quick help @SAMSAL .
... View more
05-08-2023
11:45 AM
@SAMSAL , Could you please help on this
... View more