Problem with StringToTime conversion

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
aaron102
Participant
Posts: 17
Joined: Mon Nov 09, 2009 12:23 am

Problem with StringToTime conversion

Post by aaron102 »

My job is like

Teradata API->Transformer->DataSet

In Teradata API i am selecting a string field and casting into character.
In transformer i am trying to use StringToTime(A_TM,"%hh:%nn:%ss") so that i can convert it into Time field and later on insert into a dataset.

But while compiling i get the error "Error compiling Parallel Transformer"

Any sought of help would be well appraciated
Good comes to those who seldom wish for it.
anbu
Premium Member
Premium Member
Posts: 596
Joined: Sat Feb 18, 2006 2:25 am
Location: india

Post by anbu »

Can you post full error message?
You are the creator of your destiny - Swami Vivekananda
abhijain
Participant
Posts: 88
Joined: Wed Jun 13, 2007 1:10 pm
Location: India

Post by abhijain »

Post the full error log.

Check whether date format of string and format in transformer are matching.
Rgrds,
Abhi
Kryt0n
Participant
Posts: 584
Joined: Wed Jun 22, 2005 7:28 pm

Post by Kryt0n »

abhijain wrote: Check whether date format of string and format in transformer are matching.
This is a red herring, the compiler couldn't care less what the format of the string is (and wouldn't even know).

However, you would hope there is a better error message than what you provided so answering such requests is valid. (I assume you have compiled other parallel jobs before? If not, try compile another job/check compiler installed and correctly referenced.)
aaron102
Participant
Posts: 17
Joined: Mon Nov 09, 2009 12:23 am

Post by aaron102 »

Here is the errored transformer compilation code

Output from transformer compilation follows:

##I TFCN 000001 00:39:42(000) <main_program>
Ascential DataStage(tm) Enterprise Edition 7.5.2
Copyright (c) 2004, 1997-2004 Ascential Software Corporation.
All Rights Reserved


##I TOSH 000002 00:39:42(001) <main_program> orchgeneral: loaded
##I TOSH 000002 00:39:42(002) <main_program> orchsort: loaded
##I TOSH 000002 00:39:42(003) <main_program> orchstats: loaded
##I TFSC 000001 00:39:42(006) <main_program> APT configuration file: /ascential/Ascential/Projects/GDW_DEV/GDW_DEV.apt
##I TFSC 000000 00:39:42(007) <main_program>
This step has no datasets.

It has 1 operator:
op0[1p] {(sequential APT_CombinedOperatorController:
(APT_LicenseCountOp in APT_LicenseOperator)
(APT_LicenseCheckOp in APT_LicenseOperator)
) on nodes (
node1[op0,p0]
)}
It runs 1 process on 1 node.
##I TFPM 000201 00:39:43(000) <APT_CombinedOperatorController,0> APT_PMPlayer: new Player running, PID = 17911
##I TFOP 000094 00:39:43(001) <APT_LicenseCountOp in APT_LicenseOperator,0> Output 0 produced 1 records.
##I TLIC 000163 00:39:43(002) <APT_LicenseCheckOp in APT_LicenseOperator,0> Input 0 consumed 1 records.
##W TCOS 000049 00:39:43(000) <main_program> Parameter specified but not used in flow: DSPXWorkingDir
##I TCOS 000000 00:39:43(001) <main_program> Echo:
transform -inputschema record
(
A_TM:string[8];
)
-outputschema record
(
A_TM:time;
)
-expressionfile RT_SC6352/V0S233_Load_ReceiptAdj_AC_Tfm_ReceiptA.trx
-flag compile
-compiler '/opt/SUNWspro/bin/CC'
-compileopt '-dalign -O -PIC -library=iostream -c'
-linker '/opt/SUNWspro/bin/CC'
-linkopt '-G -library=iostream'
-name V0S233_Load_ReceiptAdj_AC_Tfm_ReceiptA
-dir /ascential/Ascential/Projects/GDW_DEV/RT_BP6352.O

