Icon

JKISeason3-8

Filtering Redundant Folder References

Challenge 8
Level: Medium

Description: You are reorganizing a data warehouse in your company, working with a filesystem that creates parent folders if you give it a reference for a child folder. For example, if you ask the filesystem to create “folder1/folder2” and neither folder1 or folder2 exist, it will create both, with folder2 inside folder1, without raising an error. Given a list of folders, you want to keep only the longest unique child folders, filtering out references to parent folders that will be generated anyway for efficiency.

Here's an example of an initial list of folders:

- folder1/folder3
- folder1/folder3/folder22
- folder1/folder3/folder22/folder47

After executing your workflow, the list above should only contain a reference for folder1/folder3/folder22/folder47.

Author: Emilio Silvestri

Node 41Node 42Node 43Node 44Node 45Node 46Node 47Node 48Node 49Node 50Node 51Node 52Node 53Node 54Node 55Node 56Node 57Node 58Node 59DatasetNode 62Node 63Node 65PathNode 67Node 68Row Splitter Concatenate RecursiveLoop Start Empty Table Switch Table Rowto Variable CASE Switch End Sorter String Manipulation Recursive Loop End Column Filter Path to String(Variable) Column Filter ConstantValue Column Row Aggregator Table Rowto Variable Math Formula String Manipulation Column Renamer Row Filter Table Reader String Manipulation String to Path(Variable) Create Folder Variable Creator Variable Loop End Table Row toVariable Loop Start Node 41Node 42Node 43Node 44Node 45Node 46Node 47Node 48Node 49Node 50Node 51Node 52Node 53Node 54Node 55Node 56Node 57Node 58Node 59DatasetNode 62Node 63Node 65PathNode 67Node 68Row Splitter Concatenate RecursiveLoop Start Empty Table Switch Table Rowto Variable CASE Switch End Sorter String Manipulation Recursive Loop End Column Filter Path to String(Variable) Column Filter ConstantValue Column Row Aggregator Table Rowto Variable Math Formula String Manipulation Column Renamer Row Filter Table Reader String Manipulation String to Path(Variable) Create Folder Variable Creator Variable Loop End Table Row toVariable Loop Start

Nodes

Extensions

Links