Maximum number of parameter substitutions?

Hi, is there a maximum number of parameter substitutions in a CTL transformation?

In particular, about halfway through my denormalization code, I stop seeing the substitution, and instead see the name of the parameter passed as a string. It breaks at the same replacement for every record.

Originally the error looked as follows. It was breaking on field36 (and every field calculated thereafter):

…Field34|Field35|Field36|Field37…
…4^4|2011-03^2011-03|4105{MULTIASSIGN_DELIMITER}4105|134${MULTIASSIGN_DELIMITER}134…
…5^5|2011-03^2011-03|4077{MULTIASSIGN_DELIMITER}4077|134${MULTIASSIGN_DELIMITER}134…

If I switched the lines of code that calculated field35 and field 36, field35 broke (and every field calculated after):

…Field34|Field35|Field36|Field37…
…4^4|2011-03${MULTIASSIGN_DELIMITER}2011-03|4105^4105|134${MULTIASSIGN_DELIMITER}134…
…5^5|2011-03${MULTIASSIGN_DELIMITER}2011-03|4077^4077|134${MULTIASSIGN_DELIMITER}134…

Here is the offending code, I have starred the two lines that I switched on the above to produce there errors.

Any ideas? Not sure if I am just missing something simple here, fairly new to Clover.

Thanks!


//#CTL2
// This transformation defines the way in which multiple input records 
// (with the same key) are denormalized into one output record. 
integer n = 0;
string SortKey = "";
string P_GCARADAdoptionDateDaysAgo = "";
string P_GCARADAdoptionDateDateTime = "";
string P_GCARADAdoptionDateMonthsAgo = "";
string AdoptionDateMonthYear = "";
string CounterMeasureReferenceMonthYear = "";
string P_GCARADAdoptionDateP_CALDAYSK = "";
string P_GCARADAdoptionDateCALMONTHSK = "";
string P_GCARADAdoptionDateyyyyMMdd = "";
string P_GCARADAdoptionDateyyyy_MM_dd = "";
string P_GCARADModelCode = "";
string ADR_Y_N = "";
string BIC_Y_N = "";
string VehicleNMLProdCode = "";
string ModelYear = "";
string P_GCARPROAuthor = "";
string P_GCARPROCloseDateDaysAgo = "";
string P_GCARPROCloseDateDateTime = "";
string P_GCARPROCloseDateMonthsAgo = "";
string P_GCARPROCloseDateMonthYear = "";
string P_GCARPROCloseDateP_CALDAYSK = "";
string P_GCARPROCloseDateP_CALMONTHSK = "";
string P_GCARPROCloseDateyyyyMM = "";
string P_GCARPROCloseDateyyyyMMdd = "";
string P_GCARPROCloseDateyyyy_MM_dd = "";
string P_GCARPROCspeedLeadtime = "";
string P_GCARPROCStartDate = "";
string PFPFirstFive = "";
string P_GCARPROPubDate = "";
string P_GCARPROResponsibleName = "";
string PROStatus = "";
string P_GCARPROStatusDateDaysAgo = "";
string P_GCARPROStatusDateDateTime = "";
string P_GCARPROStatusDateMonthsAgo = "";
string P_GCARPROStatusDateMonthYear = "";
string P_GCARPROStatusDateP_CALDAYSK = "";
string P_GCARPROStatusDateP_CALMONTHSK = "";
string P_GCARPROStatusDateyyyyMM = "";
string P_GCARPROStatusDateyyyyMMdd = "";
string P_GCARPROStatusDateyyyy_MM_dd = "";
string P_GCARPROSubject = "";
string P_GCARPROCounterMeasureProReqNumber = "";
string P_GCARREQAssignedDate = "";
string P_GCARREQNumber = "";
string REQResponsibleMarket = "";
string P_GCARREQResponsibleName = "";
string REQStatus = "";
string P_GCARREQSubject = "";
string RecordHas = "";
string RecordType = "";
string P_RecSpec = "";
boolean first = true;

