Member since
07-08-2022
40
Posts
4
Kudos Received
1
Solution
My Accepted Solutions
Title | Views | Posted |
---|---|---|
1806 | 12-17-2022 10:54 PM |
08-05-2024
10:53 AM
@SAMSAL , Thanks for the reply but our current nifi version is 1.23.2 , where it doesn't have that completion strategy. So thinking of implementing executeScript or executeStreamcommand in order to delete the files from SMB after fetchSMB. Please let me know if you have any suggestions for this script , nifi hosted on kube clusters and i've credentials for SMB as well.
... View more
07-16-2024
05:18 AM
1 Kudo
@PradNiFi1236 Not much information provided here for investigation use. What is the jar that is causing issue? How is the jar execution being invoked? What is the full exception being encounter (is there a stack trace with the exception?) If you install JDK 1.8.0_312 and launch Apache NiFi 1.17 using that JDK version, does the issue persist? Please help our community thrive. If you found any of the suggestions/solutions provided helped you with solving your issue or answering your question, please take a moment to login and click "Accept as Solution" on one or more of them that helped. Thank you, Matt
... View more
03-13-2024
11:54 AM
2 Kudos
@SAMSAL , After i added escaping to $ with double slash it got worked in shift too. "#\\${netval}": "&3[&2].&1" thanks a lot again
... View more
11-09-2023
09:55 AM
@SAMSAL , thanks for the quick response. As always you do.
... View more
10-31-2023
11:43 PM
Thanks A lot as Always @SAMSAL for answering all my Jolt Doubts and sharing the knowledge with detailed explanation. I've huge jolt this is one part of it, whenever i'm posting for only one specific issue always. Yeah i know this is hardest part to understand italian chars, the input is english and we are converting to italian whatever i've posted above is second jolt which i'm using. i would have given less input instead of all line items. sorry for that one doubt it is why modify-overwrite-beta logic is not working if i place this above Shift,
... View more
10-12-2023
08:21 AM
Hi All in jolt i've specification that i've input as data headers and corresponding line items. now i need to add extra(append) line item(with same names but random values) to the existing line items based on one attribute value in the input. input: { "data": { "overview": { "shipmentDetails": { "additionalCosts": "45,00" } }, "items": [ { "pos": 1, "partNoDescriptionCode": { "partNo": "A205330410780", "description": null, "customsNumber": "870899970", "countryOfOrigin": "DE", "netWeight": "12,45 KG", "additionalInformation": null, "ecotaxLine": null, "chargeCode": null, "ecoTaxDescription": null }, "orderNumberDeliveryNote": { "orderNumber": "INV 06.2", "deliveryNoteNumber": "211347", "deliveryNoteDate": "28.07.2023" }, "invoiceReturnData": null, "quantity": "2,00", "nspType": "6", "pricePerUnit": "2.181,66", "listPriceInvoiced": "1.745,33", "totalPriceTaxPercentage": { "totalPrice": "4.363,32", "taxPercentage": "0,00%" }, "svhcIndicator": null, "orderReference": null, "originDeliveryNoteId": null, "discountPromotion": { "discount": "872,66", "discountPercentage": "20,00%", "promotionPercentage": "0,00%" }, "invoiceValue": "3.490,66", "ecoTaxValue": "0,00", "c-CodeDivisionCode": { "divisionCode": "CC", "c-Code": [ " " ] } } ] } } Spec: [ { "operation": "shift", "spec": { "data": { "overview": { "shipmentDetails": { "additionalCosts": { "0,00": { "*": "" }, "*": { "#0": "FatturaElettronicaBody.DatiBeniServizi.DettaglioLinee.NumeroLinea", "#dettaglio 1": "FatturaElettronicaBody.DatiBeniServizi.DettaglioLinee.Descrizione", "#1": "FatturaElettronicaBody.DatiBeniServizi.DettaglioLinee.Quantita", "@(2,additionalCosts)": ["FatturaElettronicaBody.DatiBeniServizi.DettaglioLinee.PrezzoUnitario", "FatturaElettronicaBody.DatiBeniServizi.DettaglioLinee[&1].PrezzoTotale"], "AliquotaIVA": "FatturaElettronicaBody.DatiBeniServizi.DettaglioLinee.AliquotaIVA" } } } }, "items": { "*": { "@(4,data.overview.shipmentDetails.taxCodeCustomer)": { "8": { "#N3.5": "FatturaElettronicaBody.DatiBeniServizi.DettaglioLinee[&2].Natura", "#INTENTO": "FatturaElettronicaBody.DatiBeniServizi.DettaglioLinee[&2].AltriDatiGestionali[&2].TipoDato" }, "1": { "#N3.2": "FatturaElettronicaBody.DatiBeniServizi.DettaglioLinee[&2].Natura" }, "4": { "#N3.1": "FatturaElettronicaBody.DatiBeniServizi.DettaglioLinee[&2].Natura" }, "*": { "*": "" } }, "pos": "FatturaElettronicaBody.DatiBeniServizi.DettaglioLinee[&1].NumeroLinea", "quantity": "FatturaElettronicaBody.DatiBeniServizi.DettaglioLinee[&1].Quantita", "pricePerUnit": "FatturaElettronicaBody.DatiBeniServizi.DettaglioLinee[&1].PrezzoUnitario", "totalPriceTaxPercentage": { "taxPercentage": "FatturaElettronicaBody.DatiBeniServizi.DettaglioLinee[&2].AliquotaIVA" }, "discountPromotion": { "Tipo": "FatturaElettronicaBody.DatiBeniServizi.DettaglioLinee[&2].ScontoMaggiorazione[&2].&", "discountPercentage": "FatturaElettronicaBody.DatiBeniServizi.DettaglioLinee[&2].ScontoMaggiorazione[&2].Percentuale", "discount": "FatturaElettronicaBody.DatiBeniServizi.DettaglioLinee[&2].ScontoMaggiorazione[&2].Importo" }, "partNoDescriptionCode": { "partNo": "FatturaElettronicaBody.DatiBeniServizi.DettaglioLinee[&2].Descrizione" }, "invoiceValue": "FatturaElettronicaBody.DatiBeniServizi.DettaglioLinee[&1].PrezzoTotale" } } } } } ] Output: { "FatturaElettronicaBody" : { "DatiBeniServizi" : { "DettaglioLinee" : [ { "NumeroLinea" : 1, "Quantita" : "2,00", "PrezzoUnitario" : "2.181,66", "AliquotaIVA" : "0,00%", "ScontoMaggiorazione" : [ { "Percentuale" : "20,00%", "Importo" : "872,66" } ], "Descrizione" : "A205330410780", "PrezzoTotale" : "3.490,66" } ] } } } what i expect output as below. { "FatturaElettronicaBody" : { "DatiBeniServizi" : { "DettaglioLinee" : [ { "NumeroLinea" : 0, --(default value) "Descrizione" : “dettaglio 1",--(default value) "Quantita" : “1.00000000",--(default value) "PrezzoUnitario" : "183.97000000",(additional cost) "PrezzoTotale" : "367.94000000",(same value asprezzoUnitario) "AliquotaIVA" : "22.00" } , { "NumeroLinea" : 1, "Quantita" : "2,00", "PrezzoUnitario" : "2.181,66", "AliquotaIVA" : "0,00%", "ScontoMaggiorazione" : [ { "Percentuale" : "20,00%", "Importo" : "872,66" } ], "Descrizione" : "A205330410780", "PrezzoTotale" : "3.490,66" } ] } } } @SAMSAL , Could you please help on this, thank you!1
... View more
Labels:
- Labels:
-
Apache NiFi
10-10-2023
12:13 PM
I dont think you can use the same jolt spec for two different schema. Jolt spec doesnt allow you to use the same key multiple times. You have to know beforehand what schema are you getting then direct to different jolt transformation processor , or store the spec dynamically in an attribute to pass it to single jolt processor
... View more
07-21-2023
04:25 AM
Thanks @SAMSAL for recommending @MattWho
... View more
06-25-2023
12:21 PM
Apache PDFBox is supposed to allow you to merge PDF content. Since this is a Java library you can create a scripted Groovy processor to merge the files for you. https://pdfbox.apache.org https://javadoc.io/doc/org.apache.pdfbox/pdfbox/2.0.27/index.html
... View more
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