Skip to content

Commit c2f9ca0

Browse files
authored
Merge pull request #2 from DP6/rebranding
Rebranding to Marketing Data Sync
2 parents c32367d + 3887c77 commit c2f9ca0

File tree

11 files changed

+230
-18
lines changed

11 files changed

+230
-18
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: '[BUG]'
5+
labels: bug
6+
assignees: ''
7+
---
8+
9+
**Describe the bug**
10+
A clear and concise description of what the bug is.
11+
12+
**To Reproduce**
13+
Steps to reproduce the behavior:
14+
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots**
24+
If applicable, add screenshots to help explain your problem.
25+
26+
**Additional context**
27+
Add any other context about the problem here.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: '[NEW]'
5+
labels: enhancement
6+
assignees: ''
7+
---
8+
9+
**Is your feature request related to a problem? Please describe.**
10+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
11+
12+
**Describe the solution you'd like**
13+
A clear and concise description of what you want to happen.
14+
15+
**Describe alternatives you've considered**
16+
A clear and concise description of any alternative solutions or features you've considered.
17+
18+
**Additional context**
19+
Add any other context or screenshots about the feature request here.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
**What issue does this pull request resolve?**
2+
3+
**What changes did you make?**
4+
5+
**Is there anything that requires more attention while reviewing?**

.github/dependabot.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
version: 2
2+
updates:
3+
# Maintain dependencies for GitHub Actions
4+
- package-ecosystem: 'github-actions'
5+
directory: '/'
6+
schedule:
7+
interval: 'weekly'
8+
9+
# Maintain dependencies for npm
10+
- package-ecosystem: 'pip'
11+
directory: '/megalist_dataflow'
12+
schedule:
13+
interval: 'weekly'

.github/workflows/codacy-analysis.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# This workflow checks out code, performs a Codacy security scan
2+
# and integrates the results with the
3+
# GitHub Advanced Security code scanning feature. For more information on
4+
# the Codacy security scan action usage and parameters, see
5+
# https://github.com/codacy/codacy-analysis-cli-action.
6+
# For more information on Codacy Analysis CLI in general, see
7+
# https://github.com/codacy/codacy-analysis-cli.
8+
9+
name: Codacy
10+
11+
on: ['push']
12+
13+
jobs:
14+
codacy-security-scan:
15+
name: Codacy Analysis
16+
runs-on: ubuntu-latest
17+
steps:
18+
# Checkout the repository to the GitHub Actions runner
19+
- name: Checkout code
20+
uses: actions/checkout@v2
21+
22+
# Execute Codacy Analysis CLI and generate a SARIF output with the security issues identified during the analysis
23+
- name: Run Codacy Analysis CLI
24+
uses: codacy/codacy-analysis-cli-action@3.0.0
25+
with:
26+
# Check https://github.com/codacy/codacy-analysis-cli#project-token to get your project token from your Codacy repository
27+
# You can also omit the token and run the tools that support default configurations
28+
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
29+
verbose: true
30+
output: results.sarif
31+
format: sarif
32+
# Adjust severity of non-security issues
33+
gh-code-scanning-compat: true
34+
# Force 0 exit code to allow SARIF file generation
35+
# This will handover control about PR rejection to the GitHub side
36+
max-allowed-issues: 2147483647

CODE_OF_CONDUCT.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to make participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, sex characteristics, gender identity and expression,
9+
level of experience, education, socio-economic status, nationality, personal
10+
appearance, race, religion, or sexual identity and orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
- Using welcoming and inclusive language
18+
- Being respectful of differing viewpoints and experiences
19+
- Gracefully accepting constructive criticism
20+
- Focusing on what is best for the community
21+
- Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
- The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
- Trolling, insulting/derogatory comments, and personal or political attacks
28+
- Public or private harassment
29+
- Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
- Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies within all project spaces, and it also applies when
49+
an individual is representing the project or its community in public spaces.
50+
Examples of representing a project or community include using an official
51+
project e-mail address, posting via an official social media account, or acting
52+
as an appointed representative at an online or offline event. Representation of
53+
a project may be further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting the project team at koopas@dp6.com.br. All
59+
complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
## Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
72+
73+
[homepage]: https://www.contributor-covenant.org
74+
75+
For answers to common questions about this code of conduct, see
76+
https://www.contributor-covenant.org/faq

README.md

Lines changed: 41 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,22 @@
1-
# Megalista
1+
# MDS - Marketing Data Sync
22

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).
44

5-
**Disclaimer:** This is not an officially supported Google product.
5+
<div align="center">
6+
<img src="https://raw.githubusercontent.com/DP6/templates-centro-de-inovacoes/main/public/images/centro_de_inovacao_dp6.png" height="100px" />
7+
</div>
8+
9+
<p align="center">
10+
<a href="#badge">
11+
<img alt="semantic-release" src="https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg">
12+
</a>
13+
<a href="https://www.codacy.com/gh/DP6/marketing-data-sync/dashboard?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=DP6/marketing-data-sync&amp;utm_campaign=Badge_Grade">
14+
<img alt="Code quality" src="https://app.codacy.com/project/badge/Grade/4bb28565a8b241abae247e6e84778723"/>
15+
</a>
16+
17+
</p>
18+
19+
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.
620

