Process failing periodically
-
- Posts: 10
- Joined: Thu Sep 19, 2013 6:38 pm
- OLAP Product: TM1
- Version: 10.1
- Excel Version: 2010
Process failing periodically
I have a process that fails only periodically with the following error:
Error: Data procedure line (68): error repeats 15 times
"Agriculture","Australia","06-0300-AF SHEET","AUTOMOTIVE COMPONENTS LTD-06-CAUT501","BIRollup","Local","06","All Years","BIRollup","307.67",Data Source line (2) Error: Data procedure line (58): Element "AUTOMOTIVE COMPONENTS LTD-06-CAUT501" not found in dimension "Customer"
The log for the process is filled with similar errors. Here is what the process is doing:
ExportPath = 'D:\BI Extract\BIDailySalesTTM' | Y1 | '.txt';
#Get the current and previous year
#T1 = TODAY(0);
#Y1 = YEAR(T1);
#Y0 = YEAR(T1) - 1;
#Y1 = SUBST(SelectedYear,3,2);
#Y0 = NUMBERTOSTRING(StringToNumber(Y1) - 1);
#Because we did a time hierarchy (multiple years/periods), loop thru 12 month and get the necessary data for each month
m = 1;
while (m <= 12);
#Build the lookup period: MMM-YY
IF (m = 1);
LoadMonth = 'JAN-';
ELSEIF (m = 2);
LoadMonth = 'FEB-';
ELSEIF (m = 3);
LoadMonth = 'MAR-';
ELSEIF (m = 4);
LoadMonth = 'APR-';
ELSEIF (m = 5);
LoadMonth = 'MAY-';
ELSEIF (m = 6);
LoadMonth = 'JUN-';
ELSEIF (m = 7);
LoadMonth = 'JUL-';
ELSEIF (m = 8);
LoadMonth = 'AUG-';
ELSEIF (m = 9);
LoadMonth = 'SEP-';
ELSEIF (m = 10);
LoadMonth = 'OCT-';
ELSEIF (m = 11);
LoadMonth = 'NOV-';
ELSEIF (m = 12);
LoadMonth = 'DEC-';
EndIf;
PeriodCY = LoadMonth | Y1;
PeriodPY = LoadMonth | Y0;
#Get the dimension display values
CountryName = ATTRS('Country', Country, 'Standard Name');
CompanyName = ATTRS('Company', Company, 'Name');
ProductName = ATTRS('Product', Product, 'Corporate Revenue Account Mapping');
If (ProductName @= '');
ProductName = 'Other';
EndIf;
RegionName = ELPAR('Country', Country, 1);
CustomerName = ATTRS('Customer', Customer, 'Name Code');
If (ATTRS('Customer', Customer, 'Corporate Customer Group') @<> '');
CustomerName = ATTRS('Customer', Customer, 'Corporate Customer Group');
EndIf;
If (ATTRS('Customer', Customer, 'Entity Customer Group') @<> '');
CustomerName = ATTRS('Customer', Customer, 'Entity Customer Group');
EndIf;
#get the sales measure for this period for both Euros and local currency.
EurSales = CellgetN (CubeName, Industry, Country, Product, Customer, 'Actual', 'EUR', Company, PeriodCY, 'Ship Amt');
LocalSales = CellgetN (CubeName, Industry, Country, Product, Customer, 'Actual', 'Local', Company, PeriodCY, 'Ship Amt');
EurCost = CellgetN (CubeName, Industry, Country, Product, Customer, 'Actual', 'EUR', Company, PeriodCY, 'Total Shipment Costs');
LocalCost = CellgetN (CubeName, Industry, Country, Product, Customer, 'Actual', 'Local', Company, PeriodCY, 'Total Shipment Costs');
EurIntake = CellgetN (CubeName, Industry, Country, Product, Customer, 'Actual', 'EUR', Company, PeriodCY, 'Order Intake Amt');
LocalIntake = CellgetN (CubeName, Industry, Country, Product, Customer, 'Actual', 'Local', Company, PeriodCY, 'Order Intake Amt');
EurSalesPlan = CellgetN (CubeName, Industry, Country, Product, Customer, 'Final Plan Archive', 'EUR', Company, PeriodCY, 'Ship Amt');
LocalSalesPlan = CellgetN (CubeName, Industry, Country, Product, Customer, 'Final Plan Archive', 'Local', Company, PeriodCY, 'Ship Amt');
EurSalesForecast = CellgetN (CubeName, Industry, Country, Product, Customer, 'Forecast', 'EUR', Company, PeriodCY, 'Ship Amt');
LocalSalesForecast = CellgetN (CubeName, Industry, Country, Product, Customer, 'Forecast', 'Local', Company, PeriodCY, 'Ship Amt');
#Get the prior year sales, and the TTM amounts for this year and the prior year
EurSalesPY = CellgetN (CubeName, Industry, Country, Product, Customer, 'Actual', 'EUR', Company, PeriodPY, 'Ship Amt');
LocalSalesPY = CellgetN (CubeName, Industry, Country, Product, Customer, 'Actual', 'Local', Company, PeriodPY, 'Ship Amt');
EurSalesCYTTM = CellgetN (CubeName, Industry, Country, Product, Customer, 'Actual', 'EUR', Company, PeriodCY|'TTM', 'Ship Amt');
LocalSalesCYTTM = CellgetN (CubeName, Industry, Country, Product, Customer, 'Actual', 'Local', Company, PeriodCY|'TTM', 'Ship Amt');
EurSalesPYTTM = CellgetN (CubeName, Industry, Country, Product, Customer, 'Actual', 'EUR', Company, PeriodPY|'TTM', 'Ship Amt');
LocalSalesPYTTM = CellgetN (CubeName, Industry, Country, Product, Customer, 'Actual', 'Local', Company, PeriodPY|'TTM', 'Ship Amt');
#skip if all amounts are zero
IF (EurSales <> 0 % EurSalesPY <> 0 % EurSalesCYTTM <> 0 % EurSalesPYTTM <> 0 % EurSalesPlan <> 0 % EurIntake <> 0 % EurSalesForecast <> 0);
ASCIIOUTPUT(
ExportPath,
Y1,
CompanyName,
CustomerName,
Customer,
Industry,
ProductName,
Product,
CountryName,
RegionName,
PeriodCY,
NUMBERTOSTRING(EurSales),
NUMBERTOSTRING(LocalSales),
NUMBERTOSTRING(EurIntake),
NUMBERTOSTRING(LocalIntake),
NUMBERTOSTRING(EurCost),
NUMBERTOSTRING(LocalCost),
NUMBERTOSTRING(EurSalesPlan),
NUMBERTOSTRING(LocalSalesPlan),
NUMBERTOSTRING(EurSalesForecast),
NUMBERTOSTRING(LocalSalesForecast),
NUMBERTOSTRING(EurSalesPY),
NUMBERTOSTRING(LocalSalesPY),
NUMBERTOSTRING(EurSalesCYTTM),
NUMBERTOSTRING(LocalSalesCYTTM),
NUMBERTOSTRING(EurSalesPYTTM),
NUMBERTOSTRING(LocalSalesPYTTM)
);
ENDIF;
m = m + 1;
END;
My suspicion is that one of the other processes is causing the error. We have another process which Zeros out the cube that is used as a datasource in the process that is failing.
Error: Data procedure line (68): error repeats 15 times
"Agriculture","Australia","06-0300-AF SHEET","AUTOMOTIVE COMPONENTS LTD-06-CAUT501","BIRollup","Local","06","All Years","BIRollup","307.67",Data Source line (2) Error: Data procedure line (58): Element "AUTOMOTIVE COMPONENTS LTD-06-CAUT501" not found in dimension "Customer"
The log for the process is filled with similar errors. Here is what the process is doing:
ExportPath = 'D:\BI Extract\BIDailySalesTTM' | Y1 | '.txt';
#Get the current and previous year
#T1 = TODAY(0);
#Y1 = YEAR(T1);
#Y0 = YEAR(T1) - 1;
#Y1 = SUBST(SelectedYear,3,2);
#Y0 = NUMBERTOSTRING(StringToNumber(Y1) - 1);
#Because we did a time hierarchy (multiple years/periods), loop thru 12 month and get the necessary data for each month
m = 1;
while (m <= 12);
#Build the lookup period: MMM-YY
IF (m = 1);
LoadMonth = 'JAN-';
ELSEIF (m = 2);
LoadMonth = 'FEB-';
ELSEIF (m = 3);
LoadMonth = 'MAR-';
ELSEIF (m = 4);
LoadMonth = 'APR-';
ELSEIF (m = 5);
LoadMonth = 'MAY-';
ELSEIF (m = 6);
LoadMonth = 'JUN-';
ELSEIF (m = 7);
LoadMonth = 'JUL-';
ELSEIF (m = 8);
LoadMonth = 'AUG-';
ELSEIF (m = 9);
LoadMonth = 'SEP-';
ELSEIF (m = 10);
LoadMonth = 'OCT-';
ELSEIF (m = 11);
LoadMonth = 'NOV-';
ELSEIF (m = 12);
LoadMonth = 'DEC-';
EndIf;
PeriodCY = LoadMonth | Y1;
PeriodPY = LoadMonth | Y0;
#Get the dimension display values
CountryName = ATTRS('Country', Country, 'Standard Name');
CompanyName = ATTRS('Company', Company, 'Name');
ProductName = ATTRS('Product', Product, 'Corporate Revenue Account Mapping');
If (ProductName @= '');
ProductName = 'Other';
EndIf;
RegionName = ELPAR('Country', Country, 1);
CustomerName = ATTRS('Customer', Customer, 'Name Code');
If (ATTRS('Customer', Customer, 'Corporate Customer Group') @<> '');
CustomerName = ATTRS('Customer', Customer, 'Corporate Customer Group');
EndIf;
If (ATTRS('Customer', Customer, 'Entity Customer Group') @<> '');
CustomerName = ATTRS('Customer', Customer, 'Entity Customer Group');
EndIf;
#get the sales measure for this period for both Euros and local currency.
EurSales = CellgetN (CubeName, Industry, Country, Product, Customer, 'Actual', 'EUR', Company, PeriodCY, 'Ship Amt');
LocalSales = CellgetN (CubeName, Industry, Country, Product, Customer, 'Actual', 'Local', Company, PeriodCY, 'Ship Amt');
EurCost = CellgetN (CubeName, Industry, Country, Product, Customer, 'Actual', 'EUR', Company, PeriodCY, 'Total Shipment Costs');
LocalCost = CellgetN (CubeName, Industry, Country, Product, Customer, 'Actual', 'Local', Company, PeriodCY, 'Total Shipment Costs');
EurIntake = CellgetN (CubeName, Industry, Country, Product, Customer, 'Actual', 'EUR', Company, PeriodCY, 'Order Intake Amt');
LocalIntake = CellgetN (CubeName, Industry, Country, Product, Customer, 'Actual', 'Local', Company, PeriodCY, 'Order Intake Amt');
EurSalesPlan = CellgetN (CubeName, Industry, Country, Product, Customer, 'Final Plan Archive', 'EUR', Company, PeriodCY, 'Ship Amt');
LocalSalesPlan = CellgetN (CubeName, Industry, Country, Product, Customer, 'Final Plan Archive', 'Local', Company, PeriodCY, 'Ship Amt');
EurSalesForecast = CellgetN (CubeName, Industry, Country, Product, Customer, 'Forecast', 'EUR', Company, PeriodCY, 'Ship Amt');
LocalSalesForecast = CellgetN (CubeName, Industry, Country, Product, Customer, 'Forecast', 'Local', Company, PeriodCY, 'Ship Amt');
#Get the prior year sales, and the TTM amounts for this year and the prior year
EurSalesPY = CellgetN (CubeName, Industry, Country, Product, Customer, 'Actual', 'EUR', Company, PeriodPY, 'Ship Amt');
LocalSalesPY = CellgetN (CubeName, Industry, Country, Product, Customer, 'Actual', 'Local', Company, PeriodPY, 'Ship Amt');
EurSalesCYTTM = CellgetN (CubeName, Industry, Country, Product, Customer, 'Actual', 'EUR', Company, PeriodCY|'TTM', 'Ship Amt');
LocalSalesCYTTM = CellgetN (CubeName, Industry, Country, Product, Customer, 'Actual', 'Local', Company, PeriodCY|'TTM', 'Ship Amt');
EurSalesPYTTM = CellgetN (CubeName, Industry, Country, Product, Customer, 'Actual', 'EUR', Company, PeriodPY|'TTM', 'Ship Amt');
LocalSalesPYTTM = CellgetN (CubeName, Industry, Country, Product, Customer, 'Actual', 'Local', Company, PeriodPY|'TTM', 'Ship Amt');
#skip if all amounts are zero
IF (EurSales <> 0 % EurSalesPY <> 0 % EurSalesCYTTM <> 0 % EurSalesPYTTM <> 0 % EurSalesPlan <> 0 % EurIntake <> 0 % EurSalesForecast <> 0);
ASCIIOUTPUT(
ExportPath,
Y1,
CompanyName,
CustomerName,
Customer,
Industry,
ProductName,
Product,
CountryName,
RegionName,
PeriodCY,
NUMBERTOSTRING(EurSales),
NUMBERTOSTRING(LocalSales),
NUMBERTOSTRING(EurIntake),
NUMBERTOSTRING(LocalIntake),
NUMBERTOSTRING(EurCost),
NUMBERTOSTRING(LocalCost),
NUMBERTOSTRING(EurSalesPlan),
NUMBERTOSTRING(LocalSalesPlan),
NUMBERTOSTRING(EurSalesForecast),
NUMBERTOSTRING(LocalSalesForecast),
NUMBERTOSTRING(EurSalesPY),
NUMBERTOSTRING(LocalSalesPY),
NUMBERTOSTRING(EurSalesCYTTM),
NUMBERTOSTRING(LocalSalesCYTTM),
NUMBERTOSTRING(EurSalesPYTTM),
NUMBERTOSTRING(LocalSalesPYTTM)
);
ENDIF;
m = m + 1;
END;
My suspicion is that one of the other processes is causing the error. We have another process which Zeros out the cube that is used as a datasource in the process that is failing.
- Michel Zijlema
- Site Admin
- Posts: 712
- Joined: Wed May 14, 2008 5:22 am
- OLAP Product: TM1, PALO
- Version: both 2.5 and higher
- Excel Version: 2003-2007-2010
- Location: Netherlands
- Contact:
Re: Process failing periodically
The error message seems pretty clear to me - you're trying to load data against element "AUTOMOTIVE COMPONENTS LTD-06-CAUT501" in the Customer dimension and this element does not exist in that dimension.nsalvarez wrote:I have a process that fails only periodically with the following error:
Error: Data procedure line (68): error repeats 15 times
"Agriculture","Australia","06-0300-AF SHEET","AUTOMOTIVE COMPONENTS LTD-06-CAUT501","BIRollup","Local","06","All Years","BIRollup","307.67",Data Source line (2) Error: Data procedure line (58): Element "AUTOMOTIVE COMPONENTS LTD-06-CAUT501" not found in dimension "Customer"
Michel
-
- Posts: 10
- Joined: Thu Sep 19, 2013 6:38 pm
- OLAP Product: TM1
- Version: 10.1
- Excel Version: 2010
Re: Process failing periodically
I initially thought this as well, but when I open up the dimension, the element is there.
-
- Site Admin
- Posts: 6647
- Joined: Sun May 11, 2008 2:30 am
- OLAP Product: TM1
- Version: PA2.0.9.18 Classic NO PAW!
- Excel Version: 2013 and Office 365
- Location: Sydney, Australia
- Contact:
Re: Process failing periodically
I agree with Michel's assessment but here's where I'd be looking:Michel Zijlema wrote:The error message seems pretty clear to me - you're trying to load data against element "AUTOMOTIVE COMPONENTS LTD-06-CAUT501" in the Customer dimension and this element does not exist in that dimension.nsalvarez wrote:I have a process that fails only periodically with the following error:
Error: Data procedure line (68): error repeats 15 times
"Agriculture","Australia","06-0300-AF SHEET","AUTOMOTIVE COMPONENTS LTD-06-CAUT501","BIRollup","Local","06","All Years","BIRollup","307.67",Data Source line (2) Error: Data procedure line (58): Element "AUTOMOTIVE COMPONENTS LTD-06-CAUT501" not found in dimension "Customer"
That indicates that it's part of a process chain or possibly a chore rather than a standalone process which begs the question... are you calling a process which updates your metadata (say, by inserting new elements) and which is not complete at the time that this process is called? (As one example, doing an ExecuteProcess call from the metadata tab of an earlier process.) Where I'm going with this is the thought that perhaps these intermittent failures come from new elements that are inserted. You insert the element (which by default always went into a COPY of the dimension, at least before DimensionElementInsertDirect rocked up in 10.1; see the link for further details), you call the process above, that process looks at the REGISTERED dimension, doesn't find the element and spits the error. At the end of the process chain, though, the dimension copy is registered as the updated dimension, you look at the dimension and say "Hey, what's going on, that element is actually there!" Thus you get what appears to be an intermittent failure.nsalvarez wrote:My suspicion is that one of the other processes is causing the error. We have another process which Zeros out the cube that is used as a datasource in the process that is failing.
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
-
- Posts: 10
- Joined: Thu Sep 19, 2013 6:38 pm
- OLAP Product: TM1
- Version: 10.1
- Excel Version: 2010
Re: Process failing periodically
This process is in a stand-alone chore that starts several hours after the other scheduled chores have completed. Some of the other chores do insert elements into the customer dimension but finish before this process runs. Also, this process doesn't have anything in the metadata tab.
-
- Site Admin
- Posts: 6647
- Joined: Sun May 11, 2008 2:30 am
- OLAP Product: TM1
- Version: PA2.0.9.18 Classic NO PAW!
- Excel Version: 2013 and Office 365
- Location: Sydney, Australia
- Contact:
Re: Process failing periodically
It's a fairly ugly (and seemingly potentially prone to change) name for a principal element name; which leads me to ask is this really the principal name, or is it an alias? If it's an alias, are you perhaps setting the alias in the Metadata tab?nsalvarez wrote:This process is in a stand-alone chore that starts several hours after the other scheduled chores have completed. Some of the other chores do insert elements into the customer dimension but finish before this process runs. Also, this process doesn't have anything in the metadata tab.
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
- Michel Zijlema
- Site Admin
- Posts: 712
- Joined: Wed May 14, 2008 5:22 am
- OLAP Product: TM1, PALO
- Version: both 2.5 and higher
- Excel Version: 2003-2007-2010
- Location: Netherlands
- Contact:
Re: Process failing periodically
The error-message stems from the data tab so I don't think it's caused by loading aliases on the Metadata tab.Alan Kirk wrote:It's a fairly ugly (and seemingly potentially prone to change) name for a principal element name; which leads me to ask is this really the principal name, or is it an alias? If it's an alias, are you perhaps setting the alias in the Metadata tab?nsalvarez wrote:This process is in a stand-alone chore that starts several hours after the other scheduled chores have completed. Some of the other chores do insert elements into the customer dimension but finish before this process runs. Also, this process doesn't have anything in the metadata tab.
I assume the problem is either in the order of things (in the chain of processes the data is loaded before the element is added - this would explain the "periodically" observation, as the element gets added and on a next run the process will load) or (less likely) in naming ambiguity (where the name in the Customer dimension looks like "AUTOMOTIVE COMPONENTS LTD-06-CAUT501", but in fact is not exactly that).
Michel
-
- Site Admin
- Posts: 6647
- Joined: Sun May 11, 2008 2:30 am
- OLAP Product: TM1
- Version: PA2.0.9.18 Classic NO PAW!
- Excel Version: 2013 and Office 365
- Location: Sydney, Australia
- Contact:
Re: Process failing periodically
Y'all sure about that, compadre?Michel Zijlema wrote:The error-message stems from the data tab so I don't think it's caused by loading aliases on the Metadata tab.Alan Kirk wrote:It's a fairly ugly (and seemingly potentially prone to change) name for a principal element name; which leads me to ask is this really the principal name, or is it an alias? If it's an alias, are you perhaps setting the alias in the Metadata tab?nsalvarez wrote:This process is in a stand-alone chore that starts several hours after the other scheduled chores have completed. Some of the other chores do insert elements into the customer dimension but finish before this process runs. Also, this process doesn't have anything in the metadata tab.

