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
import pytest | |
from pytest_bdd import given, when, then, scenario, parsers, scenarios | |
from demo_project.transformers.user_segment import get_user_segment | |
import pandas as pd | |
@scenario( | |
"test_customer_segment.feature", | |
"Label customers as premium if they are between 19 and 60 and made high past purchases", | |
) |
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
Feature: Customer Segmentation | |
As a retail business | |
In order to personalize marketing strategies | |
I want to segment customers based on their attributes and behavior | |
Scenario: Label customers as premium if they are between 19 and 60 and made high past purchases | |
Given a customer is <age> years old | |
And the customer has <income_level> income | |
And the customer has made high past purchases | |
When the segmentation process is executed |
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
from dataclasses import dataclass | |
@dataclass | |
class BQJobProfile: | |
job: object | |
user: str | |
def __post_init__(self): | |
self.job_id = self.job["jobName"]["jobId"] |
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
resource.type="bigquery_resource" | |
logName=("projects/<project_id>/logs/cloudaudit.googleapis.com%2Factivity" OR "projects/<project_id>/logs/cloudaudit.googleapis.com%2Fdata_access") | |
protoPayload.methodName="jobservice.jobcompleted" |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder