示例#1
0
 def expand(self, executions):
     return (
         executions
         | 'Load Data -  GA data import' >> BatchesFromExecutions(DestinationType.GA_DATA_IMPORT, 1000000)
         | 'Delete Data -  GA data import' >> beam.ParDo(GoogleAnalyticsDataImportEraser(self._oauth_credentials))
         | 'Upload - GA data import' >> beam.ParDo(GoogleAnalyticsDataImportUploaderDoFn(self._oauth_credentials))
     )
示例#2
0
 def expand(self, executions):
     return (
         executions
         | 'Load Data - GoogleAdsOfflineConversions' >> BatchesFromExecutions(DestinationType.ADS_OFFLINE_CONVERSION)
         | 'Upload - GoogleAdsOfflineConversions' >> beam.ParDo(GoogleAdsOfflineUploaderDoFn(self._oauth_credentials,
                                                                                             self._dataflow_options.developer_token))
     )
示例#3
0
 def expand(self, executions):
     return (
         executions
         | 'Load Data -  GA user list' >> BatchesFromExecutions(
             DestinationType.GA_USER_LIST_UPLOAD, 5000000)
         | 'Upload - GA user list' >> beam.ParDo(
             GoogleAnalyticsUserListUploaderDoFn(self._oauth_credentials)))
示例#4
0
 def expand(self, executions):
     return (
         executions
         | 'Load Data - Google Ads Customer Match User Id' >> BatchesFromExecutions(DestinationType.ADS_CUSTOMER_MATCH_USER_ID_UPLOAD)
         | 'Hash Users - Google Ads Customer Match Contact Info' >> beam.Map(self._hasher.hash_users)
         | 'Upload - Google Ads Customer User Device Id' >> beam.ParDo(
             GoogleAdsCustomerMatchUserIdUploaderDoFn(self._oauth_credentials, self._dataflow_options.developer_token))
     )
示例#5
0
 def expand(self, executions):
     return (
         executions
         | 'Load Data -  Google Ads SSD' >> BatchesFromExecutions(DestinationType.ADS_SSD_UPLOAD, 50)
         | 'Hash Users - Google Ads SSD' >> beam.Map(self._hasher.map_batch)
         | 'Upload - Google Ads SSD' >> beam.ParDo(GoogleAdsSSDUploaderDoFn(self._oauth_credentials,
                                                                            self._dataflow_options.developer_token))
     )
示例#6
0
 def expand(self, executions):
     return (
         executions
         | 'Load Data -  CM conversion' >> BatchesFromExecutions(DestinationType.CM_OFFLINE_CONVERSION, 1000, transactional=True)
         | 'Upload - CM conversion' >> beam.ParDo(CampaignManagerConversionUploaderDoFn(self._oauth_credentials))
         | 'Persist results - CM conversion' >> beam.ParDo(
           TransactionalEventsResultsWriter(self._dataflow_options.bq_ops_dataset))
     )
示例#7
0
 def expand(self, executions):
     return (
         executions
         | 'Load Data - AppsFlyer S2S events' >>
         BatchesFromExecutions(DestinationType.APPSFLYER_S2S_EVENTS, 1000, transactional=True)
         | 'Upload - AppsFlyer S2S events' >>
         beam.ParDo(AppsFlyerS2SUploaderDoFn(self._dataflow_options.appsflyer_dev_key))
         | 'Persist results - AppsFlyer S2S events' >> beam.ParDo(TransactionalEventsResultsWriter(self._dataflow_options.bq_ops_dataset))
     )
示例#8
0
 def expand(self, executions):
     return (
         executions
         | 'Load Data - GA 4 measurement protocol' >> BatchesFromExecutions(DestinationType.GA_4_MEASUREMENT_PROTOCOL, 20, 
           transactional=True)
         | 'Upload - GA 4 measurement protocol' >>
           beam.ParDo(GoogleAnalytics4MeasurementProtocolUploaderDoFn())
         | 'Persist results - GA 4 measurement protocol' >> beam.ParDo(TransactionalEventsResultsWriter(self._dataflow_options.bq_ops_dataset))
     )