RISE to Bloome Software
Log In    
Home
RISE
Marshal
Download
 
 
r2bsoftware.se r2bsoftware.se
 
 
 
Click to hide navigation tree

Output and Export Folder Naming

When modeling your data extraction, you may want to configure how the information should be stored on the disk when exported. By default all the exported information ends up in one export file. In many cases this is the desired behaviour, but in some cases, you prefer a folder hierarchy to hold your information. To edit the folder naming convention, select the Export Folder Naming property of the root node and click on the ellipsis button.

When exporting all data to one export file, you must specify a Root Element, see image 1. The reason for this is of course that Xml requires one, and only one, root element. You can see the result of exporting to one file in image 7. If, instead, you add a folder naming convention, you should not add a Root Element. The reason for this is that you will get one export file for each result of the top level query. In the case of the model in image 1, Artist will be the root node in the exported files. The result of an export, using folder naming conventions, is found in image 6.

Select the Export Folder Naming property
Image 1, The Export Folder Naming and Root Element properties


Marshal can create a folder structure based on the information retrieved in the root level query, i.e. you can use the data retrieved in the model root node columns when naming your folders. This is accomplished by adding a folder naming convention.  If you do not enter any folder naming rules, or if you disable folder naming, all data will be exported into one export file.

Using the model in image 1, we export information about artists and their music using public web services. In this example we want to create one folder for each artist, and name the folder after the artist. 

Configure your folder naming
Image 2, The Export Folder Naming form

A - Basic configuration
Default column value If the harvested column is empty, the default column value property will be used for naming of the folder.
Enabled You may disable folder naming without having to delete your configuration.
B - Parts
0 - Structure column Select a column/leaf of the root node. The value of the leaf at runtime is used to name the folder/directory.
1 - Integer counter Select true to add an integer counter to the name of your folder.
2 - Date and Time Select true to add date and time to the name of your folder.
3 - Guid Select true to add a Guid to the name of your folder.
C - Format
NameFormat The format string used to compose the folder name. When selecting parts, see above, Marshal assists you by updating the format string. You may edit the format string as you desire. Read more about format strings.
D - Invalid characters
Replace X with If the resulting folder name contains invalid characters, you may configure how these characters should be replaced.


You may have any depth of your folder tree. To add a sub folder, right click on the folder in the tree view and select New Folder.

Add a new folder
Image 3, Add a new folder


When executing the example model, see image 1, the information about each artist will be exported to their respective folder.


Export the information
Image 4, execute the export.

By adding the export filter query=artist:stones, we have limited our result set to all artists where the name of the artist contains the word stones. Since we are using a folder naming convention, one export file will be created for each artist. However, we will also gen an index file, referencing all export files.


Index file
Image 5, The Index file

If we open the export file for the artist 12 Stones, the exported information would look like this.

One exported artists
Image 6, The exported information about the artist 12 Stones

If we choose to export all the information to one export file, i.e. if we do not configure a folder naming convention, the result would look like this. In this case we would not get an index file, since all the information is already in one file.


One export file
Image 7, All artists exported to one export file.