Class GoogleAdsV19.Read

java.lang.Object
org.apache.beam.sdk.transforms.PTransform<PCollection<String>,PCollection<com.google.ads.googleads.v19.services.GoogleAdsRow>>
org.apache.beam.sdk.io.googleads.GoogleAdsV19.Read
All Implemented Interfaces:
Serializable, HasDisplayData
Enclosing class:
GoogleAdsV19

public abstract static class GoogleAdsV19.Read extends PTransform<PCollection<String>,PCollection<com.google.ads.googleads.v19.services.GoogleAdsRow>>
A PTransform that reads the results of a Google Ads query as GoogleAdsRow objects.
See Also:
  • Constructor Details

    • Read

      public Read()
  • Method Details

    • withDeveloperToken

      public GoogleAdsV19.Read withDeveloperToken(@Nullable String developerToken)
      Creates and returns a new GoogleAdsV19.Read transform with the specified developer token. A developer token is required to access the Google Ads API.
      Parameters:
      developerToken - The developer token to set.
      Returns:
      A new GoogleAdsV19.Read transform with the specified developer token.
      See Also:
      • GoogleAdsClient
    • withLoginCustomerId

      public GoogleAdsV19.Read withLoginCustomerId(@Nullable Long loginCustomerId)
      Creates and returns a new GoogleAdsV19.Read transform with the specified login customer ID. A login customer ID is only required for manager accounts.
      Parameters:
      loginCustomerId - The login customer ID to set.
      Returns:
      A new GoogleAdsV19.Read transform with the specified login customer ID.
      See Also:
      • GoogleAdsClient
    • withQuery

      public GoogleAdsV19.Read withQuery(String query)
      Creates and returns a new GoogleAdsV19.Read transform with the specified query. The query will be executed for each customer ID.
      Parameters:
      query -
      Returns:
      A new GoogleAdsV19.Read transform with the specified query.
      See Also:
      • SearchGoogleAdsStreamRequest
    • withGoogleAdsClientFactory

      public GoogleAdsV19.Read withGoogleAdsClientFactory(GoogleAdsClientFactory googleAdsClientFactory)
      Creates and returns a new GoogleAdsV19.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.
      Parameters:
      googleAdsClientFactory -
      Returns:
      A new GoogleAdsV19.Read transform with the specified client factory.
      See Also:
      • GoogleAdsClient
    • withRateLimitPolicy

      public GoogleAdsV19.Read withRateLimitPolicy(GoogleAdsIO.RateLimitPolicyFactory<com.google.ads.googleads.v19.errors.GoogleAdsError> rateLimitPolicyFactory)
      Creates and returns a new GoogleAdsV19.Read transform with the specified rate limit policy factory. A GoogleAdsIO.RateLimitPolicyFactory builds the GoogleAdsIO.RateLimitPolicy used to limit the number of requests made by GoogleAdsV19.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 GoogleAdsIO.RateLimitPolicy and GoogleAdsIO.RateLimitPolicyFactory to interact with a shared rate limiting service for any production workloads.
      Parameters:
      rateLimitPolicyFactory -
      Returns:
      A new GoogleAdsV19.Read transform with the specified rate limit policy factory.
      See Also:
      • GoogleAdsClient
    • expand

      public PCollection<com.google.ads.googleads.v19.services.GoogleAdsRow> expand(PCollection<String> input)
      Description copied from class: PTransform
      Override this method to specify how this 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).

      Specified by:
      expand in class PTransform<PCollection<String>,PCollection<com.google.ads.googleads.v19.services.GoogleAdsRow>>
    • populateDisplayData

      public void populateDisplayData(DisplayData.Builder builder)
      Description copied from class: PTransform
      Register display data for the given transform or component.

      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.

      Specified by:
      populateDisplayData in interface HasDisplayData
      Overrides:
      populateDisplayData in class PTransform<PCollection<String>,PCollection<com.google.ads.googleads.v19.services.GoogleAdsRow>>
      Parameters:
      builder - The builder to populate with display data.
      See Also: