Skip to main content

I need to insert map in empty-list using expression, how to achieve it in streamsets.

 

emptyList(), emptyMap() functions I have tried but no luck.

Can anyone help me please.

 

Ex:-

p

{

“list”: 1

}

]

@Priyanka Mynepally 

 

is it fine if we convert map to list using jython evaluator? The below code snippet will convert map to list .

 

Kindly let me know what is your requirement in details , I mean the input and out you are expecting for , so i can give a try and will let you know on the same.

 

import json
for record in sdc.records:
  l=]
  for (key,val) in record.value.iteritems():
      l += key, val]
  record.value=l
  output.write(record)


Reply