问题描述
我用它来从我的谷歌应用程序下载所有数据:
我按照这篇文章:
和下载数据使用这个:
bulkloader.py --dump --url = http://zjm1126.appspot.com/remote_api --filename = b.csv
但数据是:
这是不可读的,为什么? / p>
这是b.csv
您似乎使用错误的命令进行下载。您的 - 转储
命令会生成一个确实以SQLite 3格式的文件,但由于App Engine的数据存储区不是常规数据库,因此没有太多用处 - 在Datastore中数据不会分散到表的预定义列中。数据以任何数据库的形式保存在行中,但转储文件中的列或多或少地看起来像这样:
- 列1:唯一行的ID
- 列2:所有与序列化格式相关的数据(二进制缓冲区格式)
所以你的下载命令应该看起来更像这样:
appcfg.py download_data --config_file = your_loader.py --filename = b.csv --kind = DbModelName< app-directory>
I use this to download all data from my google app:I follow this article: http://code.google.com/intl/en/appengine/docs/python/tools/uploadingdata.html#Creating_Exporter_Classes
and download data use this:
bulkloader.py --dump --url=http://zjm1126.appspot.com/remote_api --filename=b.csv
but the data is :
alt text http://omploader.org/vNGN6Ng
so how to make the data readable ?
updated
I download a sqlite view ,and saw this :
alt text http://omploader.org/vNGQwcg
this is not readable , why ?
this is the b.csv http://omploader.org/vNGQwcw/b.csv
You seem to use a wrong command for the download. Your --dump
command generates a file whic is indeed in SQLite 3 format but there's not much use of it for you since App Engine's Datastore is not a regular database - in Datastore the data is not spread out into predefined columns of a table. The data is saved in rows like in any database but the columns in the dump file look more or less like this:
- Column 1: Unique ID of the row
- Column 2: All the data regarding the row in a serialized form (binary Protocol Buffers format)
So your download command should look more something like this:
appcfg.py download_data --config_file=your_loader.py --filename=b.csv --kind=DbModelName <app-directory>
这篇关于如何制作从google-app-engine可读的数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!