Page 1 of 1
Problem in Surrogate key stage
Posted: Fri Feb 17, 2006 6:26 am
by r
hi ,
i was having problem with surrogate key stage.
I am having a failed validation while using a surrogate key generator stage.The error that is specified is
Surrogate_Key_Generator_1: One of these must be provided:
Surrogate_Key_Generator_1: -schema
Surrogate_Key_Generator_1: ,
Surrogate_Key_Generator_1: -schemafile
the code is as follows:
Code: Select all
Surrogate key name =s1
Output type = 32 bit integer
start value=1
Input:
partitioning=Auto
Coulumns
k1 integer len=10 Nullable =yes
k2 integer len=10 Nullable =yes
k3 integer len=10 Nullable =yes
Output:
Coulumns
s1 integer len=10 Nullable =no key
k1 integer len=10 Nullable =yes
k2 integer len=10 Nullable =yes
k3 integer len=10 Nullable =yes
Please help me out
Thanks & Regards
r
Posted: Fri Feb 17, 2006 12:20 pm
by tardifma
Hi r.
Can we have a little bit more detail about your job...
From what I know, I schema file is used by a Column Generator or a Row generator...
I've never seen the option "Schema file" or "Schema" in a surrogate key generator...
What looks like your mapping? Is Surrogate_Key_Generator_1 is really the name of the stage???
Give us more detail please.
Thanks
Posted: Fri Feb 17, 2006 1:56 pm
by aramachandra
I was going to say the same as the previous poster..
It looks like you might want to review your metadata to ensure there is not mismatch there...
I have not seen this in the surrogate key generator error..
arvind
Posted: Fri Feb 17, 2006 3:05 pm
by kwwilliams
r,
I created a job with the exact same inputs and puts that you had and get it to compile without any error.
Here is my OSH:
Code: Select all
################################################################################################################
#### STAGE: Sequential_File_1
## Operator
export
## Operator options
-schema record
{final_delim=end, delim=',', quote=double}
(
k1:nullable int32;
k2:nullable int32;
k3:nullable int32;
s1:int32;
)
-file '[&_TARGETDIR]/testkww.txt'
-overwrite
-rejects continue
## General options
[ident('Sequential_File_1'); jobmon_ident('Sequential_File_1')]
## Inputs
0< 'Surrogate_Key_Generator_2:DSLink5.v'
;
#################################################################
#### STAGE: Surrogate_Key_Generator_2
## Operator
generator
## Operator options
-schema record
(
s1:int32 {cycle={init='1+part',incr=partcount}};
)
## General options
[ident('Surrogate_Key_Generator_2'); jobmon_ident('Surrogate_Key_Generator_2'); par]
## Inputs
0< 'Row_Generator_3:DSLink4.v'
## Outputs
0> [] 'Surrogate_Key_Generator_2:DSLink5.v'
;
#################################################################
#### STAGE: Row_Generator_3
## Operator
generator
## Operator options
-schema record
(
k1:nullable int32 {cycle={init=1}};
k2:nullable int32 {cycle={init=2}};
k3:nullable int32 {cycle={init=3}};
)
-records 10
## General options
[ident('Row_Generator_3'); jobmon_ident('Row_Generator_3')]
## Outputs
0> [] 'Row_Generator_3:DSLink4.v'
;
If I were you, I would open a case with IBM. Have you been able to use the Surrogate Key Generator in the past?
Posted: Fri Feb 17, 2006 9:47 pm
by kumar_s
What is the structure of you job.
Just try with a row generator and seq generator and a sequential file, to ensure, not issue with surrogate key.
-Kumar
Posted: Sat Feb 18, 2006 2:32 pm
by ray.wurlod
You need to pass at least one other column through the stage. Having a column generates a schema for the stage. Or you can specify a schema file or runtime column propagation in the stage properties.