Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi,
I have a table which contains JSON data for one column for which i need to anonymise. Tried using t Data mask component and read the data from table as a context variable and would like to mask that data. ( replace entire table with default data for that JSON column alone )
While doing that getting below error:
Exception in component tDataMasking_1
java.lang.NullPointerException
Please let me know how it can be done.
Regards,
Venu
Hi,
Could you please share the screen shot of the job and the problematic component for analysis?
Warm Regards,
Nikhil Thampi
Hello,
I have tried even using a tMap component by manually passing the json data and tried updating the table, but still getting error.
Let me know how we can handle json data using Talend. I mean by using which component we can anonymise JSON data.
sample data:
[{
"accountNumber": numeric,
"sortCode": numeric,
"rollNumber": string,
"accountHolder": string
}]
Regards,
Venu
Hi Venu,
I am assuming that your sample data is as below.
[{
"accountNumber": 12345678,
"sortCode": 234567,
"rollNumber": "abc",
"accountHolder": "Nikhil"
}]
You can read them with tfileinputJSON as shown below.
job flow and configuration
schema
tlogrow output
Warm Regards,
Nikhil Thampi
Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Hi,
If you want to add data masking, select the corresponding function as below.
Warm Regards,
Nikhil Thampi
Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Hi Nikhil,
Thanks for the solution provided, however I am trying to extract the data from table using TOracleDBinput but when I am trying to connect these 2 components ( tdbinput and tfileinputjson) its not allowing to me to connect these components.
May I know why this is happening. I have other fields as well in the table which i need to mask along with account details, in that case I need to extract the data from table using tdbinput.
Please let me know how can I approach to this.
Regards,
Venu
Hi nikhil,
I also need to update my table for the field ACCT_DET which contains all the above said entities. So from the output of Tdatamask component how can i update my table.
Lets say I have table called ABC in which ID is PK, and few other fields and ACCT_DET is one of the field in which it contains "sortcode","accountnumber","rollnumner","accountholder". So with Tdatamask Component I was able to mask these data, but how should I combine them and update my table based on ID ??
Please let me know.
Regards,
Venu
Hi Venu,
If you are using a tOracleInput, then you will have to add a tExtractJSONFields component to parse the inbound JSON column and to get the output data. The methodology to parse the fields inside the tExtractJSONFields remain same as my above example. For transferring the other components from tOracleInput, you will have to send them as a pass through field (without mapping to any inbound JSON field).
Warm Regards,
Nikhil Thampi
Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Hi,
Coming to your last query about recreating a JSON field with masked values, you can use tWriteJSONfield component in Talend. This component will help to convert the inbound fields to be converted to a JSON field You can plug this field after tDataMask component.
There are examples about how to do it in help.talend.com for each of these components. I would suggest you to practice those examples first before attempting to your real world scenario. If you get stuck even after performing all those steps, please feel free to come back with job screenshots, component screen shots, sample data and expected data etc. so that our Talend community members can look into it.
Since it is a different topic, I would suggest to mark the current topic as closed since we have provided the solution to your initial query and open a new post. In this way, the topic will remain focused on a single query and other community members will not get confused by the length of the post.
Last but not least, please don't forget to give kudos It will hardly take one second for you but it is a way of appreciating Talend members for volunteering their time for your query in between their busy schedule.
Warm Regards,
Nikhil Thampi
Could you please mark the topic as resolved as I have already answered your queries?
Warm Regards,
Nikhil Thampi
Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