Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
KMG
Contributor
Contributor

Store creating sun folders I don’t want

I am taken a set of yearly data with a date field in each record and writing(store) to a daily qvd. This was supposed to result in multiple daily qvds at the destination folder. Oddly, the app is creating many sun folders that I don’t want. The sun folders are being named a single numeric character.  I appreciate any help. Kevin

Labels (1)
1 Solution

Accepted Solutions
vincent_ardiet_
Specialist
Specialist

You should maybe reformat the date, if it contains slashes, this will be seen as sub folders. For example:

// Store the temporary table as a QVD with the desired filename
LET DestinationFile = '$(DestinationPath)'&Date('$(DateCompleted)','YYYYMMDD')&'_QPEDaily.qvd';
STORE TempTable INTO [$(DestinationFile)](qvd);

View solution in original post

4 Replies
Anil_Babu_Samineni

One example can help to offer something?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
KMG
Contributor
Contributor
Author

Please excuse the typo.  Sun folders should read Sub-Folders.  , not sure what you are saying.... thanks. 

 

Here is an example of the script i am using:

// Set the source and destination paths
SET SourcePath = 'lib://Claims Training Folder/CTT/QVD/QPECleanup/';
SET DestinationPath = 'lib://Claims Training Folder/CTT/QVD/QPECleanup/TempQPE/';


// Load the source QVD
QPECleanup:
LOAD * FROM [$(SourcePath)TempQPE.qvd](qvd);

// Iterate over unique Date Completed values
FOR EACH DateCompleted IN FieldValueList('Date Completed')
// Create a temporary table for each Date Completed value
TempTable:
NOCONCATENATE LOAD *
RESIDENT QPECleanup
WHERE [Date Completed] = '$(DateCompleted)';

// Store the temporary table as a QVD with the desired filename
LET DestinationFile = '$(DestinationPath)$(DateCompleted)_QPEDaily.qvd';
STORE TempTable INTO [$(DestinationFile)](qvd);

// Drop the temporary table
DROP TABLE TempTable;
NEXT

 

The data files i receive are working, but they are saved in many sub-folders versus all the main destination folder. 

 

 

 

vincent_ardiet_
Specialist
Specialist

You should maybe reformat the date, if it contains slashes, this will be seen as sub folders. For example:

// Store the temporary table as a QVD with the desired filename
LET DestinationFile = '$(DestinationPath)'&Date('$(DateCompleted)','YYYYMMDD')&'_QPEDaily.qvd';
STORE TempTable INTO [$(DestinationFile)](qvd);

KMG
Contributor
Contributor
Author

Thank you, Vincent. This worked for me.