김응진
05/25/2021, 9:25 AMdef test_flow():
client = prefect.Client(api_token="dddd")
id = client.register(google_ads_flow, project_name='pipeline-test')
client.create_flow_run(
flow_id=id,
parameters=dict(account_id=46)
)
got
Failed to load and execute Flow's environment: TypeError("missing a required argument: 'date'")
error.
There is nothing like date parameter or something in my flow.Kevin Kho
05/25/2021, 1:14 PMgoogle_ads_flow
?김응진
05/26/2021, 1:26 AMwith Flow("GoogleAds-ETL",
run_config=DockerRun(image="<http://registry.gitlab.com/xxxxx/xxxxxx:latest|registry.gitlab.com/xxxxx/xxxxxx:latest>", labels=["stag"])) as flow:
account_id = Parameter('account_id', default=None)
<http://logger.info|logger.info>(f'account_id : [{account_id}]')
account_secret = get_account_secret(account_id)
# Extract
ad_managers = extract_googleads_ad_managers(account_secret)
ad_campaigns = extract_google_ad_campaigns(account_secret)
ad_groups = extract_google_ad_groups(account_secret)
ads = extract_google_ads(account_secret)
ad_daily_reports = extract_google_ad_daily_reports(account_secret)
# Load
load_google_ad_datas(ad_managers, ad_campaigns, ad_groups, ads, ad_daily_reports)
flow.storage = GitLab(repo="0000000", path="GoogleAdsETL.py",
access_token_secret="GITLAB_PERSONAL_ACCESS_TOKEN")
Kevin Kho
05/26/2021, 1:32 AM김응진
05/26/2021, 1:33 AMKevin Kho
05/26/2021, 1:36 AMflow.run()
to debug? If the Docker container is still up, you can try getting the logs. I feel you have a task that uses a function that is asking for the date
to be passed in.김응진
05/26/2021, 1:36 AMKevin Kho
05/26/2021, 1:36 AMenv={'PREFECT__LOGGING__LEVEL':'DEBUG'}
to the DockerRun
. I'm not sure if this will get the logs you want.김응진
05/26/2021, 1:40 AM