gpt4 book ai didi

sqlite - 如何将SQLite数据库连接到Weka

转载 作者:行者123 更新时间:2023-12-03 19:34:08 24 4
gpt4 key购买 nike

我正在尝试将数据库从sqlite3导入到weka,但是问题是,即使在加载并显示数据库之后,单击“确定”以便可以开始使用数据库时,也会出现消息“无法从数据库读取:未知的数据类型:出现文本“。我曾尝试修改DatabaseUtil.props文件,但似乎无济于事,因此,如果有人可以告诉我如何解决此问题,我真的很感激。谢谢

最佳答案

我已阅读以下说明:
https://waikato.github.io/weka-wiki/databases/#configuration-files

现在这是我的DatabaseUtils.props文件,请更改jdbcURL条目

# Database settings for sqlite 3.x
#
# General information on database access can be found here:
# https://waikato.github.io/weka-wiki/databases
#
# url: http://www.sqlite.org/
# jdbc: http://www.zentus.com/sqlitejdbc/
# author: Fracpete (fracpete at waikato dot ac dot nz)
# version: $Revision: 5836 $

# JDBC driver (comma-separated list)
jdbcDriver=org.sqlite.JDBC,

# database URL
jdbcURL=jdbc:sqlite:/some/path/to/mydb.sqlite


# specific data types
# string, getString() = 0; --> nominal
# boolean, getBoolean() = 1; --> nominal
# double, getDouble() = 2; --> numeric
# byte, getByte() = 3; --> numeric
# short, getByte()= 4; --> numeric
# int, getInteger() = 5; --> numeric
# long, getLong() = 6; --> numeric
# float, getFloat() = 7; --> numeric
# date, getDate() = 8; --> date
# text, getString() = 9; --> string
# time, getTime() = 10; --> date
#SQLITE DATATYPES
#NULL. The value is a NULL value.
null=9
#INTEGER. The value is a signed integer, stored in 1, 2, 3, 4, 6, or 8 bytes depending on the magnitude of the value.
integer=5
#REAL. The value is a floating point value, stored as an 8-byte IEEE floating point number.
float=6
#TEXT. The value is a text string, stored using the database encoding (UTF-8, UTF-16BE or UTF-16LE).

TEXT=9
text=9
#BLOB. The value is a blob of data, stored exactly as it was input.


# other options
CREATE_DOUBLE=DOUBLE
CREATE_STRING=varchar(2000)
CREATE_STRING=TEXT
CREATE_INT=INT
CREATE_DATE=DATETIME
DateFormat=yyyy-MM-dd HH:mm:ss
checkUpperCaseNames=false
checkLowerCaseNames=false
checkForTable=true



# All the reserved keywords for this database
# Based on the keywords listed at the following URL (2009-04-13):
# http://www.sqlite.org/lang_keywords.html
Keywords=\
ABORT,\
ADD,\
AFTER,\
ALL,\
ALTER,\
ANALYZE,\
AND,\
AS,\
ASC,\
ATTACH,\
AUTOINCREMENT,\
BEFORE,\
BEGIN,\
BETWEEN,\
BY,\
CASCADE,\
CASE,\
CAST,\
CHECK,\
COLLATE,\
COLUMN,\
COMMIT,\
CONFLICT,\
CONSTRAINT,\
CREATE,\
CROSS,\
CURRENT_DATE,\
CURRENT_TIME,\
CURRENT_TIMESTAMP,\
DATABASE,\
DEFAULT,\
DEFERRABLE,\
DEFERRED,\
DELETE,\
DESC,\
DETACH,\
DISTINCT,\
DROP,\
EACH,\
ELSE,\
END,\
ESCAPE,\
EXCEPT,\
EXCLUSIVE,\
EXISTS,\
EXPLAIN,\
FAIL,\
FOR,\
FOREIGN,\
FROM,\
FULL,\
GLOB,\
GROUP,\
HAVING,\
IF,\
IGNORE,\
IMMEDIATE,\
IN,\
INDEX,\
INDEXED,\
INITIALLY,\
INNER,\
INSERT,\
INSTEAD,\
INTERSECT,\
INTO,\
IS,\
ISNULL,\
JOIN,\
KEY,\
LEFT,\
LIKE,\
LIMIT,\
MATCH,\
NATURAL,\
NOT,\
NOTNULL,\
NULL,\
OF,\
OFFSET,\
ON,\
OR,\
ORDER,\
OUTER,\
PLAN,\
PRAGMA,\
PRIMARY,\
QUERY,\
RAISE,\
REFERENCES,\
REGEXP,\
REINDEX,\
RELEASE,\
RENAME,\
REPLACE,\
RESTRICT,\
RIGHT,\
ROLLBACK,\
ROW,\
SAVEPOINT,\
SELECT,\
SET,\
TABLE,\
TEMP,\
TEMPORARY,\
THEN,\
TO,\
TRANSACTION,\
TRIGGER,\
UNION,\
UNIQUE,\
UPDATE,\
USING,\
VACUUM,\
VALUES,\
VIEW,\
VIRTUAL,\
WHEN,\
WHERE

# The character to append to attribute names to avoid exceptions due to
# clashes between keywords and attribute names
KeywordsMaskChar=_

#flags for loading and saving instances using DatabaseLoader/Saver
nominalToStringLimit=50
idColumn=auto_generated_id

关于sqlite - 如何将SQLite数据库连接到Weka,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37921591/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com