Sequential File Stage:
----------------------
Schemas
delimited-in.schema
-------------------
record
{final_delim=end, record_delim='\n', delim='|'}
(
KEY:string[];
VALUE:string[];
FIELD1:string[];
FIELD2:string[];
)
======================
delimited-in.txt
----------------
KEY|VALUE|F1|F2
1k|1v|1|1
=======================
fixed-in-char.schema
-----------------------
record
{record_delim='\n', record_length=fixed, delim=none}
(
KEY:string[4];
VALUE:string[6];
FIELD1:string[3];
FIELD2:string[2];
)
==========================
fixed-in-varchar.schema
--------------------------
record
{record_delim='\n', record_length=fixed, delim=none}
(
KEY:string[max=4]{width=4};
VALUE:string[max=6]{width=6};
FIELD1:string[max=3]{width=3};
FIELD2:string[max=2]{width=2};
)
==============================
fixed-in.txt
----------------------
Importing Schema
You can go to Sequential File->Columns->Load->Import->Sequential File Definition
then select Import again. You then create a file format by looking at the file.
It can be either delimited or fixed.
It can have a header row.
If it is fixed you’ll have to know the field widths (no auto-sense). You
could use UltraEdit to find the field widths.
NullsIf the type is char then APT_STRING_PADCHAR is how you control what you
will see when a field is NULL. The length you set will control how many you
see.
If the type is varchar then it is what you set Null field value to that
controls what you will see.
Miscellaneous Option Settings
When you’re running something you can set the Limits->Warnings->No Limit
by going to Tools->Options->Warnings->No Limit. Now you don’t have
to set everytime you run.
Working with Delimited Text
Use Ultra Edit
You have to do nothing more than go to the Column tab and select
Convert to Fixed Column.
Make whatever changes you need then to convert back select Convert to Character Delimited.
The Song Jane [Doe, CEO] Likes
4 years ago
No comments:
Post a Comment