Project macro not returning Dataset selection

Solved!
Marlan
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
2 Solutions
Clรฉment_Stenac

Hi,

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

View solution in original post

0 Kudos
duphan
Dataiker

Hi,

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

Cheers

View solution in original post

6 Replies
Clรฉment_Stenac

Hi,

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

0 Kudos
Marlan
Author

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

Marlan

0 Kudos
duphan
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
Marlan
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
duphan
Dataiker

Hi,

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

Cheers

Marlan
Author

OK, thanks for confirming.

Marlan