Page 1 of 1

Loading the schema file

Posted: Wed Nov 26, 2008 4:41 am
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,

Posted: Wed Nov 26, 2008 4:52 am
by ray.wurlod
Describe the process you are using to "import the schema file" fully.

Posted: Wed Nov 26, 2008 5:08 am
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,

Posted: Wed Nov 26, 2008 5:17 am
by hamzaqk
You don't import it. Just use the "Schema file" property under Properties->options to specify the schema.

Posted: Wed Nov 26, 2008 5:22 am
by jaysheel
I did that. Columns are not getting loaded.

Posted: Wed Nov 26, 2008 5:41 am
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

Posted: Wed Nov 26, 2008 5:58 am
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 ?

Posted: Wed Nov 26, 2008 10:53 pm
by hamzaqk
Go through the concept of run time column propogation...

Posted: Wed Nov 26, 2008 11:58 pm
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.