Project macro not returning Dataset selection
Hello,
I am trying to develop a macro that can be run from the project Macros menu. When I specify a DATASET parameter, the macro displays a list of datasets but doesn't return the value selected. Any ideas?
Here is the runnable.json file:
{ "meta": { "label": "Custom runnable test-dataset-param", "description": "Test dataset parameter", "icon": "icon-puzzle-piece" }, "impersonate": false, "params": [ { "name": "source_dataset", "label": "Source Dataset", "type": "DATASET", "description": "Specify the dataset", "mandatory": true } ], "permissions": [], "resultType": "HTML", "resultLabel": "Result label", "extension": "txt", "mimeType": "text/plain", "macroRoles": [{"type": "PROJECT_MACROS"}] }
For this test, in the runnable.py file I'm simply returning the whole config, i.e.: return self.config
I realize I can make this macro available in the dataset actions in the flow. That works. Maybe that's what I'll need to do but thought I'd explore whether the project macro approach could work as well as this would be my preferred approach.
Thanks,
Marlan
Best Answers
-
Hi,
The "DATASET" param type was buggy in DSS 6 and has been fixed in DSS 7
-
Hi,
Yes that's effective the bug with version 6. An update will solve your issue.
Cheers
Answers
-
Hi, what is the version of your DSS ?
When you say the macro does not return the value selected, is that in the config dict you don't see the "source_dataset" key ?
-
Marlan Neuron 2020, Neuron, Registered, Dataiku Frontrunner Awards 2021 Finalist, Neuron 2021, Neuron 2022, Dataiku Frontrunner Awards 2021 Participant, Neuron 2023 Posts: 319 Neuron
Thanks @Clément_Stenac
. OK sounds like this will work in v7.Marlan
-
Marlan Neuron 2020, Neuron, Registered, Dataiku Frontrunner Awards 2021 Finalist, Neuron 2021, Neuron 2022, Dataiku Frontrunner Awards 2021 Participant, Neuron 2023 Posts: 319 Neuron
Hi @duphan
,Yes, our version is 6.03 I believe.
The config dict is empty. It doesn't contain the key "source_dataset" let alone a value for that key.
Sounds like this may work in v7 per @Clément_Stenac
.Thanks,
Marlan
-
Marlan Neuron 2020, Neuron, Registered, Dataiku Frontrunner Awards 2021 Finalist, Neuron 2021, Neuron 2022, Dataiku Frontrunner Awards 2021 Participant, Neuron 2023 Posts: 319 Neuron
OK, thanks for confirming.
Marlan