Hi everyone! Hope you are well! I'm trying to def...
# plugins-general
o
Hi everyone! Hope you are well! I'm trying to define the data scheme for the
tap-facebook
extractor but I cannot figure out where some fields reside in and if they are entirely available currently in the implementation available. I must be transparent that I have very low familiarity with the Marketing API to begin with and the data points. Looking at the documentation here https://github.com/singer-io/tap-facebook: Extracts the following resources from Facebook for a one Ad account • Ad Creatives • Ads • Ad Sets • Campaigns • Ads Insights • Breakdown by age and gender • Breakdown by country • Breakdown by placement and device It appears as if the 'Breakdown' available within Meltano do not include
impression_device
,
platform_position
or
publisher_platform
breakdowns only age/gender, country and placement_device Questions • For instance I do not understand how the '*breakdown*' works - and if these are tables or dimensions and how it comes together within the extractor on Meltano - seems each one are multiple tables. • I could not find the following metrics
cost_per_conversion
,
video_play_actions
- any idea where those sit and are available? •
action_destination
,
action_type
- how and where do I find these ? Any assistance would be helpful?
d
@ofer_kulka I'm good, thanks!
It appears as if the 'Breakdown' available within Meltano do not include 
impression_device
platform_position
 or 
publisher_platform
breakdowns only age/gender, country and placement_device
The
ads_insights_platform_and_device
stream actually breaks down by
publisher_platform
,
platform_position
and
impression_device
: https://github.com/singer-io/tap-facebook/blob/master/tap_facebook/__init__.py#L568-L571
For instance I do not understand how the '*breakdown*' works - and if these are tables or dimensions and how it comes together within the extractor on Meltano - seems each one are multiple tables.
They are specific reports that are requested from the Marketing API using the breakdown properties listed in the source code (as in the
ads_insights_platform_and_device
example above), that are exposed by the tap as streams (tables).
I could not find the following metrics 
cost_per_conversion
 , 
video_play_actions
  - any idea where those sit and are available?
They're not currently supported by tap-facebook, but you may be able to get them to work if you fork https://gitlab.com/meltano/tap-facebook or https://github.com/singer-io/tap-facebook and add them to https://github.com/singer-io/tap-facebook/blob/master/tap_facebook/schemas/ads_insights.json like so:
Copy code
"cost_per_conversion": {"$ref": "ads_action_stats.json"},
    "video_play_actions": {"$ref": "ads_action_stats.json"},
If that works, I'd accept a merge request to https://gitlab.com/meltano/tap-facebook with that change 🙂
action_destination
 , 
action_type
 - how and where do I find these  ?
These appear to be subproperties of every insight field that refs
ads_action_stats.json
: https://github.com/singer-io/tap-facebook/blob/e1033b0d8fa7b0b4b832990f693fed26a87880ec/tap_facebook/schemas/shared/ads_action_stats.json#L48-L65 How those arrays and their nested object end up being represented into your target DB depends on the loader. With target-postgres, I'd expect you get jsonb columns.
o
Thank you for the details answer, that makes total sense! I'll see whether I have time to tackle this
cost_per_conversion , video_play_actions
and if I do for sure will create an MR ! Does this mean though that
Meltano
already supports this - i.e I should see this table ads_insights_platform_and_device?
Also, I couldn't locate any reporting of app-installs:
Copy code
App Installs *
Desktop App Installs *
Mobile App Installs *
Cost per App Install *
Is that already available within
Meltano
?
d
Does this mean though that 
Meltano
 already supports this - i.e I should see this table ads_insights_platform_and_device?
Yes. Is it not showing up in
meltano select tap-facebook --list --all
?
Also, I couldn't locate any reporting of app-installs:
Is that already available within 
Meltano
 ?
It doesn't look like these are currently supported by https://gitlab.com/meltano/tap-facebook/ or https://github.com/singer-io/tap-facebook, no, so you'd want to modify the tap to add them as well