Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Como tranformar um JSON em varios flow files?

avatar
New Contributor

Ex: como gerar através deste Json abaixo e gerar 4 flow files?

[ {
"ID_WA_DESTINATARIO" : "5599999999999",
"DES_MENS_NMO" : "Você está recebendo anexa 1a via de sua fatura.",
"COD_IDEN_MENS_ENV_NMO" : "xptoqwerzxcv"
}, {
"ID_WA_DESTINATARIO" : "5599999999999",
"DES_MENS_NMO" : "Você está recebendo anexa 1a via de sua fatura.",
"COD_IDEN_MENS_ENV_NMO" : "xptoqwerzxcvb"
}, {
"ID_WA_DESTINATARIO" : "5599999999999",
"DES_MENS_NMO" : "Você está recebendo anexa 1a via de sua fatura.",
"COD_IDEN_MENS_ENV_NMO" : "xptoqwerzxcvc"
}, {
"ID_WA_DESTINATARIO" : "5599999999999",
"DES_MENS_NMO" : "Você está recebendo anexa 1a via de sua fatura.",
"COD_IDEN_MENS_ENV_NMO" : "xptoqwerzxcvd"
} ]

 

1 ACCEPTED SOLUTION

avatar
Explorer

Tu vai usar o processor SplitJson e na propriedade "JsonPath Expression" tu vai colocar "$"(sem aspas).

View solution in original post

3 REPLIES 3

avatar
Explorer

Tu vai usar o processor SplitJson e na propriedade "JsonPath Expression" tu vai colocar "$"(sem aspas).

avatar
New Contributor

Good, muito obrigado @GCaixeta !!

Se alguém mais tiver a mesma duvida, segue abaixo como ficou o processor SplitJSON:

Pigarri_0-1631895538220.png

 

avatar
Community Manager

English Translation:

Question: 

How to transform a JSON into multiple flow files?

Ex: how to generate through this Json below and generate 4 flow files?

[ {
"ID_WA_REcipient" : "5599999999999",
"DES_MENS_NMO" : "You are receiving the 1st copy of your invoice.",
"COD_IDEN_MENS_ENV_NMO" : "xptoqwerzxcv"
}, {
"ID_WA_REcipient" : "5599999999999",
"DES_MENS_NMO" : "You are receiving the 1st copy of your invoice.",
"COD_IDEN_MENS_ENV_NMO" : "xptoqwerzxcvb"
}, {
"ID_WA_REcipient" : "5599999999999",
"DES_MENS_NMO" : "You are receiving the 1st copy of your invoice.",
"COD_IDEN_MENS_ENV_NMO" : "xptoqwerzxcvc"
}, {
"ID_WA_REcipient" : "5599999999999",
"DES_MENS_NMO" : "You are receiving the 1st copy of your invoice.",
"COD_IDEN_MENS_ENV_NMO" : "xptoqwerzxcvd"
}]

 

Solution

You will use the SplitJson processor and in the property "JsonPath Expression" you will put "$" (without quotes).



Regards,

Vidya Sargur,
Community Manager


Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.
Learn more about the Cloudera Community: