Key column in schema file
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 497
- Joined: Sun Dec 17, 2006 11:52 pm
- Location: Kolkata
- Contact:
Key column in schema file
Hi,
How to define a key column in schema file.
Thanks in advance.
How to define a key column in schema file.
Thanks in advance.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Premium Member
- Posts: 497
- Joined: Sun Dec 17, 2006 11:52 pm
- Location: Kolkata
- Contact:
Thanks for the reply. Can you please give an example, the way we were trying it was we picked the parallel layout of the table definition, defined one of the columns in the table as key but there was no change in the layout of the table definition and we searched the documentation on the schema file also nothing was mentioned for the key in the schema files.ray.wurlod wrote:{Key} ...
-
- Premium Member
- Posts: 497
- Joined: Sun Dec 17, 2006 11:52 pm
- Location: Kolkata
- Contact:
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Add "$OSH_PRINT_SCHEMAS" to a job's parameters and experiment for yourself how the key column setting is reflected in a schema.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Most record schemas don't need the key property, so don't store it in there but, instead, pick up the key property from the stored metadata at run time.
You can see this by opening any table definition that has a Key defined, select the Layout tab then select the Parallel option.
You can see this by opening any table definition that has a Key defined, select the Layout tab then select the Parallel option.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Premium Member
- Posts: 497
- Joined: Sun Dec 17, 2006 11:52 pm
- Location: Kolkata
- Contact:
-
- Premium Member
- Posts: 497
- Joined: Sun Dec 17, 2006 11:52 pm
- Location: Kolkata
- Contact:
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
The stage uses the (table definition) metadata stored within DataStage to determine which column references need to be included in the WHERE clause. As I mentioned earlier, this information is not obtained from the record schema. If it really irks you, you can include a comment in your record schema.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Premium Member
- Posts: 138
- Joined: Wed Jul 16, 2008 9:51 pm
- Location: Kolkata
The syntax for mentioning a record in a schema file is
Example
Thanks,
Tony
Code: Select all
Column Name:Nullability:Data Type [Length] {Key}
Code: Select all
record(name:not nullable:string:[255] {Key};value1:int32;date:date)
Tony
-
- Participant
- Posts: 62
- Joined: Sat Mar 07, 2009 4:59 am
- Location: Chicago
- Contact:
Basically we are also using schema files to read the data from a sequential file stage , at job level and at stage level, we mentioned as key.In schema file we are using like following
If the datatype is string and nullable
colum_name:nullable string[max=10] {quote=none};
If the datatype is string and not nullable
colum_name:string[max=10] {quote=none};
If the datatype is integer and nullable
colum_name:nullable int32 {quote=none};
If the datatype is integer and not nullable
colum_name:int32 {quote=none};
we always bothered null and not null not a key
If the datatype is string and nullable
colum_name:nullable string[max=10] {quote=none};
If the datatype is string and not nullable
colum_name:string[max=10] {quote=none};
If the datatype is integer and nullable
colum_name:nullable int32 {quote=none};
If the datatype is integer and not nullable
colum_name:int32 {quote=none};
we always bothered null and not null not a key
Suresh Reddy
ETL Developer
Research Operations
"its important to know in which direction we are moving rather than where we are"
ETL Developer
Research Operations
"its important to know in which direction we are moving rather than where we are"
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: