public abstract class RecommendationAIWriteUserEvent extends PTransform<PCollection<com.google.api.client.json.GenericJson>,PCollectionTuple>
PTransform
using the Recommendations AI API (https://cloud.google.com/recommendations).
Takes an input PCollection
of GenericJson
s and converts them to and creates
UserEvent
s.
It is possible to provide a catalog name to which you want to add the user event (defaults to "default_catalog"). It is possible to provide a event store to which you want to add the user event (defaults to "default_event_store").
Modifier and Type | Field and Description |
---|---|
static TupleTag<com.google.cloud.recommendationengine.v1beta1.UserEvent> |
FAILURE_TAG |
static TupleTag<com.google.cloud.recommendationengine.v1beta1.UserEvent> |
SUCCESS_TAG |
name, resourceHints
Constructor and Description |
---|
RecommendationAIWriteUserEvent() |
Modifier and Type | Method and Description |
---|---|
abstract java.lang.String |
catalogName() |
abstract java.lang.String |
eventStore() |
PCollectionTuple |
expand(PCollection<com.google.api.client.json.GenericJson> input)
The transform converts the contents of input PCollection into
UserEvent s and then calls
the Recommendation AI service to create the user event. |
abstract java.lang.String |
projectId() |
RecommendationAIWriteUserEvent |
withCatalogName(java.lang.String catalogName) |
RecommendationAIWriteUserEvent |
withEventStore(java.lang.String eventStore) |
RecommendationAIWriteUserEvent |
withProjectId(java.lang.String projectId) |
compose, compose, getAdditionalInputs, getDefaultOutputCoder, getDefaultOutputCoder, getDefaultOutputCoder, getKindString, getName, getResourceHints, populateDisplayData, setResourceHints, toString, validate, validate
public static final TupleTag<com.google.cloud.recommendationengine.v1beta1.UserEvent> SUCCESS_TAG
public static final TupleTag<com.google.cloud.recommendationengine.v1beta1.UserEvent> FAILURE_TAG
@Nullable public abstract java.lang.String projectId()
@Nullable public abstract java.lang.String catalogName()
@Nullable public abstract java.lang.String eventStore()
public PCollectionTuple expand(PCollection<com.google.api.client.json.GenericJson> input)
UserEvent
s and then calls
the Recommendation AI service to create the user event.expand
in class PTransform<PCollection<com.google.api.client.json.GenericJson>,PCollectionTuple>
input
- input PCollectionUserEvent
spublic RecommendationAIWriteUserEvent withProjectId(java.lang.String projectId)
public RecommendationAIWriteUserEvent withCatalogName(java.lang.String catalogName)
public RecommendationAIWriteUserEvent withEventStore(java.lang.String eventStore)