Page 1 of 1

ODBCOutPut Data Export

Posted: Fri Sep 25, 2015 7:19 pm
by dharav
Hello All

I was trying to delete 55000 rows from the relational table from existing ODBC output TI process. Inserting Data activity is fast as it should be in TM1 but deleting rows is too slow. The code for delete rows are as under:

vSql='Delete From [M1].[dbo].[Report]
Where Month=''%v2%'' and Year=''%v1%''';


ODBCOutput('production',Expand(vSql));

Is there a way to execute above code faster from ODBC output TI itself instead of following way ?

=> Alternate Way i approached:
I did achieve it through batch file where other TM1runTIs are integrated. It is fast also.

Re: ODBCOutPut Data Export

Posted: Fri Sep 25, 2015 8:56 pm
by David Usherwood
How many times are you executing the SQL? Are you using a data source within TM1? I can't see why a single DELETE ... WHERE would be slow.

Re: ODBCOutPut Data Export

Posted: Mon Sep 28, 2015 6:05 am
by escape18in
are you excuting odbcoutput for delete in matadata or data tab? it should be prolog or in epilog..

Re: ODBCOutPut Data Export

Posted: Tue Sep 29, 2015 6:12 am
by macsir
Has your DB table properly been indexed?

Re: ODBCOutPut Data Export

Posted: Tue Sep 29, 2015 9:29 pm
by dharav
@ escape18in

You were right. I wrote sql statement to delete rows in prolog but the odbc function to execute that sql query was in data tab :o

I put it in to prolog and i am good now.

Thank You all

Dharav