how to generate JSON from type select

ananth
Level 3
how to generate JSON from type select

we have created dss plugin with macros and we have runnable.json where we create UI and one of the requirement is to list users where we have users list from excel how to generate JSON from that same 

sample json as below, so now this JSOn is not accepted so we have to manually edit JSON that supports in DSS, we have around 1000 array objects but it is not feasible how to achieve this?

{
"label": "abc",
"options": [{
"label": "dss_training",
"value": "t::dss_training"
}
]
}, {
"label": "xyz",
"options": [{
"label": "dss_d",
"value": "id::dss_d"
}, {
"label": "dss_p",
"value": "id::dss_p"
}, {
"label": "dss_training",
"value": "id::dss_training"
}
]
}

7 Replies
ananth
Level 3
Author

Hi @Madhuri let me check

0 Kudos
CoreyS
Dataiker Alumni

What do you think @Marlan ?

Looking for more resources to help you use Dataiku effectively and upskill your knowledge? Check out these great resources: Dataiku Academy | Documentation | Knowledge Base

A reply answered your question? Mark as โ€˜Accepted Solutionโ€™ to help others like you!
0 Kudos
Marlan

Hi, it sounds like issue is populating a select item in the macro UI from a list of around a 1000 users. So it doesn't seem to be same issue I was running into. 

Maybe the option to populate a select item from Python as described in the documentation (i.e., getChoicesFromPython) would be the way to go. Seems like a good fit for this use case.

Marlan 

 

  

ananth
Level 3
Author

hi @Marlan , thank you , i tried getChoicesFromPython and getting some error, as we have runnable.json for all UI controls, can we use getChoicesFromPython for just one dropdown? if we have multiple on same page?

 

any examples would help

0 Kudos
Marlan

Sorry, I don't have any examples as I have not used the Python option. Seems like it should work in your case but again, I haven't done it. 

Marlan

0 Kudos
ananth
Level 3
Author

thank you @Marlan let me check

0 Kudos