使用 Apache Beam 连接到本地 App Engine 数据存储
Connect to local App Engine Datastore with Apache Beam
我是 Google App Engine 的新手,我对与本地数据存储区的连接相关的答案有点困惑。
我的最终目标是将数据从 Google 数据存储流式传输到大查询数据集,类似于 https://blog.papercut.com/google-cloud-dataflow-data-migration/。我在本地有这个 DataStore 的副本,当我 运行 一个本地 App Engine 时可以访问它,即当我使用 $[GOOGLE_SDK_PATH]/dev_appserver.py --datastore_path=./datastore
.
时我可以通过管理控制台访问它
我想知道是否可以使用 App Engine 实例之外的服务连接到此数据存储,python google-cloud-datastore or even Apache Beam ReadFromDatastore method. If not, should I use the Datastore Emulator 使用 App Engine 数据存储生成的文件?
如果有人知道如何进行,我将非常感激知道该怎么做。
如果可能,则必须通过数据存储模拟器,该模拟器还可以为 App Engine 以外的应用提供服务。但这最终取决于您打算使用的库的实现——如果底层访问方法能够理解指向 运行 数据存储模拟器的 DATASTORE_EMULATOR_HOST
环境变量并使用它而不是真正的数据存储.我想你只需要试一试。
但请注意,数据存储模拟器使用的本地存储目录内部格式可能与开发服务器使用的不同,因此在尝试之前备份您的 .datastore
目录,以防万一.来自 Local data format conversion:
Currently, the local Datastore emulator stores data in sqlite3 while
the Cloud Datastore Emulator stores data as Java objects.
When dev_appserver is launched with legacy sqlite3 data, the data will
be converted to Java objects. The original data is backed up with the
filename {original-data-filename}.sqlitestub.
我是 Google App Engine 的新手,我对与本地数据存储区的连接相关的答案有点困惑。
我的最终目标是将数据从 Google 数据存储流式传输到大查询数据集,类似于 https://blog.papercut.com/google-cloud-dataflow-data-migration/。我在本地有这个 DataStore 的副本,当我 运行 一个本地 App Engine 时可以访问它,即当我使用 $[GOOGLE_SDK_PATH]/dev_appserver.py --datastore_path=./datastore
.
我想知道是否可以使用 App Engine 实例之外的服务连接到此数据存储,python google-cloud-datastore or even Apache Beam ReadFromDatastore method. If not, should I use the Datastore Emulator 使用 App Engine 数据存储生成的文件?
如果有人知道如何进行,我将非常感激知道该怎么做。
如果可能,则必须通过数据存储模拟器,该模拟器还可以为 App Engine 以外的应用提供服务。但这最终取决于您打算使用的库的实现——如果底层访问方法能够理解指向 运行 数据存储模拟器的 DATASTORE_EMULATOR_HOST
环境变量并使用它而不是真正的数据存储.我想你只需要试一试。
但请注意,数据存储模拟器使用的本地存储目录内部格式可能与开发服务器使用的不同,因此在尝试之前备份您的 .datastore
目录,以防万一.来自 Local data format conversion:
Currently, the local Datastore emulator stores data in sqlite3 while the Cloud Datastore Emulator stores data as Java objects.
When dev_appserver is launched with legacy sqlite3 data, the data will be converted to Java objects. The original data is backed up with the filename {original-data-filename}.sqlitestub.