The thing that many people (including me, on occasion) forget is that aliases and indeed attributes in general are data, not metadata.
Allow me to demonstrate.
Data source file = a .csv with two columns, a principal name in Column A ('Element 1' to 'Element 12') and an alias in column B ( the same name with 'My ' at the front.)
For convenience's sake let's create the dim and its alias in the Prolog, like so:
Code: Select all
s_Dim = 'z130920';
s_AttrName= 'MyAlias';
If ( DimensionExists(s_Dim)=1);
DimensionDestroy( s_Dim);
EndIf;
DimensionCreate(s_Dim);
AttrInsert(s_Dim, '', s_AttrName, 'A');
Code: Select all
DimensionElementInsert(s_Dim, '', Name, 'N');
AttrPutS(Alias, s_Dim, Name, s_AttrName);
Code: Select all
"Element 1","My Element 1",Data Source line (1) Error: MetaData procedure line (6): Element "Element 1" not found in dimension "z130920"
"Element 2","My Element 2",Data Source line (2) Error: MetaData procedure line (6): Element "Element 2" not found in dimension "z130920"
"Element 3","My Element 3",Data Source line (3) Error: MetaData procedure line (6): Element "Element 3" not found in dimension "z130920"
"Element 4","My Element 4",Data Source line (4) Error: MetaData procedure line (6): Element "Element 4" not found in dimension "z130920"
"Element 5","My Element 5",Data Source line (5) Error: MetaData procedure line (6): Element "Element 5" not found in dimension "z130920"
"Element 6","My Element 6",Data Source line (6) Error: MetaData procedure line (6): Element "Element 6" not found in dimension "z130920"
"Element 7","My Element 7",Data Source line (7) Error: MetaData procedure line (6): Element "Element 7" not found in dimension "z130920"
"Element 8","My Element 8",Data Source line (8) Error: MetaData procedure line (6): Element "Element 8" not found in dimension "z130920"
"Element 9","My Element 9",Data Source line (9) Error: MetaData procedure line (6): Element "Element 9" not found in dimension "z130920"
"Element 10","My Element 10",Data Source line (10) Error: MetaData procedure line (6): Element "Element 10" not found in dimension "z130920"
"Element 11","My Element 11",Data Source line (11) Error: MetaData procedure line (6): Element "Element 11" not found in dimension "z130920"
"Element 12","My Element 12",Data Source line (12) Error: MetaData procedure line (6): Element "Element 12" not found in dimension "z130920"
Now here's where it gets fun.
In the data tab, let's look for the DimIx value of both the principal name and the alias. Indeed, let's do it twice, once at the top of the Data tab, THEN let's again try writing the alias, then let's look for the DimIx of both again:
Code: Select all
AsciiOutput( 'F:\Users\TM1Administrator\TM1\Servers\Temp\FoundElements.txt', 'Before', Name, Trim ( Str ( DimIx ( s_Dim, Name), 6, 0 ) ) );
AsciiOutput( 'F:\Users\TM1Administrator\TM1\Servers\Temp\FoundElements.txt', 'Before', Name, Trim ( Str ( DimIx ( s_Dim, Alias), 6, 0 ) ) );
AttrPutS(Alias, s_Dim, Name, s_AttrName);
AsciiOutput( 'F:\Users\TM1Administrator\TM1\Servers\Temp\FoundElements.txt', 'After', Name, Trim ( Str ( DimIx ( s_Dim, Name), 6, 0 ) ) );
AsciiOutput( 'F:\Users\TM1Administrator\TM1\Servers\Temp\FoundElements.txt', 'After', Name, Trim ( Str ( DimIx ( s_Dim, Alias), 6, 0 ) ) );
Code: Select all
"Before","Element 1","1"
"Before","Element 1","0"
"After","Element 1","1"
"After","Element 1","1"
"Before","Element 2","2"
"Before","Element 2","0"
"After","Element 2","2"
"After","Element 2","2"
In such a case, if the process tries to write to the alias on the Data tab it would spit the dummy because the principal element will be there, but at the time the alias won't be.
That's essentially where I was going with that train of thought.
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
- Michel Zijlema
- Site Admin
- Posts: 712
- Joined: Wed May 14, 2008 5:22 am
- OLAP Product: TM1, PALO
- Version: both 2.5 and higher
- Excel Version: 2003-2007-2010
- Location: Netherlands
- Contact:
Re: Process failing periodically
Alan Kirk wrote:Y'all sure about that, compadre?![]()
I was referring to the reported error message - so for that I'm pretty surensalvarez wrote:Error: Data procedure line (68): error repeats 15 times

