pierre_s
01/30/2023, 1:57 PMplugins:
extractors:
- name: tap-facebook
catalog: extract/tap-facebook.json
variant: singer-io
pip_url: git+<https://github.com/singer-io/tap-facebook.git>
config:
account_id: ''
start_date: 01/24/2023
end_date: 01/26/2023
insights_buffer_days: 0
include_deleted: true
select:
- adcreative.*
the attached. I've run an invoke --dump=catalog for the extractor to a file called "facebook.json", which is now referenced in the meltano.yml included above, and updated the tap-facebook.json to include the json as seen here:
{
"filters": {
"type": [
"null",
"array"
],
"items": {
"type": [
"null",
"string"
]
}
},
"streams": [
{
"stream": "adcreative",
"tap_stream_id": "adcreative",
"schema": {
"properties": {
"body": {
"type": [
"null",
"string"
]
from there, running a meltano invoke tap-facebook
seems to pull all of the "adcreative" data, but bombs on the following, in "ads"
```INFO Syncing adcreative, fields {'id'}
INFO Syncing ads, fields {'updated_time', 'id'}
INFO METRIC: {"type": "counter", "metric": "record_count", "value": 0, "tags": {"endpoint": "ads"}}
ERROR 'bool' object has no attribute 'lower'
Traceback (most recent call last):
File "/Users/pierre.semaan/SemaforWork/semafor-data-meltano/semafor-data-pipeline/.meltano/extractors/tap-facebook/venv/lib/python3.9/site-packages/tap_facebook/__init__.py", line 926, in main
main_impl()
File "/Users/pierre.semaan/SemaforWork/semafor-data-meltano/semafor-data-pipeline/.meltano/extractors/tap-facebook/venv/lib/python3.9/site-packages/tap_facebook/__init__.py", line 917, in main_impl
do_sync(account, catalog, args.state)
File "/Users/pierre.semaan/SemaforWork/semafor-data-meltano/semafor-data-pipeline/.meltano/extractors/tap-facebook/venv/lib/python3.9/site-packages/tap_facebook/__init__.py", line 806, in do_sync
for message in stream:
File "/Users/pierre.semaan/SemaforWork/semafor-data-meltano/semafor-data-pipeline/.meltano/extractors/tap-facebook/venv/lib/python3.9/site-packages/tap_facebook/__init__.py", line 336, in iter
if CONFIG.get('include_deleted', 'false').lower() == 'true':
AttributeError: 'bool' object has no attribute 'lower'
CRITICAL 'bool' object has no attribute 'lower'
Traceback (most recent call last):
File "/Users/pierre.semaan/SemaforWork/semafor-data-meltano/semafor-data-pipeline/.meltano/extractors/tap-facebook/venv/bin/tap-facebook", line 8, in <module>
sys.exit(main())
File "/Users/pierre.semaan/SemaforWork/semafor-data-meltano/semafor-data-pipeline/.meltano/extractors/tap-facebook/venv/lib/python3.9/site-packages/tap_facebook/__init__.py", line 934, in main
raise e
File "/Users/pierre.semaan/SemaforWork/semafor-data-meltano/semafor-data-pipeline/.meltano/extractors/tap-facebook/venv/lib/python3.9/site-packages/tap_facebook/__init__.py", line 926, in main
main_impl()
File "/Users/pierre.semaan/SemaforWork/semafor-data-meltano/semafor-data-pipeline/.meltano/extractors/tap-facebook/venv/lib/python3.9/site-packages/tap_facebook/__init__.py", line 917, in main_impl
do_sync(account, catalog, args.state)
File "/Users/pierre.semaan/SemaforWork/semafor-data-meltano/semafor-data-pipeline/.meltano/extractors/tap-facebook/venv/lib/python3.9/site-packages/tap_facebook/__init__.py", line 806, in do_sync
for message in stream:
File "/Users/pierre.semaan/SemaforWork/semafor-data-meltano/semafor-data-pipeline/.meltano/extractors/tap-facebook/venv/lib/python3.9/site-packages/tap_facebook/__init__.py", line 336, in iter
if CONFIG.get('include_delete…taylor
01/30/2023, 10:11 PMtaylor
01/30/2023, 10:13 PMsettings:
- name: include_deleted
kind: string
to your meltano.yml for tap-facebook you can override that setting and see what the effect ispierre_s
01/30/2023, 10:27 PMINFO Syncing adcreative, fields {'id'}
INFO Syncing ads, fields {'id', 'updated_time'}
INFO METRIC: {"type": "counter", "metric": "record_count", "value": 0, "tags": {"endpoint": "ads"}}
ERROR 'bool' object has no attribute 'lower'
Traceback (most recent call last):
taylor
01/30/2023, 10:30 PMinclude_deleted: true
in your config. The setting
redefines what it is, and then the config
sets the value.pat_nadolny
01/31/2023, 4:44 PMpierre_s
01/31/2023, 4:46 PMNFO METRIC: {"type": "counter", "metric": "record_count", "value": 0, "tags": {"endpoint": "ads"}}
ERROR 'bool' object has no attribute 'lower'"
Writing to BigQuery isn't even an issue yet, as we can't grab the data, even to a text filepat_nadolny
01/31/2023, 5:10 PMmeltano lock tap-facebook --update
it should refresh your settings metadata for that tappat_nadolny
01/31/2023, 5:10 PMpierre_s
01/31/2023, 5:12 PMpat_nadolny
01/31/2023, 5:15 PMpierre_s
01/31/2023, 5:38 PMmeltano invoke tap-facebook > fb_ads.txt
still bombs. Should it be running that check?pierre_s
01/31/2023, 5:38 PMpierre_s
01/31/2023, 5:40 PM- name: tap-facebook
variant: singer-io
pip_url: git+<https://github.com/singer-io/tap-fpacebook.git>
settings:
- name: include_deleted
kind: string
config:
account_id: ''
start_date: 01/24/2023
end_date: 01/26/2023
insights_buffer_days: 0
include_deleted: true
catalog: extract/tap-facebook.json
select:
- ads.*
pat_nadolny
01/31/2023, 5:43 PMsettings:
section from your meltano.yml. You can validate that your config is indeed being populated with a string enclosed in quotes if you run meltano config tap-facebook
pierre_s
01/31/2023, 5:44 PM{
"account_id": "",
"access_token": "",
"start_date": "01/24/2023",
"end_date": "01/26/2023",
"insights_buffer_days": 0,
"include_deleted": true
}
pierre_s
01/31/2023, 5:46 PMpat_nadolny
01/31/2023, 5:50 PMinclude_deleted: true
to include_deleted: 'true'
. I thought meltano would do that automatically but I guess notpat_nadolny
01/31/2023, 5:50 PMpierre_s
01/31/2023, 5:51 PMpierre_s
01/31/2023, 5:53 PMselect:
- ads.*
and I try running "`meltano invoke tap-facebook > fb_ads.txt`" it queries "adcreative" first, since it's defined in the .json?pat_nadolny
01/31/2023, 5:57 PMpierre_s
01/31/2023, 6:27 PMads.**,
and falling back to the If no rules are defined using meltano select, Meltano will fall back on catch-all rule *.* so that all entities and attributes are selected.
until it bombed on ads.*, the second in the list, after adcreative ...