Talend: parse JSON string to multiple output -


i'm aware of this question don't believe there no solution standars component. i'm using talend esb studio 5.4.

i have parse json string rest web service multiple output, , add them database.

database has 2 tables:

  • user (user_id, name, card, card_id, points)
  • action (user_id, action_id, description, used_point)

my json structure that:

{     "users": [         {             "name": "foo",             "user_id": 1,             "card": {                 "card_id": "aaa",                 "points": 10             },             "actions": [                 {                     "action_id": 1,                     "description": "buy",                     "used_points": 2                 },                 {                     "action_id": 3,                     "description": "buy",                     "used_points": 1                 }             ]         },         {             "name": "bar",             "user_id": 2,             "card": {                 "card_id": "bbb",                 "points": -1             },             "actions": [                 {                     "id": 2,                     "description": "sell",                     "used_point": 5                 }             ]         }     ] } 

i have tried add json schema metadata not clear me how "flat" json. have tried @ txmlmap, textractjsonfields.. no luck till now. had @ tjavarow don't understand how make schema that.

it's pity because till i'm loving talend! advice?

you can save json file in disk, create new json file in metadata of talend studio, wizard retrieve schema you, after saving, ca, copie schema in generic schema of metadata, , it's done, use generic schema want, how use generic schema in trestclient component:

enter image description here


Comments