721
## Supported integrations
822
- **Google Ads**
@@ -25,7 +39,7 @@ Sample integration code for onboarding offline/CRM data from BigQuery as custom
2539
- 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)
2640

2741
## 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.
2943

3044
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.
3145

@@ -46,7 +60,7 @@ The solution consists in #1 a Google Spreadsheet (template) in which all rules a
4660
- **Google Cloud SDK**
4761

4862
### Access Requirements
49-
Those are the minimum roles necessary to deploy Megalista:
63+
Those are the minimum roles necessary to deploy MDS:
5064
- OAuth Config Editor
5165
- BigQuery User
5266
- BigQuery Job User
@@ -81,23 +95,23 @@ In order to create it, follow these steps:
8195
- On the **OAuth Consent Screen** and configure an *Application name*
8296
- Then, go to the **Credentials** and create an *OAuth client Id* with Application type set as *Desktop App*
8397
- 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
85-
- Sample: `./generate_megalist_token.sh client_id client_secret`
98+
- Run the **generate_mds_token.sh** script in this folder providing these two values and follow the instructions
99+
- Sample: `./generate_mds_token.sh client_id client_secret`
86100
- This will generate the *Access Token* and the *Refresh token*
87101

88102
### Creating a bucket on Cloud Storage
89103
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.
90104

91-
## Running Megalista
105+
## Running MDS
92106

93107
We recommend first running it locally and make sure that everything works.
94108
Make some sample tables on BigQuery for one of the uploaders and make sure that the data is getting correctly to the destination.
95109
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.
97111

98112
### Running locally
99113
```bash
100-
python3 megalist_dataflow/main.py \
114+
python3 mds_dataflow/main.py \
101115
--runner DirectRunner \
102116
--developer_token ${GOOGLE_ADS_DEVELOPER_TOKEN} \
103117
--setup_sheet_id ${CONFIGURATION_SHEET_ID} \
@@ -119,15 +133,15 @@ To execute the pipeline, use the following steps:
119133
- Go to **Dataflow** on GCP console
120134
- Click on *Create job from template*
121135
- 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
123137
- Fill in the parameters required and execute
124138

125139
### Scheduling pipeline
126140
To schedule daily/hourly runs, go to **Cloud Scheduler**:
127141
- Click on *create job*
128142
- Add a name and frequency as desired
129143
- 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
131145
- For a sample on the *body* of the request, check **cloud_config/scheduler.json**
132146
- Add OAuth Headers
133147
- Scope: https://www.googleapis.com/auth/cloud-platform
@@ -142,4 +156,18 @@ It's recommended to create a new Service Account to be used with the Cloud Sched
142156

143157

144158
## 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:
164+
165+
- [Commit pattern](https://www.conventionalcommits.org/en/v1.0.0/)
166+
167+
## Support:
168+
169+
**DP6 Koopa-troopa Team**
170+
171+
_e-mail: <koopas@dp6.com.br>_
172+
173+
<img src="https://raw.githubusercontent.com/DP6/templates-centro-de-inovacoes/main/public/images/koopa.png" height="100" />

_config.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
title: DP6 - Centro de inovações
2+
initiative: 'Marketing Data Sync'
3+
4+
remote_theme: dp6/dp6.github.io
5+
6+
plugins:
7+
- jekyll-sitemap
8+
- jekyll-gzip

cloud_config/scheduler_sample.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
{
2-
"jobName": "megalist_daily",
2+
"jobName": "mds_daily",
33
"parameters": {
44
"developer_token": "Google Ads Developer Token",
55
"client_id": "GCP OAuth Client id",
66
"client_secret": "GCP OAuth Client Secret",
77
"access_token": "GCP OAuth access token",
88
"refresh_token": "GCP OAuth refresh token",
99
"setup_sheet_id": "Setup Google Sheets Id",
10-
"bq_ops_dataset": "Auxliary bigquery dataset used for Megalista operations",
10+
"bq_ops_dataset": "Auxliary bigquery dataset used for MDS operations",
1111
"appsflyer_dev_key": "Apps flyer dev key"
1212
},
1313
"environment": {
14-
"tempLocation": "gs://megalist-data/temp",
14+
"tempLocation": "gs://bucket-name/temp",
1515
"zone": "us-central1-f"
1616
}
1717
}

megalist_dataflow/uploaders/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def get_ads_service(service_name, version, oauth_credentials, developer_token,
3232
client = adwords.AdWordsClient(
3333
developer_token,
3434
oauth2_client,
35-
'MegaList Dataflow',
35+
'Mds Dataflow',
3636
client_customer_id=customer_id)
3737
return client.GetService(service_name, version=version)
3838

0 commit comments

Comments
 (0)