Hi,
Is there a way (for example a property) to force the HXTT text driver to consider all columns of a query as string columns without the need to construct a CREATE TABLE statement? If not could you consider implementing this?
Thanks in advance,
Frank
|
For CSV, PSV, and TSV, it can do that things easily, for instance,
jdbc:csv:////usr/data?csvfileExtension=TXT;_CSV_Header=true //all CSV files with TXT extension, and first line for column names.
jdbc:csv:////usr/data?_CSV_Separator=\t //TSV file without column name header.
jdbc:csv:////usr/data?_CSV_Separator=|;maxScanRows=-1 //PSV file's column type will be regarded as varchar without detection automatically.
Then you can use all sqls without CREATE TABLE sql:)
For plain text which can't be detected without column separator help, you need CREATE TABLE sql. It supports universal table declaration for a series of tables with the same table structure. '?' represents any single character, and '*' represents a string of zero or more characters. For instance, create table "*.log" (...); create table [*a?b.*"] (...). Universal table declaration is only visible for the current connection, and isn't prior to any specific table declaration. You can store all common table declaration sql in schemaFile(connection property, can be load from any (absolute or relative) path, even you can load it from http url or compressed file.), then you needn't to call CREATE TABLE in your program.
|
If those above hints can't help you, please let us know your situation, suggestion and requirement:)
|