-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(PC-31833)[API] feat: pro(marketing): update (new) contacts lists
- Loading branch information
1 parent
ecad854
commit 573f00a
Showing
5 changed files
with
73 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import pydantic.v1 as pydantic_v1 | ||
|
||
from pcapi import settings | ||
|
||
from .base import BaseQuery | ||
|
||
|
||
class ProLiveShowEmailChurned40DaysAgoModel(pydantic_v1.BaseModel): | ||
venue_booking_email: int | None | ||
|
||
|
||
class ProLiveShowEmailChurned40DaysAgoQuery(BaseQuery): | ||
raw_query = f""" | ||
select | ||
distinct venue_booking_email | ||
from | ||
`{settings.BIG_QUERY_TABLE_BASENAME}.marketing_pro_live_show_email_churned_40_days_ago` | ||
where | ||
cast(execution_date as date) = current_date() | ||
""" | ||
|
||
model = ProLiveShowEmailChurned40DaysAgoModel | ||
|
||
|
||
class ProLiveShowEmailLastBooking40DaysAgoModel(pydantic_v1.BaseModel): | ||
venue_booking_email: int | None | ||
|
||
|
||
class ProLiveShowEmailLastBooking40DaysAgoQuery(BaseQuery): | ||
raw_query = f""" | ||
select | ||
distinct venue_booking_email | ||
from | ||
`{settings.BIG_QUERY_TABLE_BASENAME}.marketing_pro_live_show_email_last_booking_40_days_ago` | ||
where | ||
cast(execution_date as date) = current_date() | ||
""" | ||
|
||
model = ProLiveShowEmailLastBooking40DaysAgoModel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters