public abstract static class GoogleAdsV17.Read extends PTransform<PCollection<java.lang.String>,PCollection<com.google.ads.googleads.v17.services.GoogleAdsRow>>
PTransform
that reads the results of a Google Ads query as GoogleAdsRow
objects.GoogleAdsIO.v17()
,
GoogleAdsV17.readAll()
,
Serialized Formannotations, displayData, name, resourceHints
Constructor and Description |
---|
Read() |
Modifier and Type | Method and Description |
---|---|
PCollection<com.google.ads.googleads.v17.services.GoogleAdsRow> |
expand(PCollection<java.lang.String> input)
Override this method to specify how this
PTransform should be expanded on the given
InputT . |
void |
populateDisplayData(DisplayData.Builder builder)
Register display data for the given transform or component.
|
GoogleAdsV17.Read |
withDeveloperToken(@Nullable java.lang.String developerToken)
Creates and returns a new
GoogleAdsV17.Read transform with the specified developer token. |
GoogleAdsV17.Read |
withGoogleAdsClientFactory(GoogleAdsClientFactory googleAdsClientFactory)
Creates and returns a new
GoogleAdsV17.Read transform with the specified client factory. |
GoogleAdsV17.Read |
withLoginCustomerId(@Nullable java.lang.Long loginCustomerId)
Creates and returns a new
GoogleAdsV17.Read transform with the specified login customer ID. |
GoogleAdsV17.Read |
withQuery(java.lang.String query)
Creates and returns a new
GoogleAdsV17.Read transform with the specified query. |
GoogleAdsV17.Read |
withRateLimitPolicy(GoogleAdsV17.RateLimitPolicyFactory rateLimitPolicyFactory)
Creates and returns a new
GoogleAdsV17.Read transform with the specified rate limit policy
factory. |
addAnnotation, compose, compose, getAdditionalInputs, getAnnotations, getDefaultOutputCoder, getDefaultOutputCoder, getDefaultOutputCoder, getKindString, getName, getResourceHints, setDisplayData, setResourceHints, toString, validate, validate
public GoogleAdsV17.Read withDeveloperToken(@Nullable java.lang.String developerToken)
GoogleAdsV17.Read
transform with the specified developer token. A
developer token is required to access the Google Ads API.developerToken
- The developer token to set.GoogleAdsV17.Read
transform with the specified developer token.GoogleAdsClient
public GoogleAdsV17.Read withLoginCustomerId(@Nullable java.lang.Long loginCustomerId)
GoogleAdsV17.Read
transform with the specified login customer ID. A
login customer ID is only required for manager accounts.loginCustomerId
- The login customer ID to set.GoogleAdsV17.Read
transform with the specified login customer ID.GoogleAdsClient
public GoogleAdsV17.Read withQuery(java.lang.String query)
GoogleAdsV17.Read
transform with the specified query. The query will be
executed for each customer ID.query
- GoogleAdsV17.Read
transform with the specified query.SearchGoogleAdsStreamRequest
public GoogleAdsV17.Read withGoogleAdsClientFactory(GoogleAdsClientFactory googleAdsClientFactory)
GoogleAdsV17.Read
transform with the specified client factory. A GoogleAdsClientFactory
builds the GoogleAdsClient
used to construct service clients.
The DefaultGoogleAdsClientFactory
should be sufficient for most purposes unless the
construction of GoogleAdsClient
requires customization.googleAdsClientFactory
- GoogleAdsV17.Read
transform with the specified client factory.GoogleAdsClient
public GoogleAdsV17.Read withRateLimitPolicy(GoogleAdsV17.RateLimitPolicyFactory rateLimitPolicyFactory)
GoogleAdsV17.Read
transform with the specified rate limit policy
factory. A GoogleAdsV17.RateLimitPolicyFactory
builds the GoogleAdsV17.RateLimitPolicy
used to limit
the number of requests made by ReadAll.ReadAllFn
. The Google Ads API enforces global
limits from the developer token down to the customer ID and it is recommended to host a
shared rate limiting service to coordinate traffic to the Google Ads API across all
applications using the same developer token. Users of these transforms are strongly advised
to implement their own GoogleAdsV17.RateLimitPolicy
and GoogleAdsV17.RateLimitPolicyFactory
to interact
with a shared rate limiting service for any production workloads.rateLimitPolicyFactory
- GoogleAdsV17.Read
transform with the specified rate limit policy factory.GoogleAdsClient
public PCollection<com.google.ads.googleads.v17.services.GoogleAdsRow> expand(PCollection<java.lang.String> input)
PTransform
PTransform
should be expanded on the given
InputT
.
NOTE: This method should not be called directly. Instead apply the PTransform
should
be applied to the InputT
using the apply
method.
Composite transforms, which are defined in terms of other transforms, should return the output of one of the composed transforms. Non-composite transforms, which do not apply any transforms internally, should return a new unbound output and register evaluators (via backend-specific registration methods).
expand
in class PTransform<PCollection<java.lang.String>,PCollection<com.google.ads.googleads.v17.services.GoogleAdsRow>>
public void populateDisplayData(DisplayData.Builder builder)
PTransform
populateDisplayData(DisplayData.Builder)
is invoked by Pipeline runners to collect
display data via DisplayData.from(HasDisplayData)
. Implementations may call super.populateDisplayData(builder)
in order to register display data in the current namespace,
but should otherwise use subcomponent.populateDisplayData(builder)
to use the namespace
of the subcomponent.
By default, does not register any display data. Implementors may override this method to provide their own display data.
populateDisplayData
in interface HasDisplayData
populateDisplayData
in class PTransform<PCollection<java.lang.String>,PCollection<com.google.ads.googleads.v17.services.GoogleAdsRow>>
builder
- The builder to populate with display data.HasDisplayData