Schema Definition for Fixed Width Files
Posted: Wed Apr 23, 2008 5:20 am
Hello everyone,
We are profiling the Fixed Width Ascii files but even after defining the schema in the QETXT.INI Profile Stage is only reading the first field and rest other fields are takes as null.
Sample QETXT.INI file
[Defined Tables]
customers.txt=CUSTOMER
[CUSTOMER]
FILE=customers.txt
FLN=1
TT=Fixed
Charset=ANSI
DS=
FIELD1=CUSTOMER_ID,NUMERIC,3,0,3,0,
FIELD2=COUNTRY_CODE,NUMERIC,3,0,3,0,
FIELD3=CUSTOMER_NAME,VARCHAR,25,0,25,0,
FIELD4=VENDOR_NAME,VARCHAR,20,0,20,0,
customers.txt
+12+01Sample Customer Name 1 Vendor Name 1
+13+01Sample Customer Name 2 Vendor Name 2
+14+02Sample Customer Name 3 Vendor Name 3
+15+02Sample Customer Name 4 Vendor Name 4
Setup is Profile Stage on HP-UX and Files also on HP-UX. While testing the ODBC DSN for text file we ran the SQL query
SELECT * from CUSTOMER;
The output is
CUSTOMER_ID COUNTRY_CODE CUSTOMER_NAME VENDOR_NAME
12 NULL NULL NULL
13 NULL NULL NULL
14 NULL NULL NULL
15 NULL NULL NULL
I am not able to figure out whether there is some problem in the schema file or there is a problem with the Text File driver.
Can someone please guide me on this
Regards,
dsusr
We are profiling the Fixed Width Ascii files but even after defining the schema in the QETXT.INI Profile Stage is only reading the first field and rest other fields are takes as null.
Sample QETXT.INI file
[Defined Tables]
customers.txt=CUSTOMER
[CUSTOMER]
FILE=customers.txt
FLN=1
TT=Fixed
Charset=ANSI
DS=
FIELD1=CUSTOMER_ID,NUMERIC,3,0,3,0,
FIELD2=COUNTRY_CODE,NUMERIC,3,0,3,0,
FIELD3=CUSTOMER_NAME,VARCHAR,25,0,25,0,
FIELD4=VENDOR_NAME,VARCHAR,20,0,20,0,
customers.txt
+12+01Sample Customer Name 1 Vendor Name 1
+13+01Sample Customer Name 2 Vendor Name 2
+14+02Sample Customer Name 3 Vendor Name 3
+15+02Sample Customer Name 4 Vendor Name 4
Setup is Profile Stage on HP-UX and Files also on HP-UX. While testing the ODBC DSN for text file we ran the SQL query
SELECT * from CUSTOMER;
The output is
CUSTOMER_ID COUNTRY_CODE CUSTOMER_NAME VENDOR_NAME
12 NULL NULL NULL
13 NULL NULL NULL
14 NULL NULL NULL
15 NULL NULL NULL
I am not able to figure out whether there is some problem in the schema file or there is a problem with the Text File driver.
Can someone please guide me on this
Regards,
dsusr