Of course if nsalvarez also received errors on the metadata tab (for failing to load aliases) which weren't posted here, than we have a different story.
Michel
-
- Site Admin
- Posts: 6647
- Joined: Sun May 11, 2008 2:30 am
- OLAP Product: TM1
- Version: PA2.0.9.18 Classic NO PAW!
- Excel Version: 2013 and Office 365
- Location: Sydney, Australia
- Contact:
Re: Process failing periodically
Yes, I did see that; the Editorsaurus hasn't damaged my eyes to that extent yet.Michel Zijlema wrote:Alan Kirk wrote:Y'all sure about that, compadre?
I was referring to the reported error message - so for that I'm pretty surensalvarez wrote:Error: Data procedure line (68): error repeats 15 times![]()

My point was that if you add an element in Metadata, add the alias in Metadata, then rely on the alias in Data, then... you'll get an error in Data because the alias doesn't exist.
You won't get it in a subsequent run with the same data though; if the element already exists then the alias will be added on either tab. It's only if you create and add the alias on the one run that it'll choke (potentially giving the appearance of it being intermittent, since the next time you do the same upload it'll run without error).
That's why I was asking what his Metadata tab was doing. But yes, you're correct that if this is the root cause then there should be, somewhere in the chore (for we aren't sure where or even whether he's doing metadata updates), a Metadata error as well.Michel Zijlema wrote:Of course if nsalvarez also received errors on the metadata tab (for failing to load aliases) which weren't posted here, than we have a different story.
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
- Michel Zijlema
- Site Admin
- Posts: 712
- Joined: Wed May 14, 2008 5:22 am
- OLAP Product: TM1, PALO
- Version: both 2.5 and higher
- Excel Version: 2003-2007-2010
- Location: Netherlands
- Contact:
Re: Process failing periodically
I think we're aligned now 

