Submit your inspiring success story or innovative use case to the 2022 Dataiku Frontrunner Awards! ENTER YOUR SUBMISSION

Plugin to rename final datasets

Yasmine
Level 2
Plugin to rename final datasets

Hello,

Please, I need a plugin that renames all my final files of my project DSS stored in managed filesytem and put them under this name "old name-file_today" 

For example, if the name of a file is "Output-dataset", the new name will be "Output-dataset_17_02_2022"

 

Thank you in advance for your return,

Best regards,

Yasmine

0 Kudos
2 Replies
tgb417
Neuron
Neuron

@Yasmine ,

I’m not clear if there is a plugin that exists that does exactly what you are trying to do.  That said the Dataiku API should be able to do this with a few lines of code.  

below is the documentation 

https://doc.dataiku.com/dss/latest/python-api/managed_folders.html 

there are a number of conversations here in the community on similar topics.

--Tom
0 Kudos
HarizoR
Dataiker
Dataiker

Hi Yasmine,

Renaming Datasets is not often seen as a good practice since it will break other parts of the Flow (see for example this post  where a similar question was raised).

If your use-case is to somehow tag the "leaf nodes" of your Flow with the current date, you can follow the advice from the previously linked post and rely on Tags. Traversing the Flow programmatically is also possible using the corresponding Flow API. 

The final result could come in the form of a Macro that would update the tags of all relevant Datasets when executed. If needed, you can automate its execution through a Scenario, e.g. to run every day.

Hope this helps!

Best,

Harizo

0 Kudos