Hi All,
Please help me out as i need to load multiple files in to a cube using a single TI Process.Assuming all files will be available in one folder.I had checked TM1 refernce doc and find out there is a function WildcardFileSearch to implement this.
Does any one send a snippet for this.Thanks in advance.
Loading multiple files data in to a cube using 1 TI Process
-
- MVP
- Posts: 3705
- Joined: Fri Mar 13, 2009 11:14 am
- OLAP Product: TableManager1
- Version: PA 2.0.x
- Excel Version: Office 365
- Location: Switzerland
Re: Loading multiple files data in to a cube using 1 TI Proc
In the Bedrock library the processes Bedrock.Cube.View.Delete or Bedrock.Dim.Sub.Delete should give you a pretty good example of how to use WildCardFileSearch.
Please place all requests for help in a public thread. I will not answer PMs requesting assistance.
-
- MVP
- Posts: 1831
- Joined: Mon Dec 05, 2011 11:51 am
- OLAP Product: Cognos TM1
- Version: PA2.0 and most of the old ones
- Excel Version: All of em
- Location: Manchester, United Kingdom
- Contact:
Re: Loading multiple files data in to a cube using 1 TI Proc
Code: Select all
sFiles = sOutputFolder | '\*.csv';
sStrFile = WildcardFileSearch ( sFiles, '' );
While ( sStrFile @<> '');
ExecuteProcess ( sSubprocess, 'pFile', sStrFile, 'pStrPath', sOutputFolder | '\' );
sStrFile = WildcardFileSearch ( sFiles, sStrFile );
End;
You can either have a different process to load the data and a master process to call or just build an iterative process that keeps calling itself until it runs out of files.
Declan Rodger