将Sqlite数据导入Google App Engine [英] Importing Sqlite data into Google App Engine

查看:122
本文介绍了将Sqlite数据导入Google App Engine的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个相对广泛的sqlite数据库,我想导入到我的Google App Engine python应用程序中。

I have a relatively extensive sqlite database that I'd like to import into my Google App Engine python app.

我使用appengine API创建了我的模型与现有的模式相近,但不完全相同。我写了一个导入脚本来从sqlite加载数据并创建/保存新的appengine对象,但appengine环境阻止我访问sqlite库。这个脚本只能在我的本地应用引擎实例上运行,并从那里我希望将数据推送到谷歌。

I've created my models using the appengine API which are close, but not quite identical to the existing schema. I've written an import script to load the data from sqlite and create/save new appengine objects, but the appengine environment blocks me from accessing the sqlite library. This script is only to be run on my local app engine instance, and from there I hope to push the data to google.

我以错误的方式接近这个问题,或者有没有办法在本地实例环境中运行时导入sqlite库?

Am I approaching this problem the wrong way, or is there a way to import the sqlite library while running in the local instance's environment?

推荐答案

我会从合适的CSV文件Sqlite数据在单独的脚本中,然后使用批量加载将数据从CSV文件推送到应用程序引擎。

I would make suitable CSV files from the Sqlite data, in a separate script, then use bulk loading to push the data from the CSV files up to app engine.

这篇关于将Sqlite数据导入Google App Engine的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