##W TCOS 000049 00:39:43(002) <main_program> Parameter specified but not used in flow: DSPXWorkingDir
##I TCOS 000023 00:39:43(004) <main_program> Dump:
{
text="transform -inputschema record ( A_TM: string[8]; )\n-outputschema record ( A_TM: time; )\n-expressionfile RT_SC6352/V0S233_Load_ReceiptAdj_AC_Tfm_ReceiptA.trx\n-flag compile\n-compiler '/opt/SUNWspro/bin/CC'\n-compileopt '-dalign -O -PIC -library=iostream -c'\n-linker '/opt/SUNWspro/bin/CC'\n-linkopt '-G -library=iostream'\n-name V0S233_Load_ReceiptAdj_AC_Tfm_ReceiptA\n-dir /ascential/Ascential/Projects/GDW_DEV/RT_BP6352.O",
line=1, column=1, name="", qualname="",
op={
text="transform -inputschema record ( A_TM: string[8]; )\n-outputschema record ( A_TM: time; )\n-expressionfile RT_SC6352/V0S233_Load_ReceiptAdj_AC_Tfm_ReceiptA.trx\n-flag compile\n-compiler '/opt/SUNWspro/bin/CC'\n-compileopt '-dalign -O -PIC -library=iostream -c'\n-linker '/opt/SUNWspro/bin/CC'\n-linkopt '-G -library=iostream'\n-name V0S233_Load_ReceiptAdj_AC_Tfm_ReceiptA\n-dir /ascential/Ascential/Projects/GDW_DEV/RT_BP6352.O",
line=1, column=1, name=transform, qualname=transform,
wrapout={},
wrapperfile=transform, kind=non_wrapper_cdi_op, exec_mode=none,
args="'record ( A_TM: string[8]; )'-outputschema'record ( A_TM: time; )'-expressionfile'RT_SC6352/V0S233_Load_ReceiptAdj_AC_Tfm_ReceiptA.trx'-flag'compile'-compiler'/opt/SUNWspro/bin/CC'-compileopt'-dalign -O -PIC -library=iostream -c'-linker'/opt/SUNWspro/bin/CC'-linkopt'-G -library=iostream'-name'V0S233_Load_ReceiptAdj_AC_Tfm_ReceiptA'-dir'/ascential/Ascential/Projects/GDW_DEV/RT_BP6352.O'"
}
}
.
##E TBLD 000000 00:39:46(000) <main_program> Error when checking composite operator: Subprocess command failed with exit status 1024.
##E TFSR 000019 00:39:46(001) <main_program> Could not check all operators because of previous error(s)
##W TFCP 000000 00:39:46(002) <transform> Error when checking composite operator: The number of reject datasets "0" is less than the number of input datasets "1".
##W TBLD 000000 00:39:46(003) <main_program> Error when checking composite operator: Output from subprocess: "/ascential/Ascential/Projects/GDW_DEV/RT_BP6352.O/V0S233_Load_ReceiptAdj_AC_Tfm_ReceiptA.C", line 163: Error: Type name expected instead of "APT_OutputAccessorToTime".
"/ascential/Ascential/Projects/GDW_DEV/RT_BP6352.O/V0S233_Load_ReceiptAdj_AC_Tfm_ReceiptA.C", line 507: Error: Could not find a match for std::pair<const APT_String, APT_OutputAccessorBase*>::pair(const char[14], int*) needed in APT_TransformOperatorImplV0S233_Load_ReceiptAdj_AC_Tfm_ReceiptA::doInitialProcessing().
##W TBLD 000000 00:39:46(004) <main_program> Error when checking composite operator: Output from subprocess:
"/ascential/Ascential/Projects/GDW_DEV/RT_BP6352.O/V0S233_Load_ReceiptAdj_AC_Tfm_ReceiptA.C", line 551: Error: Pointer type needed instead of int.
"/ascential/Ascential/Projects/GDW_DEV/RT_BP6352.O/V0S233_Load_ReceiptAdj_AC_Tfm_ReceiptA.C", line 554: Error: Pointer type needed instead of int.
4 Error(s) detected.

##I TFCP 000000 00:39:46(005) <transform> Error when checking composite operator: /opt/SUNWspro/bin/CC -KPIC -O -I/ascential/Ascential/DataStage/PXEngine/include -dalign -O -PIC -library=iostream -c /ascential/Ascential/Projects/GDW_DEV/RT_BP6352.O/V0S233_Load_ReceiptAdj_AC_Tfm_ReceiptA.C -o /ascential/Ascential/Projects/GDW_DEV/RT_BP6352.O/V0S233_Load_ReceiptAdj_AC_Tfm_ReceiptA.tmp.o.
##E TCOS 000029 00:39:46(006) <main_program> Creation of a step finished with status = FAILED. (Load_ReceiptAdj_AC.Tfm_ReceiptA)