-
- Posts: 10
- Joined: Thu Sep 19, 2013 6:38 pm
- OLAP Product: TM1
- Version: 10.1
- Excel Version: 2010
Re: Process failing periodically
This process does NOT do anything in the metadata tab. Yes, that is the alias name for the element, not the principal.
-
- Posts: 10
- Joined: Thu Sep 19, 2013 6:38 pm
- OLAP Product: TM1
- Version: 10.1
- Excel Version: 2010
Re: Process failing periodically
Here is the process (in a different chore that completes before the failing process) that updates the customer dimension.
Metadata Tab:
Data Tab:
Metadata Tab:
Code: Select all
#****Begin: Generated Statements***
TM1Date=
SUBST(TransactionDate, 1, 10);
vMonth=subst(TransactionDate,6,2);
vTime=IF(vMonth@='01','Jan-'|subst(TransactionDate,3,2),
IF(vMonth@='02','Feb-'|subst(TransactionDate,3,2),
IF(vMonth@='03','Mar-'|subst(TransactionDate,3,2),
IF(vMonth@='04','Apr-'|subst(TransactionDate,3,2),
IF(vMonth@='05','May-'|subst(TransactionDate,3,2),
IF(vMonth@='06','Jun-'|subst(TransactionDate,3,2),
IF(vMonth@='07','Jul-'|subst(TransactionDate,3,2),
IF(vMonth@='08','Aug-'|subst(TransactionDate,3,2),
IF(vMonth@='09','Sep-'|subst(TransactionDate,3,2),
IF(vMonth@='10','Oct-'|subst(TransactionDate,3,2),
IF(vMonth@='11','Nov-'|subst(TransactionDate,3,2),
'Dec-'|subst(TransactionDate,3,2))))))))))));
vCountry=IF(LocationCountry@='','Unknown Country',LocationCountry);
vProduct=CompanyCode |'-'| ProductLineCode;
vCustomer=CompanyCode |'-'| CustomerNumber;
vOrderIntakeQty=IF(DetailType@='Intake',Quantity,0);
vShipQty=IF(DetailType@<>'Intake',Quantity,0);
vOrderIntakeAmt=IF(DetailType@='Intake',Amount,0);
vShipAmt=IF(DetailType@<>'Intake',Amount,0);
vUnknownIntakeCosts=IF(DetailType@='Intake',TotalCost-(MaterialCost+LaborCost+OverheadCost),0);
vUnknownShipmentCosts=IF(DetailType@<>'Intake',TotalCost-(MaterialCost+LaborCost+OverheadCost),0);
vIntakeMaterialCosts=IF(DetailType@='Intake',MaterialCost,0);
vShipmentMaterialCosts=IF(DetailType@<>'Intake',MaterialCost,0);
vIntakeLaborCosts=IF(DetailType@='Intake',LaborCost,0);
vShipmentLaborCosts=IF(DetailType@<>'Intake',LaborCost,0);
vIntakeOverheadCosts=IF(DetailType@='Intake',OverheadCost,0);
vShipmentOverheadCosts=IF(DetailType@<>'Intake',OverheadCost,0);
vCurrency='Local';
#****End: Generated Statements****
#
# Update Dimensions
# Customer (Parent and Customer)
IF (DIMIX('Customer', CompanyCode) = 0);
DIMENSIONELEMENTINSERT('Customer', '', CompanyCode,'N');
DIMENSIONELEMENTCOMPONENTADD('Customer', 'All Bill To Customers',CompanyCode, 1);
ENDIF;
IF ( DIMIX('Customer', vCustomer) = 0 );
DIMENSIONELEMENTINSERT('Customer', '', vCustomer,'N');
DIMENSIONELEMENTCOMPONENTADD('Customer', CompanyCode,vCustomer, 1);
ENDIF;
# Company
IF (DIMIX('Company', CompanyCode) = 0);
DIMENSIONELEMENTINSERT('Company', '', CompanyCode,'N');
DIMENSIONELEMENTCOMPONENTADD('Company', 'New Companies',CompanyCode, 1);
ENDIF;
# Product (Parent and ProductCode)
IF (DIMIX('Product', CompanyCode) = 0);
DIMENSIONELEMENTINSERT('Product', '', CompanyCode,'N');
DIMENSIONELEMENTCOMPONENTADD('Product', 'All Products',CompanyCode, 1);
ENDIF;
IF ( DIMIX('Product', vProduct) = 0 );
DIMENSIONELEMENTINSERT('Product', '', vProduct,'N');
DIMENSIONELEMENTCOMPONENTADD('Product', CompanyCode,vProduct, 1);
ENDIF;
# Country
IF (DIMIX('Country', vCountry) = 0);
DIMENSIONELEMENTINSERT('Country', '',vCountry,'N');
DIMENSIONELEMENTCOMPONENTADD('Country', 'All Countries',vCountry, 1);
ENDIF;
Code: Select all
#****Begin: Generated Statements***
TM1Date=
SUBST(TransactionDate, 1, 10);
vMonth=subst(TransactionDate,6,2);
vTime=IF(vMonth@='01','Jan-'|subst(TransactionDate,3,2),
IF(vMonth@='02','Feb-'|subst(TransactionDate,3,2),
IF(vMonth@='03','Mar-'|subst(TransactionDate,3,2),
IF(vMonth@='04','Apr-'|subst(TransactionDate,3,2),
IF(vMonth@='05','May-'|subst(TransactionDate,3,2),
IF(vMonth@='06','Jun-'|subst(TransactionDate,3,2),
IF(vMonth@='07','Jul-'|subst(TransactionDate,3,2),
IF(vMonth@='08','Aug-'|subst(TransactionDate,3,2),
IF(vMonth@='09','Sep-'|subst(TransactionDate,3,2),
IF(vMonth@='10','Oct-'|subst(TransactionDate,3,2),
IF(vMonth@='11','Nov-'|subst(TransactionDate,3,2),
'Dec-'|subst(TransactionDate,3,2))))))))))));
vCountry=IF(LocationCountry@='','Unknown Country',LocationCountry);
vProduct=CompanyCode |'-'| ProductLineCode;
vCustomer=CompanyCode |'-'| CustomerNumber;
vOrderIntakeQty=IF(DetailType@='Intake',Quantity,0);
vShipQty=IF(DetailType@<>'Intake',Quantity,0);
vOrderIntakeAmt=IF(DetailType@='Intake',Amount,0);
vShipAmt=IF(DetailType@<>'Intake',Amount,0);
vUnknownIntakeCosts=IF(DetailType@='Intake',TotalCost-(MaterialCost+LaborCost+OverheadCost),0);
vUnknownShipmentCosts=IF(DetailType@<>'Intake',TotalCost-(MaterialCost+LaborCost+OverheadCost),0);
vIntakeMaterialCosts=IF(DetailType@='Intake',MaterialCost,0);
vShipmentMaterialCosts=IF(DetailType@<>'Intake',MaterialCost,0);
vIntakeLaborCosts=IF(DetailType@='Intake',LaborCost,0);
vShipmentLaborCosts=IF(DetailType@<>'Intake',LaborCost,0);
vIntakeOverheadCosts=IF(DetailType@='Intake',OverheadCost,0);
vShipmentOverheadCosts=IF(DetailType@<>'Intake',OverheadCost,0);
vCurrency='Local';
CellPutN(CellGetN('Daily Sales',vCurrency,vCountry,vProduct,vCustomer,CompanyCode,TM1Date,'Order Intake Qty')+vOrderIntakeQty,'Daily Sales',vCurrency,vCountry,vProduct,vCustomer,CompanyCode,TM1Date,'Order Intake Qty');
CellPutN(CellGetN('Daily Sales',vCurrency,vCountry,vProduct,vCustomer,CompanyCode,TM1Date,'Ship Qty')+vShipQty,'Daily Sales',vCurrency,vCountry,vProduct,vCustomer,CompanyCode,TM1Date,'Ship Qty');
CellPutN(CellGetN('Daily Sales',vCurrency,vCountry,vProduct,vCustomer,CompanyCode,TM1Date,'Order Intake Amt')+vOrderIntakeAmt,'Daily Sales',vCurrency,vCountry,vProduct,vCustomer,CompanyCode,TM1Date,'Order Intake Amt');
CellPutN(CellGetN('Daily Sales',vCurrency,vCountry,vProduct,vCustomer,CompanyCode,TM1Date,'Ship Amt')+vShipAmt,'Daily Sales',vCurrency,vCountry,vProduct,vCustomer,CompanyCode,TM1Date,'Ship Amt');
CellPutN(CellGetN('Daily Sales',vCurrency,vCountry,vProduct,vCustomer,CompanyCode,TM1Date,'Unknown Intake Costs')+vUnknownIntakeCosts,'Daily Sales',vCurrency,vCountry,vProduct,vCustomer,CompanyCode,TM1Date,'Unknown Intake Costs');
CellPutN(CellGetN('Daily Sales',vCurrency,vCountry,vProduct,vCustomer,CompanyCode,TM1Date,'Unknown Shipment Costs')+vUnknownShipmentCosts,'Daily Sales',vCurrency,vCountry,vProduct,vCustomer,CompanyCode,TM1Date,'Unknown Shipment Costs');
CellPutN(CellGetN('Daily Sales',vCurrency,vCountry,vProduct,vCustomer,CompanyCode,TM1Date,'Intake Material Costs')+vIntakeMaterialCosts,'Daily Sales',vCurrency,vCountry,vProduct,vCustomer,CompanyCode,TM1Date,'Intake Material Costs');
CellPutN(CellGetN('Daily Sales',vCurrency,vCountry,vProduct,vCustomer,CompanyCode,TM1Date,'Shipment Material Costs')+vShipmentMaterialCosts,'Daily Sales',vCurrency,vCountry,vProduct,vCustomer,CompanyCode,TM1Date,'Shipment Material Costs');
CellPutN(CellGetN('Daily Sales',vCurrency,vCountry,vProduct,vCustomer,CompanyCode,TM1Date,'Intake Labor Costs')+vIntakeLaborCosts,'Daily Sales',vCurrency,vCountry,vProduct,vCustomer,CompanyCode,TM1Date,'Intake Labor Costs');
CellPutN(CellGetN('Daily Sales',vCurrency,vCountry,vProduct,vCustomer,CompanyCode,TM1Date,'Shipment Labor Costs')+vShipmentLaborCosts,'Daily Sales',vCurrency,vCountry,vProduct,vCustomer,CompanyCode,TM1Date,'Shipment Labor Costs');
CellPutN(CellGetN('Daily Sales',vCurrency,vCountry,vProduct,vCustomer,CompanyCode,TM1Date,'Intake Overhead Costs')+vIntakeOverheadCosts,'Daily Sales',vCurrency,vCountry,vProduct,vCustomer,CompanyCode,TM1Date,'Intake Overhead Costs');
CellPutN(CellGetN('Daily Sales',vCurrency,vCountry,vProduct,vCustomer,CompanyCode,TM1Date,'Shipment Overhead Costs')+vShipmentOverheadCosts,'Daily Sales',vCurrency,vCountry,vProduct,vCustomer,CompanyCode,TM1Date,'Shipment Overhead Costs');
#****End: Generated Statements****
# Update Attributes
CustomerNameCode = CustomerName |'-'| vCustomer;
CustomerCodeName = vCustomer |'-'| CustomerName;
IF (ATTRS('Customer',vCustomer, 'Name Code') @= '');
ATTRPUTS(CustomerNameCode, 'Customer', vCustomer, 'Name Code');
ENDIF;
IF (ATTRS('Customer',vCustomer, 'Code Name') @= '');
ATTRPUTS(CustomerCodeName, 'Customer', vCustomer, 'Code Name');
ENDIF;
IF (ATTRS('Customer',vCustomer, 'Country') @= '');
ATTRPUTS(LocationCountry, 'Customer', vCustomer, 'Country');
ENDIF;
ProductNameCode = ProductLineName |'-'| vProduct;
ProductCodeName =vProduct |'-'| ProductLineName;
IF (ATTRS('Product',vProduct, 'Name Code') @= '');
ATTRPUTS(ProductNameCode, 'Product',vProduct, 'Name Code');
ENDIF;
IF (ATTRS('Product',vProduct, 'Code Name') @= '');
ATTRPUTS(ProductCodeName, 'Product', vProduct, 'Code Name');
ENDIF;
-
- Posts: 10
- Joined: Thu Sep 19, 2013 6:38 pm
- OLAP Product: TM1
- Version: 10.1
- Excel Version: 2010
Re: Process failing periodically
Another update: I can replicate the issue by running all of my nightly chores, waiting for them to finish, and then running this process. I can re-run the process as many times as I want and it will fail everytime. However, if I unload the cube that the failing process uses as a data source, the process will execute successfully.
- Michel Zijlema
- Site Admin
- Posts: 712
- Joined: Wed May 14, 2008 5:22 am
- OLAP Product: TM1, PALO
- Version: both 2.5 and higher
- Excel Version: 2003-2007-2010
- Location: Netherlands
- Contact:
Re: Process failing periodically
The error message you published here tells you that you're trying to load data against an element in the Customer dimension that does not exist at the moment of that data-load action.nsalvarez wrote:Another update: I can replicate the issue by running all of my nightly chores, waiting for them to finish, and then running this process. I can re-run the process as many times as I want and it will fail everytime. However, if I unload the cube that the failing process uses as a data source, the process will execute successfully.
From the discussion above I now understand that the Customer dimension entry is an alias, and not the principal element name.
So what could be the reason for this? Some ideas:
Could it be in the order of things: you're trying to load the data before you added the element and/or it's alias? The fact that you can repeat the errors could be because you're rebuilding your Customer dimension from scratch each time (f.i. by using DimensionDeleteAllElements() on the Prolog tab).
Could it be that the Customer name changed and that the old name is still set as the alias value? Is it possible to use the principal element name when loading the data?
Are there any other error messages that you havent posted here that could be relevant for tracking down your issue?
Michel