You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@beam.apache.org by Csaba Kassai <cs...@aliz.ai> on 2018/09/02 18:34:05 UTC

Re: Controlling namespace when writing to DataStore

Hi,

you can set the namespace in the key of the Datastore entity. Like this:

Key.Builder keyBuilder = DatastoreHelper.makeKey(...);
keyBuilder.getPartitionIdBuilder().setNamespace(namespace);

https://beam.apache.org/documentation/sdks/javadoc/2.6.0/org/apache/beam/sdk/io/gcp/datastore/DatastoreV1.html

Regards,
Csabi

On Thu, 30 Aug 2018 at 02:55, Randal Moore <rd...@gmail.com> wrote:

> I cannot find a way to control which namespace I'm writing to when saving
> to DataStore from a Beam/DataFlow job. I am using
>
>    org.apache.beam.sdk.io.gcp.datastore.DatastoreV1
>
> I find the ability to control the namespace with the reader but not the writer.
>
> Am I missing something obvious?
>
>