You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+41-13Lines changed: 41 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,22 @@
1
-
# Megalista
1
+
# MDS - Marketing Data Sync
2
2
3
-
Sample integration code for onboarding offline/CRM data from BigQuery as custom audiences or offline conversions in Google Ads, Google Analytics 360, Google Display & Video 360 and Google Campaign Manager.
3
+
Solution based on the [Google Megalista project](https://github.com/google/megalista).
4
4
5
-
**Disclaimer:** This is not an officially supported Google product.
Sample integration code for onboarding offline/CRM data from BigQuery as custom audiences or offline conversions in Google Ads, Google Analytics 360, Google Display & Video 360, Google Campaign Manager and Facebook Ads.
6
20
7
21
## Supported integrations
8
22
-**Google Ads**
@@ -25,7 +39,7 @@ Sample integration code for onboarding offline/CRM data from BigQuery as custom
25
39
- S2S Offline events API (conversion upload), to be used for audience creation and in-app events with Google Ads and DV360 [[details]](https://support.appsflyer.com/hc/en-us/articles/207034486-API-de-eventos-de-servidor-para-servidor-S2S-mobile-para-mobile)
26
40
27
41
## How does it work
28
-
Megalista was design to separate the configuration of conversion/audience upload rules from the engine, giving more freedom for non-technical teams (i.e. Media and Business Inteligence) to setup multiple upload rules on their own.
42
+
MDS was design to separate the configuration of conversion/audience upload rules from the engine, giving more freedom for non-technical teams (i.e. Media and Business Inteligence) to setup multiple upload rules on their own.
29
43
30
44
The solution consists in #1 a Google Spreadsheet (template) in which all rules are defined by mapping a data source (BigQuery Table) to a destination (data upload endpoint) and #2, an apache beam workflow running on Google Dataflow, scheduled to upload the data in batch mode.
31
45
@@ -46,7 +60,7 @@ The solution consists in #1 a Google Spreadsheet (template) in which all rules a
46
60
-**Google Cloud SDK**
47
61
48
62
### Access Requirements
49
-
Those are the minimum roles necessary to deploy Megalista:
63
+
Those are the minimum roles necessary to deploy MDS:
50
64
- OAuth Config Editor
51
65
- BigQuery User
52
66
- BigQuery Job User
@@ -81,23 +95,23 @@ In order to create it, follow these steps:
81
95
- On the **OAuth Consent Screen** and configure an *Application name*
82
96
- Then, go to the **Credentials** and create an *OAuth client Id* with Application type set as *Desktop App*
83
97
- This will generate a *Client Id* and a *Client secret*
84
-
- Run the **generate_megalist_token.sh** script in this folder providing these two values and follow the instructions
- This will generate the *Access Token* and the *Refresh token*
87
101
88
102
### Creating a bucket on Cloud Storage
89
103
This bucket will hold the deployed code for this solution. To create it, navigate to the *Storage* link on the top-left menu on GCP and click on *Create bucket*. You can use Regional location and Standard data type for this bucket.
90
104
91
-
## Running Megalista
105
+
## Running MDS
92
106
93
107
We recommend first running it locally and make sure that everything works.
94
108
Make some sample tables on BigQuery for one of the uploaders and make sure that the data is getting correctly to the destination.
95
109
After that is done, upload the Dataflow template to GCP and try running it manually via the UI to make sure it works.
96
-
Lastly, configure the Cloud Scheduler to run Megalista in the frequency desired and you'll have a fully functional data integration pipeline.
110
+
Lastly, configure the Cloud Scheduler to run MDS in the frequency desired and you'll have a fully functional data integration pipeline.
97
111
98
112
### Running locally
99
113
```bash
100
-
python3 megalist_dataflow/main.py \
114
+
python3 mds_dataflow/main.py \
101
115
--runner DirectRunner \
102
116
--developer_token ${GOOGLE_ADS_DEVELOPER_TOKEN} \
103
117
--setup_sheet_id ${CONFIGURATION_SHEET_ID} \
@@ -119,15 +133,15 @@ To execute the pipeline, use the following steps:
119
133
- Go to **Dataflow** on GCP console
120
134
- Click on *Create job from template*
121
135
- On the template selection dropdown, select *Custom template*
122
-
- Find the *megalist* file on the bucket you've created, on the templates folder
136
+
- Find the *mds* file on the bucket you've created, on the templates folder
123
137
- Fill in the parameters required and execute
124
138
125
139
### Scheduling pipeline
126
140
To schedule daily/hourly runs, go to **Cloud Scheduler**:
127
141
- Click on *create job*
128
142
- Add a name and frequency as desired
129
143
- For *target* set as HTTP
130
-
- Configure a *POST* for url: https://dataflow.googleapis.com/v1b3/projects/${YOUR_PROJECT_ID}/locations/${LOCATION}/templates:launch?gcsPath=gs://${BUCKET_NAME}/templates/megalist, replacing the params with the actual values
144
+
- Configure a *POST* for url: https://dataflow.googleapis.com/v1b3/projects/${YOUR_PROJECT_ID}/locations/${LOCATION}/templates:launch?gcsPath=gs://${BUCKET_NAME}/templates/mds, replacing the params with the actual values
131
145
- For a sample on the *body* of the request, check **cloud_config/scheduler.json**
@@ -142,4 +156,18 @@ It's recommended to create a new Service Account to be used with the Cloud Sched
142
156
143
157
144
158
## Usage
145
-
Every upload method expects as source a BigQuery data with specific fields, in addition to specific configuration metadata. For details on how to setup your upload routines, refer to the [Megalista Wiki](https://github.com/google/megalista/wiki) or the [Megalista user guide](https://github.com/google/megalista/blob/main/documentation/Megalista%20-%20Technical%20User%20Guide%20-%20EXTERNAL.pdf).
159
+
Every upload method expects as source a BigQuery data with specific fields, in addition to specific configuration metadata. For details on how to setup your upload routines, refer to the [MDS Wiki](https://github.com/dp6/marketing-data-sync/wiki) or the [MDS user guide](https://github.com/dp6/marketing-data-sync/blob/main/documentation/mds%20-%20Technical%20User%20Guide%20-%20EXTERNAL.pdf).
160
+
161
+
### Mandatory requirements
162
+
163
+
Only contributions that meet the following requirements will be accepted:
0 commit comments