Community Conundrum 25:Feature Visualization is now live! Read More

Project macro not returning Dataset selection

Level 4
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 

 

0 Kudos
6 Replies
Dataiker
Dataiker

Hi,

The "DATASET" param type was buggy in DSS 6 and has been fixed in DSS 7

0 Kudos
Level 4
Author

Thanks @Clément_Stenac. OK sounds like this will work in v7.

Marlan

0 Kudos
Dataiker
Dataiker

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  ? 

0 Kudos
Level 4
Author

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

0 Kudos
Dataiker
Dataiker

Hi,

Yes that's effective the bug with version 6. An update will solve your issue.

Cheers

Level 4
Author

OK, thanks for confirming.

Marlan