// This function is called for each input record from a group of records
// with the same key.
function integer append() {
	n++;
	if (first) {
            // autogenerate a key based on the display name
            // in the future we can expose this as a configurable option 
           
	SortKey = $0.SortKey;
	P_GCARADAdoptionDateDaysAgo = nvl($0.P_GCARADAdoptionDateDaysAgo,'');
	P_GCARADAdoptionDateDateTime = nvl($0.P_GCARADAdoptionDateDateTime,'');
	P_GCARADAdoptionDateMonthsAgo = nvl($0.P_GCARADAdoptionDateMonthsAgo,'');
	AdoptionDateMonthYear = nvl($0.AdoptionDateMonthYear,'');
	CounterMeasureReferenceMonthYear = nvl($0.CounterMeasureReferenceMonthYear,'');
	P_GCARADAdoptionDateP_CALDAYSK = nvl($0.P_GCARADAdoptionDateP_CALDAYSK,'');
	P_GCARADAdoptionDateCALMONTHSK = nvl($0.P_GCARADAdoptionDateCALMONTHSK,'');
	P_GCARADAdoptionDateyyyyMMdd = nvl($0.P_GCARADAdoptionDateyyyyMMdd,'');
	P_GCARADAdoptionDateyyyy_MM_dd = nvl($0.P_GCARADAdoptionDateyyyy_MM_dd,'');
	P_GCARADModelCode = nvl($0.P_GCARADModelCode,'');
	ADR_Y_N = nvl($0.ADR_Y_N,'');
	BIC_Y_N = nvl($0.BIC_Y_N,'');
	VehicleNMLProdCode = nvl($0.VehicleNMLProdCode,'');
	ModelYear = nvl($0.ModelYear,'');
	P_GCARPROAuthor = nvl($0.P_GCARPROAuthor,'');
	P_GCARPROCloseDateDaysAgo = nvl($0.P_GCARPROCloseDateDaysAgo,'');
	P_GCARPROCloseDateDateTime = nvl($0.P_GCARPROCloseDateDateTime,'');
	P_GCARPROCloseDateMonthsAgo = nvl($0.P_GCARPROCloseDateMonthsAgo,'');
	P_GCARPROCloseDateMonthYear = nvl($0.P_GCARPROCloseDateMonthYear,'');
	P_GCARPROCloseDateP_CALDAYSK = nvl($0.P_GCARPROCloseDateP_CALDAYSK,'');
	P_GCARPROCloseDateP_CALMONTHSK = nvl($0.P_GCARPROCloseDateP_CALMONTHSK,'');
	P_GCARPROCloseDateyyyyMM = nvl($0.P_GCARPROCloseDateyyyyMM,'');
	P_GCARPROCloseDateyyyyMMdd = nvl($0.P_GCARPROCloseDateyyyyMMdd,'');
	P_GCARPROCloseDateyyyy_MM_dd = nvl($0.P_GCARPROCloseDateyyyy_MM_dd,'');
	P_GCARPROCspeedLeadtime = nvl($0.P_GCARPROCspeedLeadtime,'');
	P_GCARPROCStartDate = nvl($0.P_GCARPROCStartDate,'');
	PFPFirstFive = nvl($0.PFPFirstFive,'');
	P_GCARPROPubDate = nvl($0.P_GCARPROPubDate,'');
	P_GCARPROResponsibleName = nvl($0.P_GCARPROResponsibleName,'');
	PROStatus = nvl($0.PROStatus,'');
	P_GCARPROStatusDateDaysAgo = nvl($0.P_GCARPROStatusDateDaysAgo,'');
	P_GCARPROStatusDateDateTime = nvl($0.P_GCARPROStatusDateDateTime,'');
	P_GCARPROStatusDateMonthsAgo = nvl($0.P_GCARPROStatusDateMonthsAgo,'');
	P_GCARPROStatusDateMonthYear = nvl($0.P_GCARPROStatusDateMonthYear,'');
	P_GCARPROStatusDateP_CALDAYSK = nvl($0.P_GCARPROStatusDateP_CALDAYSK,'');
	P_GCARPROStatusDateP_CALMONTHSK = nvl($0.P_GCARPROStatusDateP_CALMONTHSK,'');
	P_GCARPROStatusDateyyyyMM = nvl($0.P_GCARPROStatusDateyyyyMM,'');
	P_GCARPROStatusDateyyyyMMdd = nvl($0.P_GCARPROStatusDateyyyyMMdd,'');
	P_GCARPROStatusDateyyyy_MM_dd = nvl($0.P_GCARPROStatusDateyyyy_MM_dd,'');
	P_GCARPROSubject = nvl($0.P_GCARPROSubject,'');
	P_GCARPROCounterMeasureProReqNumber = nvl($0.P_GCARPROCounterMeasureProReqNumber,'');
	P_GCARREQAssignedDate = nvl($0.P_GCARREQAssignedDate,'');
	P_GCARREQNumber = nvl($0.P_GCARREQNumber,'');
	REQResponsibleMarket = nvl($0.REQResponsibleMarket,'');
	P_GCARREQResponsibleName = nvl($0.P_GCARREQResponsibleName,'');
	REQStatus = nvl($0.REQStatus,'');
	P_GCARREQSubject = nvl($0.P_GCARREQSubject,'');
	RecordHas = nvl($0.RecordHas,'');
	RecordType = nvl($0.RecordType,'');
	P_RecSpec = nvl($0.P_RecSpec,'');
	}
      
	SortKey = $0.SortKey;
	P_GCARADAdoptionDateDaysAgo = P_GCARADAdoptionDateDaysAgo + '${MULTIASSIGN_DELIMITER}' + nvl($0.P_GCARADAdoptionDateDaysAgo,'');
	P_GCARADAdoptionDateDateTime = P_GCARADAdoptionDateDateTime + '${MULTIASSIGN_DELIMITER}' + nvl($0.P_GCARADAdoptionDateDateTime,'');
	P_GCARADAdoptionDateMonthsAgo = P_GCARADAdoptionDateMonthsAgo + '${MULTIASSIGN_DELIMITER}' + nvl($0.P_GCARADAdoptionDateMonthsAgo,'');
	AdoptionDateMonthYear = AdoptionDateMonthYear + '${MULTIASSIGN_DELIMITER}' + nvl($0.AdoptionDateMonthYear,'');
	CounterMeasureReferenceMonthYear = CounterMeasureReferenceMonthYear + '${MULTIASSIGN_DELIMITER}' + nvl($0.CounterMeasureReferenceMonthYear,'');
	P_GCARADAdoptionDateP_CALDAYSK = P_GCARADAdoptionDateP_CALDAYSK + '${MULTIASSIGN_DELIMITER}' + nvl($0.P_GCARADAdoptionDateP_CALDAYSK,'');
	P_GCARADAdoptionDateCALMONTHSK = P_GCARADAdoptionDateCALMONTHSK + '${MULTIASSIGN_DELIMITER}' + nvl($0.P_GCARADAdoptionDateCALMONTHSK,'');
	P_GCARADAdoptionDateyyyyMMdd = P_GCARADAdoptionDateyyyyMMdd + '${MULTIASSIGN_DELIMITER}' + nvl($0.P_GCARADAdoptionDateyyyyMMdd,'');
	P_GCARADAdoptionDateyyyy_MM_dd = P_GCARADAdoptionDateyyyy_MM_dd + '${MULTIASSIGN_DELIMITER}' + nvl($0.P_GCARADAdoptionDateyyyy_MM_dd,'');
	P_GCARADModelCode = P_GCARADModelCode + '${MULTIASSIGN_DELIMITER}' + nvl($0.P_GCARADModelCode,'');
	ADR_Y_N = ADR_Y_N + '${MULTIASSIGN_DELIMITER}' + nvl($0.ADR_Y_N,'');
	BIC_Y_N = BIC_Y_N + '${MULTIASSIGN_DELIMITER}' + nvl($0.BIC_Y_N,'');
	VehicleNMLProdCode = $0.VehicleNMLProdCode;
	ModelYear = $0.ModelYear;
	P_GCARPROAuthor = P_GCARPROAuthor + '${MULTIASSIGN_DELIMITER}' + nvl($0.P_GCARPROAuthor,'');
	P_GCARPROCloseDateDaysAgo = P_GCARPROCloseDateDaysAgo + '${MULTIASSIGN_DELIMITER}' + nvl($0.P_GCARPROCloseDateDaysAgo,'');
	P_GCARPROCloseDateDateTime = P_GCARPROCloseDateDateTime + '${MULTIASSIGN_DELIMITER}' + nvl($0.P_GCARPROCloseDateDateTime,'');
	P_GCARPROCloseDateMonthsAgo = P_GCARPROCloseDateMonthsAgo + '${MULTIASSIGN_DELIMITER}' + nvl($0.P_GCARPROCloseDateMonthsAgo,'');
	P_GCARPROCloseDateMonthYear = P_GCARPROCloseDateMonthYear + '${MULTIASSIGN_DELIMITER}' + nvl($0.P_GCARPROCloseDateMonthYear,'');
	P_GCARPROCloseDateP_CALDAYSK = P_GCARPROCloseDateP_CALDAYSK + '${MULTIASSIGN_DELIMITER}' + nvl($0.P_GCARPROCloseDateP_CALDAYSK,'');
	P_GCARPROCloseDateP_CALMONTHSK = P_GCARPROCloseDateP_CALMONTHSK + '${MULTIASSIGN_DELIMITER}' + nvl($0.P_GCARPROCloseDateP_CALMONTHSK,'');
	P_GCARPROCloseDateyyyyMM = P_GCARPROCloseDateyyyyMM + '${MULTIASSIGN_DELIMITER}' + nvl($0.P_GCARPROCloseDateyyyyMM,'');
	P_GCARPROCloseDateyyyyMMdd = P_GCARPROCloseDateyyyyMMdd + '${MULTIASSIGN_DELIMITER}' + nvl($0.P_GCARPROCloseDateyyyyMMdd,'');
	P_GCARPROCloseDateyyyy_MM_dd = P_GCARPROCloseDateyyyy_MM_dd + '${MULTIASSIGN_DELIMITER}' + nvl($0.P_GCARPROCloseDateyyyy_MM_dd,'');
	P_GCARPROCspeedLeadtime = P_GCARPROCspeedLeadtime + '${MULTIASSIGN_DELIMITER}' + nvl($0.P_GCARPROCspeedLeadtime,'');
	P_GCARPROCStartDate = P_GCARPROCStartDate + '${MULTIASSIGN_DELIMITER}' + nvl($0.P_GCARPROCStartDate,'');
	PFPFirstFive = $0.PFPFirstFive;
	P_GCARPROPubDate = P_GCARPROPubDate + '${MULTIASSIGN_DELIMITER}' + nvl($0.P_GCARPROPubDate,'');
	P_GCARPROResponsibleName = P_GCARPROResponsibleName + '${MULTIASSIGN_DELIMITER}' + nvl($0.P_GCARPROResponsibleName,'');
	PROStatus = PROStatus + '${MULTIASSIGN_DELIMITER}' + nvl($0.PROStatus,'');
	P_GCARPROStatusDateDaysAgo = P_GCARPROStatusDateDaysAgo + '${MULTIASSIGN_DELIMITER}' + nvl($0.P_GCARPROStatusDateDaysAgo,'');
	P_GCARPROStatusDateDateTime = P_GCARPROStatusDateDateTime + '${MULTIASSIGN_DELIMITER}' + nvl($0.P_GCARPROStatusDateDateTime,'');
	P_GCARPROStatusDateMonthsAgo = P_GCARPROStatusDateMonthsAgo + '${MULTIASSIGN_DELIMITER}' + nvl($0.P_GCARPROStatusDateMonthsAgo,'');
*****P_GCARPROStatusDateMonthYear = P_GCARPROStatusDateMonthYear + '${MULTIASSIGN_DELIMITER}' + nvl($0.P_GCARPROStatusDateMonthYear,'');
*****P_GCARPROStatusDateP_CALDAYSK = P_GCARPROStatusDateP_CALDAYSK + '${MULTIASSIGN_DELIMITER}' + nvl($0.P_GCARPROStatusDateP_CALDAYSK,'');
	P_GCARPROStatusDateP_CALMONTHSK = P_GCARPROStatusDateP_CALMONTHSK + '${MULTIASSIGN_DELIMITER}' + nvl($0.P_GCARPROStatusDateP_CALMONTHSK,'');
	P_GCARPROStatusDateyyyyMM = P_GCARPROStatusDateyyyyMM + '${MULTIASSIGN_DELIMITER}' + nvl($0.P_GCARPROStatusDateyyyyMM,'');
	P_GCARPROStatusDateyyyyMMdd = P_GCARPROStatusDateyyyyMMdd + '${MULTIASSIGN_DELIMITER}' + nvl($0.P_GCARPROStatusDateyyyyMMdd,'');
	P_GCARPROStatusDateyyyy_MM_dd = P_GCARPROStatusDateyyyy_MM_dd + '${MULTIASSIGN_DELIMITER}' + nvl($0.P_GCARPROStatusDateyyyy_MM_dd,'');
	P_GCARPROSubject = P_GCARPROSubject + '${MULTIASSIGN_DELIMITER}' + nvl($0.P_GCARPROSubject,'');
	P_GCARPROCounterMeasureProReqNumber = P_GCARPROCounterMeasureProReqNumber + '${MULTIASSIGN_DELIMITER}' + nvl($0.P_GCARPROCounterMeasureProReqNumber,'');
	P_GCARREQAssignedDate = P_GCARREQAssignedDate + '${MULTIASSIGN_DELIMITER}' + nvl($0.P_GCARREQAssignedDate,'');
	P_GCARREQNumber = P_GCARREQNumber + '${MULTIASSIGN_DELIMITER}' + nvl($0.P_GCARREQNumber,'');
	REQResponsibleMarket = REQResponsibleMarket + '${MULTIASSIGN_DELIMITER}' + nvl($0.REQResponsibleMarket,'');
	P_GCARREQResponsibleName = P_GCARREQResponsibleName + '${MULTIASSIGN_DELIMITER}' + nvl($0.P_GCARREQResponsibleName,'');
	REQStatus = REQStatus + '${MULTIASSIGN_DELIMITER}' + nvl($0.REQStatus,'');
	P_GCARREQSubject = P_GCARREQSubject + '${MULTIASSIGN_DELIMITER}' + nvl($0.P_GCARREQSubject,'');
	RecordHas = RecordHas + '${MULTIASSIGN_DELIMITER}' + nvl($0.RecordHas,'');
	RecordType = RecordType + '${MULTIASSIGN_DELIMITER}' + nvl($0.RecordType,'');
	P_RecSpec = P_RecSpec + '${MULTIASSIGN_DELIMITER}' + nvl($0.P_RecSpec,'');

	first = false;
	return n;
}

      
// This function is called once after the append() function was called for all records
// of a group of input records defined by the key.
// It creates a single output record for the whole group.
function integer transform() {

	$0.SortKey = SortKey;
	$0.P_GCARADAdoptionDateDaysAgo = P_GCARADAdoptionDateDaysAgo;
	$0.P_GCARADAdoptionDateDateTime = P_GCARADAdoptionDateDateTime;
	$0.P_GCARADAdoptionDateMonthsAgo = P_GCARADAdoptionDateMonthsAgo;
	$0.AdoptionDateMonthYear = AdoptionDateMonthYear;
	$0.CounterMeasureReferenceMonthYear = CounterMeasureReferenceMonthYear;
	$0.P_GCARADAdoptionDateP_CALDAYSK = P_GCARADAdoptionDateP_CALDAYSK;
	$0.P_GCARADAdoptionDateCALMONTHSK = P_GCARADAdoptionDateCALMONTHSK;
	$0.P_GCARADAdoptionDateyyyyMMdd = P_GCARADAdoptionDateyyyyMMdd;
	$0.P_GCARADAdoptionDateyyyy_MM_dd = P_GCARADAdoptionDateyyyy_MM_dd;
	$0.P_GCARADModelCode = P_GCARADModelCode;
	$0.ADR_Y_N = ADR_Y_N;
	$0.BIC_Y_N = BIC_Y_N;
	$0.VehicleNMLProdCode = VehicleNMLProdCode;
	$0.ModelYear = ModelYear;
	$0.P_GCARPROAuthor = P_GCARPROAuthor;
	$0.P_GCARPROCloseDateDaysAgo = P_GCARPROCloseDateDaysAgo;
	$0.P_GCARPROCloseDateDateTime = P_GCARPROCloseDateDateTime;
	$0.P_GCARPROCloseDateMonthsAgo = P_GCARPROCloseDateMonthsAgo;
	$0.P_GCARPROCloseDateMonthYear = P_GCARPROCloseDateMonthYear;
	$0.P_GCARPROCloseDateP_CALDAYSK = P_GCARPROCloseDateP_CALDAYSK;
	$0.P_GCARPROCloseDateP_CALMONTHSK = P_GCARPROCloseDateP_CALMONTHSK;
	$0.P_GCARPROCloseDateyyyyMM = P_GCARPROCloseDateyyyyMM;
	$0.P_GCARPROCloseDateyyyyMMdd = P_GCARPROCloseDateyyyyMMdd;
	$0.P_GCARPROCloseDateyyyy_MM_dd = P_GCARPROCloseDateyyyy_MM_dd;
	$0.P_GCARPROCspeedLeadtime = P_GCARPROCspeedLeadtime;
	$0.P_GCARPROCStartDate = P_GCARPROCStartDate;
	$0.PFPFirstFive = PFPFirstFive;
	$0.P_GCARPROPubDate = P_GCARPROPubDate;
	$0.P_GCARPROResponsibleName = P_GCARPROResponsibleName;
	$0.PROStatus = PROStatus;
	$0.P_GCARPROStatusDateDaysAgo = P_GCARPROStatusDateDaysAgo;
	$0.P_GCARPROStatusDateDateTime = P_GCARPROStatusDateDateTime;
	$0.P_GCARPROStatusDateMonthsAgo = P_GCARPROStatusDateMonthsAgo;
	$0.P_GCARPROStatusDateMonthYear = P_GCARPROStatusDateMonthYear;
	$0.P_GCARPROStatusDateP_CALDAYSK = P_GCARPROStatusDateP_CALDAYSK;
	$0.P_GCARPROStatusDateP_CALMONTHSK = P_GCARPROStatusDateP_CALMONTHSK;
	$0.P_GCARPROStatusDateyyyyMM = P_GCARPROStatusDateyyyyMM;
	$0.P_GCARPROStatusDateyyyyMMdd = P_GCARPROStatusDateyyyyMMdd;
	$0.P_GCARPROStatusDateyyyy_MM_dd = P_GCARPROStatusDateyyyy_MM_dd;
	$0.P_GCARPROSubject = P_GCARPROSubject;
	$0.P_GCARPROCounterMeasureProReqNumber = P_GCARPROCounterMeasureProReqNumber;
	$0.P_GCARREQAssignedDate = P_GCARREQAssignedDate;
	$0.P_GCARREQNumber = P_GCARREQNumber;
	$0.REQResponsibleMarket = REQResponsibleMarket;
	$0.P_GCARREQResponsibleName = P_GCARREQResponsibleName;
	$0.REQStatus = REQStatus;
	$0.P_GCARREQSubject = P_GCARREQSubject;
	$0.RecordHas = RecordHas;
	$0.RecordType = RecordType;
	$0.P_RecSpec = P_RecSpec;

      
	first = true;
	n = 0;
	return OK;
}
// Called during component initialization.
// function boolean init() {}

