public abstract static class GoogleAdsV14.Read extends PTransform<PCollection<java.lang.String>,PCollection<com.google.ads.googleads.v14.services.GoogleAdsRow>>
PTransform
that reads the results of a Google Ads query as GoogleAdsRow
objects.GoogleAdsIO.v14()
,
GoogleAdsV14.readAll()
,
Serialized Formannotations, displayData, name, resourceHints
Constructor and Description |
---|
Read() |
Modifier and Type | Method and Description |
---|---|
PCollection<com.google.ads.googleads.v14.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.
|
GoogleAdsV14.Read |
withDeveloperToken(@Nullable java.lang.String developerToken)
Creates and returns a new
GoogleAdsV14.Read transform with the specified developer token. |
GoogleAdsV14.Read |
withGoogleAdsClientFactory(GoogleAdsClientFactory googleAdsClientFactory)
Creates and returns a new
GoogleAdsV14.Read transform with the specified client factory. |
GoogleAdsV14.Read |
withLoginCustomerId(@Nullable java.lang.Long loginCustomerId)
Creates and returns a new
GoogleAdsV14.Read transform with the specified login customer ID. |
GoogleAdsV14.Read |
withQuery(java.lang.String query)
Creates and returns a new
GoogleAdsV14.Read transform with the specified query. |
GoogleAdsV14.Read |
withRateLimitPolicy(GoogleAdsV14.RateLimitPolicyFactory rateLimitPolicyFactory)
Creates and returns a new
GoogleAdsV14.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 GoogleAdsV14.Read withDeveloperToken(@Nullable java.lang.String developerToken)
GoogleAdsV14.Read
transform with the specified developer token. A
developer token is required to access the Google Ads API.developerToken
- The developer token to set.GoogleAdsV14.Read
transform with the specified developer token.GoogleAdsClient
public GoogleAdsV14.Read withLoginCustomerId(@Nullable java.lang.Long loginCustomerId)
GoogleAdsV14.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.GoogleAdsV14.Read
transform with the specified login customer ID.GoogleAdsClient
public GoogleAdsV14.Read withQuery(java.lang.String query)
GoogleAdsV14.Read
transform with the specified query. The query will be
executed for each customer ID.query
- GoogleAdsV14.Read
transform with the specified query.SearchGoogleAdsStreamRequest
public GoogleAdsV14.Read withGoogleAdsClientFactory(GoogleAdsClientFactory googleAdsClientFactory)
GoogleAdsV14.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
- GoogleAdsV14.Read
transform with the specified client factory.GoogleAdsClient
public GoogleAdsV14.Read withRateLimitPolicy(GoogleAdsV14.RateLimitPolicyFactory rateLimitPolicyFactory)
GoogleAdsV14.Read
transform with the specified rate limit policy
factory. A GoogleAdsV14.RateLimitPolicyFactory
builds the GoogleAdsV14.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 GoogleAdsV14.RateLimitPolicy
and GoogleAdsV14.RateLimitPolicyFactory
to interact
with a shared rate limiting service for any production workloads.rateLimitPolicyFactory
- GoogleAdsV14.Read
transform with the specified rate limit policy factory.GoogleAdsClient
public PCollection<com.google.ads.googleads.v14.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.v14.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.v14.services.GoogleAdsRow>>
builder
- The builder to populate with display data.HasDisplayData