Main   Products   Offshore Outsourcing   Customers   Partners   ContactUs  
JDBC Databases
  HXTT Access 7.1.259
  HXTT Cobol 5.0.258
  HXTT DBF 7.1.260
 
  Buy Now
  Support
  Download
  Document
  FAQ
  HXTT Excel 6.1.262
  HXTT Json 1.0.230
  HXTT Paradox 7.1.258
  HXTT PDF 2.0.258
  HXTT Text(CSV) 7.1.258
  HXTT Word 1.1.258
  HXTT XML 4.0.259
Offshore Outsourcing
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
   
   
   
Heng Xing Tian Tai Lab of Xi'an City (abbr, HXTT)

HXTT DBF
using schemaFile with gzipped data file causes error
Mark
2006-08-20 23:33:03
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
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
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
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
 

Email: webmaster@hxtt.com
Copyright © 2003-2019 Heng Xing Tian Tai Lab of Xi'an City. | All Rights Reserved. | Privacy | Legal | Refund | Sitemap