// Called during each graph run before the transform is executed. May be used to allocate and initialize resources
// required by the transform. All resources allocated within this method should be released
// by the postExecute() method.
// function void preExecute() {}

// Called only if append() throws an exception.
// function integer appendOnError(string errorMessage, string stackTrace) {
// }

// Called only if transform() throws an exception.
//function integer transformOnError(string errorMessage, string stackTrace) {
//}

// Called after transform() to return the resources that have been used to their initial state
// so that next group of records with different key may be parsed.
// function void clean() {}

// Called during each graph run after the entire transform was executed. Should be used to free any resources
// allocated within the preExecute() method.
// function void postExecute() {}

// Called to return a user-defined error message when an error occurs.
// function string getMessage() {}

HI,

There should be no such hard limit. All occurrences of the parameter should be replaced with its actual value.

As a workaround, can you try to assign the param to some string variable and use that instead of the param.

We will try to reproduce this issue to find whether it is a bug or some config problem.

David.

Hello,
this behaviour is caused by checking for infinitive loop (that can be caused by auto-reference of parameter) in parameter substitution. To increase the number of resolved parameters, please increase GraphProperties.PROPERTY_ALLOWED_RECURSION_DEPTH default parameter (see Changing Default CloverETL Settings).

Perfect, that setting worked. Thanks!