*** Internal Generated Transformer Code follows:
0001: //
0002: // Generated file to implement the V0S233_repos_Tfm_ReceiptA transform operator.
0003: //
0004:
0005: // define our input/output link names
0006: inputname 0 SrcLnk_ReceiptA;
0007: outputname 0 TfmLnk_ReceiptA;
0008:
0009: initialize {
0010: // define our row rejected variable
0011: int8 RowRejected0;
0012:
0013: // define our null set variable
0014: int8 NullSetVar0;
0015:
0016: // declare our intermediate variables for this section
0017: string InterVar0_0;
0018:
0019: // initialise constant values which require conversion
0020: InterVar0_0 = "%hh:%nn:%ss";
0021: }
0022:
0023: mainloop {
0024: // initialise our row rejected variable
0025: RowRejected0 = 1;
0026:
0027: // evaluate columns (no constraints) for link: TfmLnk_ReceiptA
0028: TfmLnk_ReceiptA.A_TM = time_from_string(SrcLnk_ReceiptA.A_TM , InterVar0_0);
0029: writerecord 0;
0030: RowRejected0 = 0;
0031: }
0032:
0033: finish {
0034: }
0035:
*** End of Internal Generated Transformer Code
Good comes to those who seldom wish for it.
kiran259
Participant
Posts: 48
Joined: Thu Aug 16, 2007 11:17 pm
Location: United States
Contact:

Post by kiran259 »

<Parameter specified but not used in flow>.Well,this may come due to various reasons.It will not give any validation errors,as this is not a syntax error.Check the flow once again.
Kiran Vaduguri

As soon as the fear approaches near, attack and destroy it.
aaron102
Participant
Posts: 17
Joined: Mon Nov 09, 2009 12:23 am

Post by aaron102 »

The flow is quite direct, one column A_TM which is character column is selected Through Teradata API stage (now i even tried with Teradata Enterprise Stage just to see any implicit conversions are happening,but still Transformer Compilation error exists) .Later on taken it to Transformer to do a StringtoTime function which should have converted to the Time format hh:nn:ss and at last load to a dataset.

I tried other string functions like Right,Len,Space all functions (that i tried in random) are working on the same Transformer but not StringtoTime
Good comes to those who seldom wish for it.
Kryt0n
Participant
Posts: 584
Joined: Wed Jun 22, 2005 7:28 pm

Post by Kryt0n »

Error when checking composite operator: The number of reject datasets "0" is less than the number of input datasets "1".
By the looks of things you are attempting to reject records but haven't set up a reject link.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

This message can also be generated if your C++ compiler license has expired or your C++ compiler/linker is not configured correctly.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
aaron102
Participant
Posts: 17
Joined: Mon Nov 09, 2009 12:23 am

Post by aaron102 »

@Ray

If the C++ compiler has expired,will the other jobs in the project compile and run.Because other jobs at present in the project runs perfectly.

@Kryton

I converted the link btw transformer to dataset to reject link and while doing so i got a differnt compilation error code without the following "Error when checking composite operator: The number of reject datasets "0" is less than the number of input datasets "1""
Good comes to those who seldom wish for it.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Make sure you understand that the C++ compiler only kicks in during the "compile" process when a transformer is involved.
-craig

"You can never have too many knives" -- Logan Nine Fingers
kiran259
Participant
Posts: 48
Joined: Thu Aug 16, 2007 11:17 pm
Location: United States
Contact:

Post by kiran259 »

What is the datatype in dataset while loading?
Kiran Vaduguri

As soon as the fear approaches near, attack and destroy it.
aaron102
Participant
Posts: 17
Joined: Mon Nov 09, 2009 12:23 am

Post by aaron102 »

Guys,

Got info from Admin Team that some patch is missing which cause this particular StringToTime function not to perform.

So part of this problem complete job is converted to Bteq

Thanks for all your valued help
Good comes to those who seldom wish for it.
Post Reply