错误:SQLite从文件中导入数据[英] Error : SQLite import data from file

问题描述

我正在尝试从逗号分隔的文件中加载数据.示例:

A,positive,9619
A095CDB461A1FEED,positive,1  

当我尝试将此文件加载到sqlite3数据库中时,我会遇到错误:

sqlite> .mode csv feature_category
sqlite> .import /home/harit/work/python/what-twitter-speaks/classifier/data/snap_data_collection/db-positiveTweets feature_category;
Error: no such table: feature_category;

尽管表已经存在.

sqlite> select * from sqlite_master;
table|feature_category|feature_category|2|CREATE TABLE feature_category(feature, category, count)
table|categorycount|categorycount|3|CREATE TABLE categorycount(category, count)  

请帮助,我是SQLite3

的新手

谢谢

推荐答案

看来,问题是命令末尾的分号;.

尝试

sqlite> .import /home/.../db-positiveTweets feature_category

本文地址:https://www.itbaoku.cn/post/584969.html