Loading multiple files data in to a cube using 1 TI Process

Post Reply
gandikota
Posts: 9
Joined: Fri Mar 21, 2014 11:19 am
OLAP Product: Cognos TM1,Cognos Reporting
Version: 10.2
Excel Version: 10.2

Loading multiple files data in to a cube using 1 TI Process

Post by gandikota »

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.
lotsaram
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

Post by lotsaram »

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.
declanr
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

Post by declanr »

Code: Select all

sFiles = sOutputFolder | '\*.csv';
sStrFile = WildcardFileSearch ( sFiles, '' );
While ( sStrFile @<> '');
	ExecuteProcess ( sSubprocess, 'pFile', sStrFile, 'pStrPath', sOutputFolder | '\' );
	sStrFile = WildcardFileSearch ( sFiles, sStrFile );
End;
Something along the lines of the above; or you can pass it into the sub process via a global variable instead of a parameter.
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
Post Reply