Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FacebookAdsReportToGcsOperator CSV conversion option available #24758

Closed
2 tasks done
mz-heesun opened this issue Jun 30, 2022 · 5 comments
Closed
2 tasks done

FacebookAdsReportToGcsOperator CSV conversion option available #24758

mz-heesun opened this issue Jun 30, 2022 · 5 comments
Labels
area:providers good first issue kind:bug This is a clearly a bug pending-response provider:google Google (including GCP) related issues stale Stale PRs per the .github/workflows/stale.yml policy file

Comments

@mz-heesun
Copy link

Apache Airflow Provider(s)

facebook

Versions of Apache Airflow Providers

3.0.0

Apache Airflow version

2.2.5

Operating System

mac os

Deployment

Docker-Compose

Deployment details

In airflow 2.2.5, docker-compose up environment was established using facebook provider in docker.

What happened

A problem arose under certain circumstances. There was no cpc field.

An error occurred when converting to csv in that situation. It was an error that the field could not be found.

Below is the error message.

[2022-06-30, 10:38:39 UTC] {taskinstance.py:1776} ERROR - Task failed with exception Traceback (most recent call last): File "/opt/python3.8/lib/python3.8/site-packages/airflow/providers/google/cloud/transfers/facebook_ads_to_gcs.py", line 165, in execute total_row_count = self._decide_and_flush(converted_rows_with_action=converted_rows_with_action) File "/opt/python3.8/lib/python3.8/site-packages/airflow/providers/google/cloud/transfers/facebook_ads_to_gcs.py", line 197, in _decide_and_flush self._flush_rows( File "/opt/python3.8/lib/python3.8/site-packages/airflow/providers/google/cloud/transfers/facebook_ads_to_gcs.py", line 227, in _flush_rows writer.writerows(converted_rows) File "/opt/python3.8/lib/python3.8/csv.py", line 157, in writerows return self.writer.writerows(map(self._dict_to_list, rowdicts)) File "/opt/python3.8/lib/python3.8/csv.py", line 149, in _dict_to_list raise ValueError("dict contains fields not in fieldnames: " ValueError: dict contains fields not in fieldnames: 'cpc'

What you think should happen instead

I think you should specify an option so that missing fields can be ignored.

Depending on the user, you may want to proceed without the field.

How to reproduce

If airflow is installed, you can try running the dag.

Instead, it seems that only people who have set up Facebook ads can do this.

Anything else

Actually, in terms of code, it seems like it would be enough to provide only a way to control the option to ignore in the csv file conversion part.

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@mz-heesun mz-heesun added area:providers kind:bug This is a clearly a bug labels Jun 30, 2022
@boring-cyborg
Copy link

boring-cyborg bot commented Jun 30, 2022

Thanks for opening your first issue here! Be sure to follow the issue template!

@eladkal eladkal added provider:google Google (including GCP) related issues good first issue labels Jul 3, 2022
@eladkal
Copy link
Contributor

eladkal commented Jul 5, 2022

feel free to submit PR

@eladkal
Copy link
Contributor

eladkal commented Jul 8, 2023

The list of fields is controlled by:

:param fields: List of fields that is obtained from Facebook. Found in AdsInsights.Field class.

Isn't excluding cpc from this list a solution to your issue?

@github-actions
Copy link

github-actions bot commented Aug 8, 2023

This issue has been automatically marked as stale because it has been open for 30 days with no response from the author. It will be closed in next 7 days if no further activity occurs from the issue author.

@github-actions github-actions bot added the stale Stale PRs per the .github/workflows/stale.yml policy file label Aug 8, 2023
@github-actions
Copy link

This issue has been closed because it has not received response from the issue author.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:providers good first issue kind:bug This is a clearly a bug pending-response provider:google Google (including GCP) related issues stale Stale PRs per the .github/workflows/stale.yml policy file
Projects
None yet
Development

No branches or pull requests

2 participants