Executing .bat file TM1 TI to AWS S3 Bucket

Post Reply
Crayola
Posts: 9
Joined: Thu Apr 02, 2020 1:52 am
OLAP Product: TM1
Version: 11.7.0.42
Excel Version: 2002

Executing .bat file TM1 TI to AWS S3 Bucket

Post by Crayola »

Hi all,

I've tried pushing data from TM1 directly into Redshift via ODBC connection. It works however it takes way too long. I've been offered an alternative solution by the data engineers.

I am exporting the required data from TM1 into a CSV and then executing a batch file to push the data up into the S3 bucket

If i execute the batch file from the TM1 server it works fine however i am having issues trying to execute the command from the TI process

TM1:

Code: Select all

sCommand= 'cmd /c E:\Scripts\upload_core_to_s3.bat';
ExecuteCommand(sCommand,0); 
Batch file to push to S3:

Code: Select all

forfiles /P "E:\Temp\Core_SKU" /M *.csv /D +0 /C "cmd /c aws s3 cp @path s3://upload-to-bi-redshift/merchandising-core/" 
Process says executes successfully but nothing is loaded into S3.

Any help/advice on this would be greatly appreciated

Thanks!
tomok
MVP
Posts: 2836
Joined: Tue Feb 16, 2010 2:39 pm
OLAP Product: TM1, Palo
Version: Beginning of time thru 10.2
Excel Version: 2003-2007-2010-2013
Location: Atlanta, GA
Contact:

Re: Executing .bat file TM1 TI to AWS S3 Bucket

Post by tomok »

These type of issues are almost always due to permission issues between you physically being logged into the desktop of the server (and thus executing the batch under your ID) versus running it via TI which executes the batch under the service account TM1 runs under.
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/
Crayola
Posts: 9
Joined: Thu Apr 02, 2020 1:52 am
OLAP Product: TM1
Version: 11.7.0.42
Excel Version: 2002

Re: Executing .bat file TM1 TI to AWS S3 Bucket

Post by Crayola »

tomok wrote: Tue Apr 14, 2020 11:43 am These type of issues are almost always due to permission issues between you physically being logged into the desktop of the server (and thus executing the batch under your ID) versus running it via TI which executes the batch under the service account TM1 runs under.
Thank you for this! it was permissions! Had to set up AWS CLI on the host account of server
Post Reply