如何解决使用 pgAdmin-4 导入 yago sql 导入器?
嗨,我正在尝试使用 pgAdmin 4 的查询工具将 sql 文件 yago Database Importer
导入。
-- Creating table
DROP TABLE IF EXISTS yagoFacts;
CREATE TABLE yagoFacts (id varchar,subject varchar,predicate varchar,object varchar,value float);
-- Loading files
-- (don't worry if some files are not found)
SET client_encoding to 'utf-8';
\copy yagoFacts FROM 'E:/Master/NLP/project/iaprtc12/iaprtc12/Postgres/yagoDateFacts.tsv' NULL AS ''
\copy yagoFacts FROM 'E:/Master/NLP/project/iaprtc12/iaprtc12/Postgres/yagoFacts.tsv' NULL AS ''
\copy yagoFacts FROM 'E:/Master/NLP/project/iaprtc12/iaprtc12/Postgres/yagoLabels.tsv' NULL AS ''
\copy yagoFacts FROM 'E:/Master/NLP/project/iaprtc12/iaprtc12/Postgres/yagoLiteralFacts.tsv' NULL AS ''
-- Remove facts on which we cannot build the index
DELETE FROM yagofacts WHERE length(object)>1000;
-- Creating indexes
CREATE INDEX yagoIndexSubject ON yagoFacts(subject);
CREATE INDEX yagoIndexObject ON yagoFacts(object);
CREATE INDEX yagoIndexValue ON yagoFacts(value);
CREATE INDEX yagoIndexPredicate ON yagoFacts(predicate);
CREATE INDEX yagoIndexId ON yagoFacts(id);
CREATE INDEX yagoIndexSubjectPredicate ON yagoFacts(subject,predicate);
CREATE INDEX yagoIndexObjectPredicate ON yagoFacts(object,predicate);
CREATE INDEX yagoIndexValuePredicate ON yagoFacts(value,predicate);
-- Creating index for case-insensitive search
-- (you may abort the script if you don't need this index)
CREATE INDEX yagoIndexLowerObject ON yagofacts (lower(object));
-- done
ERROR: Syntax error at or near "\"
LINE 18: \copy yagoFacts FROM 'yagoGeonamesGlosses.tsv' NULL AS '';
^
sql state: 42601
Character: 549
ERROR: Syntax error at or near "copy"
LINE 9: copy yagoFacts FROM 'E:/Master/NLP/project/iaprtc12/iaprtc12...
^
sql state: 42601
Character: 348
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。