Loading the schema file

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
jaysheel
Participant
Posts: 57
Joined: Mon Apr 07, 2008 1:54 am
Location: Bangalore

Loading the schema file

Post by jaysheel »

Hi,

I have a schema file saved as .txt which looks like this.

record
{final_delim=end, delim=',', quote=double}
(
STORE:nullable int32;
SKU:nullable int32;
DEPT:nullable int32;
DATE:nullable string[8];
UNIT_COST:nullable decimal[20,4];
UNIT_RETAIL:nullable decimal[20,4];
PROMOTION:nullable int32;
CLEARANCE:nullable int32;
PROMO_START_DATE:nullable string[8];
PROMO_END_DATE:nullable string[8];
PROMO_PRICE:nullable decimal[20,4];
CLEAR_START_DATE:nullable string[8];
CLEAR_PRICE:nullable decimal[20,4];
CLEAR_END_DATE:nullable string[8];
COST_COMPLEMENT:decimal[15,4];
)

But when i use this in sequential file stage by importing the schema i wont get the actual names.
I am getting the column names like this.

Field001 Varchar(255)
Field002 Varchar(255)
Field003 Varchar(255)
Field004 Varchar(255)..

Any idea why this is happening. Or do i need to change anything in the schema file.

Thanks,
- Jaysheel -
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Describe the process you are using to "import the schema file" fully.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
jaysheel
Participant
Posts: 57
Joined: Mon Apr 07, 2008 1:54 am
Location: Bangalore

Post by jaysheel »

Ray,

This was used to check the use of schema files.
I tried to work on my previous topic and was tryng to use the resolution provided there.

viewtopic.php?t=123729

Never worked on schema files till now.
So asking help.


Thanks,
- Jaysheel -
hamzaqk
Participant
Posts: 249
Joined: Tue Apr 17, 2007 5:50 am
Location: islamabad

Post by hamzaqk »

You don't import it. Just use the "Schema file" property under Properties->options to specify the schema.
Teradata Certified Master V2R5
jaysheel
Participant
Posts: 57
Joined: Mon Apr 07, 2008 1:54 am
Location: Bangalore

Post by jaysheel »

I did that. Columns are not getting loaded.
- Jaysheel -
hamzaqk
Participant
Posts: 249
Joined: Tue Apr 17, 2007 5:50 am
Location: islamabad

Post by hamzaqk »

They won't and need not to be there as you have specified the column metadata in the schema file itself. Use RCP with it. it will work fine
Teradata Certified Master V2R5
jaysheel
Participant
Posts: 57
Joined: Mon Apr 07, 2008 1:54 am
Location: Bangalore

Post by jaysheel »

Thanks. I am following the steps mentioned by you.

My next stage is a transformer and i dont see any columns in the transformer.

Means the column metadata is not loaded ?
- Jaysheel -
hamzaqk
Participant
Posts: 249
Joined: Tue Apr 17, 2007 5:50 am
Location: islamabad

Post by hamzaqk »

Go through the concept of run time column propogation...
Teradata Certified Master V2R5
HariK
Participant
Posts: 68
Joined: Thu May 17, 2007 1:50 am

Post by HariK »

Use the 'Orchestrate Schema Defintions' instead of 'Sequential File Defintions' under Import while you try to load column defintions to sequential file stage.

This wizard will let make you save the metadata in schema file as a Table defintion before loading it to any stage.
Post Reply