Main   Products   Offshore Outsourcing   Customers   Partners   ContactUs  
JDBC Databases
  HXTT Access v5.2
  HXTT Cobol v2.1
  HXTT DBF v5.2
 
  Buy Now
  Support
  Download
  Document
  FAQ
  HXTT Excel v4.2
  HXTT Paradox v5.2
  HXTT Text(CSV) v5.2
  HXTT XML v1.2
Offshore Outsourcing
Oracle Data Import/Export
DB2 Data Import/Export
Sybase Data Import/Export
Free Resources
  Firewall Tunneling
  Search Indexing Robot
  Conditional Compilation
  Password Recovery for MS Access
  Password Recovery for Corel Paradox
  Checksum Tool for MD5
  Character Set Converter
  Pyramid - Poker of ZYH
   
   
   
Hongxin Technology & Trade Ltd. of Xiangtan City (abbr, HXTT)

HXTT DBF
using schemaFile with gzipped data file causes error
Mark
2006-08-20 23:33:03.0
Hi,

You gave me a solution for gzipped files. You also gave me a solution for dealing with delimited text files that don't have the fields in the first row. Now when I try both of these together I get a 'column not found' error.

Here's the error:

-------------
SELECT col1 AS col1_K1, File2.col1 AS col1 FROM (select * from "File2.csv.gz".File2)

jdbc:csv:/samp3,,schemaFile=File2.sql,user=,password=,_CSV_Header=false,_CSV_Separator=,
Inner: java.sql.SQLException: Invalid column: File2.col1
Caused by: java.sql.SQLException: Invalid column: File2.col1
-------------

The SQL works fine when the file is uncompressed. The gzip works fine, when the first row contains the fields. This only happens when I try both at the same time.

Regards,
Mark


The sql looks as follows:

create table if not exists File2(col1 varchar(40),
col2 varchar(40),
col3 varchar(40),
col4 varchar(40),
col5 varchar(40),
col6 INTEGER,
col7 INTEGER,
col8 INTEGER,
col9 INTEGER,
Groups INTEGER
);





Re:using schemaFile with gzipped data file causes error
HXTT Support
2006-08-20 23:50:10.0
I guess that you should use:
create table if not exists "File2.csv.gz".File2(col1 varchar(40),
col2 varchar(40),
col3 varchar(40),
col4 varchar(40),
col5 varchar(40),
col6 INTEGER,
col7 INTEGER,
col8 INTEGER,
col9 INTEGER,
Groups INTEGER
);

If failed, please let us know:)

Re:Re:using schemaFile with gzipped data file causes error
Mark
2006-08-20 23:54:59.0
That is the solution. I appreciate the quick response.
Regards,
Mark
Re:Re:Re:using schemaFile with gzipped data file causes error
HXTT Support
2006-08-21 00:02:11.0
BTW, HXTT CSV can detect your column data type automatical. Without that CREATE TABLE sql,
you will get
column1 varchar(40),
column2 varchar(40),
column3 varchar(40),
column4 varchar(40),
column5 INTEGER,
column6 INTEGER,
column7 INTEGER,
column8 INTEGER,
column9 INTEGER

Search Key   Search by Last 50 Questions




Google
 

Address: 9 Station Rd., Xiangtan City, Hunan Province, P.R. China
Postcode: 411100
Phone: (86)731-58225727
Fax: (86)731-58225727
Email: webmaster@hxtt.com
Copyright © 1999-2011 Hongxin Technology & Trade Ltd. | All Rights Reserved. | Privacy | Legal | Sitemap