Fatal Error with TD TPT API

Tools & Utilities
Enthusiast

Fatal Error with TD TPT API

Dear All

Our reporting tool generates the following SQL query to be executed on TD 15.10:

select a11.Gl_Acct_Prod_Grp_Id  Gl_Acct_Prod_Grp_Id,
a11.Gl_Acct_Prod_Grp_Src_Id Gl_Acct_Prod_Grp_Src_Id,
a13.Prod_Grp_Desc Prod_Grp_Desc,
a13.Prod_Grp_Id_L1 Prod_Grp_Id_L1,
a13.Prod_Grp_Src_Id_L1 Prod_Grp_Src_Id_L1,
a13.Prod_Grp_Desc_L1 Prod_Grp_Desc_L1,
a12.Sme_Service_Area_Id Service_Area_Id,
a12.Sme_Service_Area_Src_Id Service_Area_Src_Id,
a111.Service_Area_Desc Service_Area_Desc,
a11.Serv_Connect_Prod_Grp_Id Prod_Grp_Id,
a11.Serv_Connect_Prod_Grp_Src_Id Prod_Grp_Src_Id,
a19.Prod_Grp_Desc Prod_Grp_Desc0,
a11.Serv_Prod_Grp_Id Serv_Prod_Grp_Id,
a11.Serv_Prod_Grp_Src_Id Serv_Prod_Grp_Src_Id,
a110.Prod_Grp_Desc Prod_Grp_Desc1,
a11.Am_Login_Id Ac_Login_Id,
a11.Am_Org_Unit_Long_Name Ac_Login_Id0,
a11.Scs_Customer_Id Scs_Customer_Id,
a11.Seg_Name_L1 Seg_Name_L1,
a11.Seg_Name_L2 Seg_Name_L2,
a14.Calendar_Year Calendar_Year,
a14.Month_Of_Year Month_Of_Year,
a14.Month_Of_Year_Short_Name Month_Of_Year_Short_Name,
a11.Calendar_Month Calendar_Month,
a11.Ac_Login_Id Ac_Login_Id1,
a11.Ac_Org_Unit_Long_Name Ac_Login_Id2,
a11.Sales_Area_Id Sales_Area_Id,
a11.Sales_Area_Typ_Id Sales_Area_Typ_Id,
a15.Sme_Cust_Sales_Area_Name Sme_Cust_Sales_Area_Name,
a11.Sales_Region_Id Sme_Cust_Sales_Region_Id,
a11.Sales_Region_Typ_Id Sme_Cust_Sales_Region_Typ_Id,
a18.Sme_Cust_Sales_Region_Name Sme_Cust_Sales_Region_Name,
a12.Sme_Business_Area_Id Business_Area_Id,
a12.Sme_Business_Area_Src_Id Business_Area_Src_Id,
a112.Business_Area_Desc Business_Area_Desc,
a11.Connect_Prod_Grp_Id Prod_Grp_Id_L4,
a11.Connect_Prod_Grp_Src_Id Prod_Grp_Src_Id_L4,
a17.Connect_Prod_Grp_Desc Prod_Grp_Desc_L4,
a11.Bill_Prod_Id Bill_Prod_Id,
a11.Bill_Prod_Src_Id Bill_Prod_Src_Id,
a16.Prod_Short_Desc Prod_Short_Desc,
a11.Item_Ut_Of_Meas Item_Ut_Of_Meas,
a11.Master_Scs_Company_Id Master_Scs_Company_Id,
a15.Sme_Cust_Sales_Region_Id Sme_Cust_Sales_Region_Id0,
a15.Sme_Cust_Sales_Region_Typ_Id Sme_Cust_Sales_Region_Typ_Id0,
sum(a11.Item_Net_Amt) Billed_Rev,
sum(sum(a11.Item_Net_Amt)) over(partition by a14.Calendar_Year, a11.Serv_Prod_Grp_Id, a11.Serv_Prod_Grp_Src_Id, a11.Serv_Connect_Prod_Grp_Id, a11.Serv_Connect_Prod_Grp_Src_Id, a12.Sme_Service_Area_Id, a12.Sme_Service_Area_Src_Id, a15.Sme_Cust_Sales_Region_Id, a15.Sme_Cust_Sales_Region_Typ_Id, a11.Sales_Area_Id, a11.Sales_Area_Typ_Id, a11.Gl_Acct_Prod_Grp_Id, a11.Gl_Acct_Prod_Grp_Src_Id, a11.Connect_Prod_Grp_Id, a11.Connect_Prod_Grp_Src_Id, a12.Sme_Business_Area_Id, a12.Sme_Business_Area_Src_Id, a11.Item_Ut_Of_Meas, a11.Bill_Prod_Id, a11.Bill_Prod_Src_Id order by a11.Calendar_Month asc rows unbounded preceding) Billed_Rev_Ytm
from Dm_Billed_Rev_Sme a11
join Scp_Serv_Con_Map a12
on (a11.Serv_Connect_Prod_Grp_Id = a12.Serv_Connect_Prod_Grp_Id and
a11.Serv_Connect_Prod_Grp_Src_Id = a12.Serv_Connect_Prod_Grp_Src_Id)
join Prod_Gl_Acct_Hier_X a13
on (a11.Gl_Acct_Prod_Grp_Id = a13.Gl_Acct_Prod_Grp_Id and
a11.Gl_Acct_Prod_Grp_Src_Id = a13.Gl_Acct_Prod_Grp_Src_Id)
join Cal_Window_Month_Ext_X a14
on (a11.Calendar_Month = a14.Calendar_Month)
join Sme_Sales_Region_Hier_Cur_X a15
on (a11.Sales_Area_Id = a15.Sme_Cust_Sales_Area_Id and
a11.Sales_Area_Typ_Id = a15.Sme_Cust_Sales_Area_Typ_Id)
join Prod_Bill_Item_Inv_Hier_Cur_X a16
on (a11.Bill_Prod_Id = a16.Prod_Id and
a11.Bill_Prod_Src_Id = a16.Prod_Src_Id)
join Base_Connect_Hier_X a17
on (a11.Connect_Prod_Grp_Id = a17.Connect_Prod_Grp_Id and
a11.Connect_Prod_Grp_Src_Id = a17.Connect_Prod_Grp_Src_Id)
join Sme_Sales_Region_Cur_X a18
on (a11.Sales_Region_Id = a18.Sme_Cust_Sales_Region_Id and
a11.Sales_Region_Typ_Id = a18.Sme_Cust_Sales_Region_Typ_Id)
join Prod_Service_Connectivity_X a19
on (a11.Serv_Connect_Prod_Grp_Id = a19.Prod_Grp_Id and
a11.Serv_Connect_Prod_Grp_Src_Id = a19.Prod_Grp_Src_Id)
join Prod_Serv_Hier_X a110
on (a11.Serv_Prod_Grp_Id = a110.Serv_Prod_Grp_Id and
a11.Serv_Prod_Grp_Src_Id = a110.Serv_Prod_Grp_Src_Id)
join Scp_Service_Area a111
on (a12.Sme_Service_Area_Id = a111.Service_Area_Id and
a12.Sme_Service_Area_Src_Id = a111.Service_Area_Src_Id)
join Scp_Business_Area a112
on (a12.Sme_Business_Area_Id = a112.Business_Area_Id and
a12.Sme_Business_Area_Src_Id = a112.Business_Area_Src_Id)
where a14.Calendar_Year in (2016)
group by
a11.Gl_Acct_Prod_Grp_Id,
a11.Gl_Acct_Prod_Grp_Src_Id,
a13.Prod_Grp_Desc,
a13.Prod_Grp_Id_L1,
a13.Prod_Grp_Src_Id_L1,
a13.Prod_Grp_Desc_L1,
a12.Sme_Service_Area_Id,
a12.Sme_Service_Area_Src_Id,
a111.Service_Area_Desc,
a11.Serv_Connect_Prod_Grp_Id,
a11.Serv_Connect_Prod_Grp_Src_Id,
a19.Prod_Grp_Desc,
a11.Serv_Prod_Grp_Id,
a11.Serv_Prod_Grp_Src_Id,
a110.Prod_Grp_Desc,
a11.Am_Login_Id,
a11.Am_Org_Unit_Long_Name,
a11.Scs_Customer_Id,
a11.Seg_Name_L1,
a11.Seg_Name_L2,
a14.Calendar_Year,
a14.Month_Of_Year,
a14.Month_Of_Year_Short_Name,
a11.Calendar_Month,
a11.Ac_Login_Id,
a11.Ac_Org_Unit_Long_Name,
a11.Sales_Area_Id,
a11.Sales_Area_Typ_Id,
a15.Sme_Cust_Sales_Area_Name,
a11.Sales_Region_Id,
a11.Sales_Region_Typ_Id,
a18.Sme_Cust_Sales_Region_Name,
a12.Sme_Business_Area_Id,
a12.Sme_Business_Area_Src_Id,
a112.Business_Area_Desc,
a11.Connect_Prod_Grp_Id,
a11.Connect_Prod_Grp_Src_Id,
a17.Connect_Prod_Grp_Desc,
a11.Bill_Prod_Id,
a11.Bill_Prod_Src_Id,
a16.Prod_Short_Desc,
a11.Item_Ut_Of_Meas,
a11.Master_Scs_Company_Id,
a15.Sme_Cust_Sales_Region_Id,
a15.Sme_Cust_Sales_Region_Typ_Id
;

The reporting tool is configured to use the TPT API for this query with the following settings:

TD_TDP_ID=dwhpprd;TD_MAX_SESSIONS=10;TD_MIN_SESSIONS=10;TD_MAX_INSTANCES=10;

When executing the query, it immediately fails with an error message:

Status: Execution failed

Error: SQL Generation Complete

QueryEngine encountered error: Coordinator::RunExport failed. Teradata TPT API encountered an error. 

Error type: TeradataWrapper Error. Error occured in exporter thread 6. Error type is 0, Thread[6]: Error occured in Initiate(). Error type is 0. Error message is Operator(libexportop.so) instance(1): INITIATE method failed with status = Fatal Error

No error is thrown when executing the same query over a traditional ODBC connection. Do you have any ideas why this is throwing an error in TPT mode?

Kind regards

  Christoph
Tags (1)
1 REPLY
Teradata Employee

Re: Fatal Error with TD TPT API

On current releases of TD the number of sessions is limited via TASM/TIWM settings. You can't have more instances than sessions, and you can't have more sessions than workload management allows.

Try using one instance and 4 sessions. Those are the recommended / default values.