Python 如何设置;“仅限U键”;使用googledatastore包

Python 如何设置;“仅限U键”;使用googledatastore包,python,google-cloud-datastore,google-cloud-dataflow,Python,Google Cloud Datastore,Google Cloud Dataflow,我想使用GoogleCloudDataFlow上的googledatastore包读取数据存储 但是,我在googledatastore文档中找不到“keys_only”查询。 如何在Google数据存储上设置“仅按键”?使用投影查询 from googledatastore import helper helper.add_projection( query, '__key__') 使用投影查询 from googledatastore import helpe

我想使用GoogleCloudDataFlow上的googledatastore包读取数据存储

但是,我在googledatastore文档中找不到“keys_only”查询。

如何在Google数据存储上设置“仅按键”?

使用投影查询

  from googledatastore import helper
  helper.add_projection(
    query,
    '__key__')
使用投影查询

  from googledatastore import helper
  helper.add_projection(
    query,
    '__key__')