Exportcube from Tm1 to Oracle Table

Post Reply
NewtoTm1
Posts: 5
Joined: Fri Dec 09, 2016 4:40 pm
OLAP Product: TM1
Version: 10.2
Excel Version: 2010

Exportcube from Tm1 to Oracle Table

Post by NewtoTm1 »

Hi All, I am totally new to Tm1 so I am here to get your help. I am using the below code to export the cube from Tm1 to Oracle. Everything is working fine but I am getting an error 'Quoted string not properly terminated' I found out the reason as well on why I am getting that error and that's because the variable Topic ( which you can find below ) has some data in this format- Children's play . I guess the error is happening with the quote in the word children's. Can anyone suggest on how I should go about with this to load the data into Oracle.


ODBCOutput( 'MYDB',Expand( 'Insert into Tablename (Staff_ID,GUID,VYear, VAcademic_Organisation, Course, Staff, STG_Course_Component, VMeetingDate, VStartTime, STG_Event_Id, STG_Class_Section, ITEM,class_Size,Facility,Room_Capacity,Meeting_Date,Start_Time,Finish_Time,Topic,Instructors,Duration_Mins,Duration_Hours,Shared_Meeting,Video_Link_Exclude,Multiple_taught_count,
Linked_lab_exclude,Counts,Contact_Hours,Status,Number_of_instructors,InstructorNames)

VALUES(''%StaffID%'',''%GUID%'',''%VYear%'' ,''%VAcademicOrganisation%'', ''%Course%'', ''%vStaff%'', ''%STG_Course_Component%'', ''%MeetingDate%'',

''%StartTime%'', ''%STG_Event_Id%'', ''%STG_Class_Section%'', ''%ITEM%'',''%classSize%'',''%FacilityID%'',''%RoomCapacity%'',''%VMeetingDate%'',''%VStartTime%'',''%FinishTime%'',''%Topic%'',''%Instructors%'', ''%Durationmins%'',''%Durationhours%'',''%SharedMeetingCount%'',''%VideoLinkExclude%'',''%Multipletaughtcount%''

,''%Linkedlabexclude%'',''%count%'',''%Contacthours%'',''%Status%'',''%NumberofInstructors%'',''%Instructornames%'')'));
David Usherwood
Site Admin
Posts: 1458
Joined: Wed May 28, 2008 9:09 am

Re: Exportcube from Tm1 to Oracle Table

Post by David Usherwood »

This is not a specifically TM1 issue - you are generating an INSERT command using commas, but one of your fields contains commas. Google how to solve that.
For debugging complex SQL in TM1 I find replacing
ODBCOUTPUT('MYDB',
by
ASCIIOUTPUT('test.csv'
and inspecting the output file to be useful.
NewtoTm1
Posts: 5
Joined: Fri Dec 09, 2016 4:40 pm
OLAP Product: TM1
Version: 10.2
Excel Version: 2010

Re: Exportcube from Tm1 to Oracle Table

Post by NewtoTm1 »

Thanks much David for your response. I Made it work :).
David Usherwood
Site Admin
Posts: 1458
Joined: Wed May 28, 2008 9:09 am

Re: Exportcube from Tm1 to Oracle Table

Post by David Usherwood »

Glad to hear it :)
As a general rule, can you post what you did to fix it? It will help others.
Post Reply