Problem with StringToTime conversion
Moderators: chulett, rschirm, roy
Problem with StringToTime conversion
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
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.
This is a red herring, the compiler couldn't care less what the format of the string is (and wouldn't even know).abhijain wrote: Check whether date format of string and format in transformer are matching.
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.)
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
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.
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
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.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
@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""
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.