ingestr 0.13.54__tar.gz → 0.13.55__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of ingestr might be problematic. Click here for more details.
- {ingestr-0.13.54 → ingestr-0.13.55}/PKG-INFO +1 -1
- ingestr-0.13.55/docs/supported-sources/facebook-ads.md +202 -0
- ingestr-0.13.55/ingestr/src/buildinfo.py +1 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/facebook_ads/__init__.py +18 -8
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/facebook_ads/helpers.py +2 -4
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/facebook_ads/settings.py +2 -0
- ingestr-0.13.55/ingestr/src/facebook_ads/utils.py +39 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/sources.py +54 -1
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/stripe_analytics/__init__.py +4 -2
- {ingestr-0.13.54 → ingestr-0.13.55}/package-lock.json +3 -3
- {ingestr-0.13.54 → ingestr-0.13.55}/requirements_arm64.txt +3 -3
- ingestr-0.13.54/docs/supported-sources/facebook-ads.md +0 -51
- ingestr-0.13.54/ingestr/src/buildinfo.py +0 -1
- {ingestr-0.13.54 → ingestr-0.13.55}/.dockerignore +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/.githooks/pre-commit-hook.sh +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/.github/workflows/deploy-docs.yml +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/.github/workflows/release.yml +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/.github/workflows/secrets-scan.yml +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/.github/workflows/tests.yml +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/.gitignore +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/.gitleaksignore +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/.python-version +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/.vale.ini +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/Dockerfile +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/LICENSE.md +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/Makefile +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/README.md +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/.vitepress/config.mjs +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/.vitepress/theme/custom.css +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/.vitepress/theme/index.js +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/commands/example-uris.md +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/commands/ingest.md +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/getting-started/core-concepts.md +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/getting-started/incremental-loading.md +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/getting-started/quickstart.md +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/getting-started/telemetry.md +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/index.md +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/media/applovin_max.png +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/media/athena.png +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/media/clickhouse_img.png +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/media/cratedb-source.png +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/media/freshdesk_ingestion.png +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/media/gcp_spanner_ingestion.png +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/media/github.png +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/media/google_analytics_realtime_report.png +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/media/googleanalytics.png +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/media/ingestion_elasticsearch_img.png +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/media/kinesis.bigquery.png +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/media/linkedin_ads.png +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/media/mixpanel_ingestion.png +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/media/personio.png +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/media/personio_duckdb.png +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/media/phantombuster.png +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/media/pipedrive.png +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/media/quickbook_ingestion.png +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/media/sftp.png +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/media/stripe_postgres.png +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/media/tiktok.png +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/supported-sources/adjust.md +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/supported-sources/airtable.md +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/supported-sources/applovin.md +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/supported-sources/applovin_max.md +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/supported-sources/appsflyer.md +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/supported-sources/appstore.md +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/supported-sources/asana.md +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/supported-sources/athena.md +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/supported-sources/attio.md +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/supported-sources/bigquery.md +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/supported-sources/chess.md +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/supported-sources/clickhouse.md +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/supported-sources/cratedb.md +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/supported-sources/csv.md +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/supported-sources/custom_queries.md +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/supported-sources/databricks.md +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/supported-sources/db2.md +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/supported-sources/duckdb.md +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/supported-sources/dynamodb.md +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/supported-sources/elasticsearch.md +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/supported-sources/frankfurter.md +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/supported-sources/freshdesk.md +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/supported-sources/gcs.md +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/supported-sources/github.md +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/supported-sources/google-ads.md +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/supported-sources/google_analytics.md +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/supported-sources/gorgias.md +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/supported-sources/gsheets.md +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/supported-sources/hubspot.md +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/supported-sources/kafka.md +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/supported-sources/kinesis.md +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/supported-sources/klaviyo.md +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/supported-sources/linkedin_ads.md +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/supported-sources/mixpanel.md +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/supported-sources/mongodb.md +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/supported-sources/mssql.md +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/supported-sources/mysql.md +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/supported-sources/notion.md +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/supported-sources/oracle.md +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/supported-sources/personio.md +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/supported-sources/phantombuster.md +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/supported-sources/pipedrive.md +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/supported-sources/postgres.md +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/supported-sources/quickbooks.md +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/supported-sources/redshift.md +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/supported-sources/s3.md +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/supported-sources/salesforce.md +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/supported-sources/sap-hana.md +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/supported-sources/sftp.md +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/supported-sources/shopify.md +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/supported-sources/slack.md +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/supported-sources/smartsheets.md +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/supported-sources/snowflake.md +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/supported-sources/solidgate.md +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/supported-sources/spanner.md +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/supported-sources/sqlite.md +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/supported-sources/stripe.md +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/supported-sources/tiktok-ads.md +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/supported-sources/zendesk.md +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/tutorials/load-kinesis-bigquery.md +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/tutorials/load-personio-duckdb.md +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/docs/tutorials/load-stripe-postgres.md +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/conftest.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/main.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/.gitignore +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/adjust/__init__.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/adjust/adjust_helpers.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/airtable/__init__.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/applovin/__init__.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/applovin_max/__init__.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/appsflyer/__init__.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/appsflyer/client.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/appstore/__init__.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/appstore/client.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/appstore/errors.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/appstore/models.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/appstore/resources.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/arrow/__init__.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/asana_source/__init__.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/asana_source/helpers.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/asana_source/settings.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/attio/__init__.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/attio/helpers.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/blob.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/chess/__init__.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/chess/helpers.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/chess/settings.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/collector/spinner.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/destinations.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/dynamodb/__init__.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/elasticsearch/__init__.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/errors.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/facebook_ads/exceptions.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/factory.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/filesystem/__init__.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/filesystem/helpers.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/filesystem/readers.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/filters.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/frankfurter/__init__.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/frankfurter/helpers.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/freshdesk/__init__.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/freshdesk/freshdesk_client.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/freshdesk/settings.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/github/__init__.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/github/helpers.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/github/queries.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/github/settings.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/google_ads/__init__.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/google_ads/field.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/google_ads/metrics.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/google_ads/predicates.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/google_ads/reports.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/google_analytics/__init__.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/google_analytics/helpers.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/google_sheets/README.md +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/google_sheets/__init__.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/google_sheets/helpers/__init__.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/google_sheets/helpers/api_calls.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/google_sheets/helpers/data_processing.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/gorgias/__init__.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/gorgias/helpers.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/http_client.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/hubspot/__init__.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/hubspot/helpers.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/hubspot/settings.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/kafka/__init__.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/kafka/helpers.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/kinesis/__init__.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/kinesis/helpers.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/klaviyo/__init__.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/klaviyo/client.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/klaviyo/helpers.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/linkedin_ads/__init__.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/linkedin_ads/dimension_time_enum.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/linkedin_ads/helpers.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/loader.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/mixpanel/__init__.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/mixpanel/client.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/mongodb/__init__.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/mongodb/helpers.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/notion/__init__.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/notion/helpers/__init__.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/notion/helpers/client.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/notion/helpers/database.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/notion/settings.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/partition.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/personio/__init__.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/personio/helpers.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/phantombuster/__init__.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/phantombuster/client.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/pipedrive/__init__.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/pipedrive/helpers/__init__.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/pipedrive/helpers/custom_fields_munger.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/pipedrive/helpers/pages.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/pipedrive/settings.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/pipedrive/typing.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/quickbooks/__init__.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/resource.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/salesforce/__init__.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/salesforce/helpers.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/shopify/__init__.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/shopify/exceptions.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/shopify/helpers.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/shopify/settings.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/slack/__init__.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/slack/helpers.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/slack/settings.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/smartsheets/__init__.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/solidgate/__init__.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/solidgate/helpers.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/sql_database/__init__.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/sql_database/callbacks.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/stripe_analytics/helpers.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/stripe_analytics/settings.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/table_definition.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/telemetry/event.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/testdata/fakebqcredentials.json +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/tiktok_ads/__init__.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/tiktok_ads/tiktok_helpers.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/time.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/version.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/zendesk/__init__.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/zendesk/helpers/__init__.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/zendesk/helpers/api_helpers.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/zendesk/helpers/credentials.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/zendesk/helpers/talk_api.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/src/zendesk/settings.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/testdata/.gitignore +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/testdata/create_replace.csv +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/testdata/delete_insert_expected.csv +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/testdata/delete_insert_part1.csv +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/testdata/delete_insert_part2.csv +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/testdata/merge_expected.csv +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/testdata/merge_part1.csv +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/testdata/merge_part2.csv +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/ingestr/tests/unit/test_smartsheets.py +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/package.json +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/pyproject.toml +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/requirements-dev.txt +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/requirements.in +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/requirements.txt +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/resources/demo.gif +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/resources/demo.tape +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/resources/ingestr.svg +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/styles/Google/AMPM.yml +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/styles/Google/Acronyms.yml +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/styles/Google/Colons.yml +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/styles/Google/Contractions.yml +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/styles/Google/DateFormat.yml +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/styles/Google/Ellipses.yml +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/styles/Google/EmDash.yml +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/styles/Google/Exclamation.yml +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/styles/Google/FirstPerson.yml +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/styles/Google/Gender.yml +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/styles/Google/GenderBias.yml +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/styles/Google/HeadingPunctuation.yml +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/styles/Google/Headings.yml +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/styles/Google/Latin.yml +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/styles/Google/LyHyphens.yml +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/styles/Google/OptionalPlurals.yml +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/styles/Google/Ordinal.yml +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/styles/Google/OxfordComma.yml +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/styles/Google/Parens.yml +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/styles/Google/Passive.yml +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/styles/Google/Periods.yml +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/styles/Google/Quotes.yml +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/styles/Google/Ranges.yml +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/styles/Google/Semicolons.yml +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/styles/Google/Slang.yml +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/styles/Google/Spacing.yml +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/styles/Google/Spelling.yml +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/styles/Google/Units.yml +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/styles/Google/We.yml +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/styles/Google/Will.yml +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/styles/Google/WordList.yml +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/styles/Google/meta.json +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/styles/Google/vocab.txt +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/styles/bruin/Ingestr.yml +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/styles/config/vocabularies/bruin/accept.txt +0 -0
- {ingestr-0.13.54 → ingestr-0.13.55}/test.env.template +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ingestr
|
|
3
|
-
Version: 0.13.
|
|
3
|
+
Version: 0.13.55
|
|
4
4
|
Summary: ingestr is a command-line application that ingests data from various sources and stores them in any database.
|
|
5
5
|
Project-URL: Homepage, https://github.com/bruin-data/ingestr
|
|
6
6
|
Project-URL: Issues, https://github.com/bruin-data/ingestr/issues
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
# Facebook Ads
|
|
2
|
+
|
|
3
|
+
Facebook Ads is the advertising platform that helps users to create targeted ads on Facebook, Instagram and Messenger.
|
|
4
|
+
|
|
5
|
+
ingestr supports Facebook Ads as a source.
|
|
6
|
+
|
|
7
|
+
## URI format
|
|
8
|
+
|
|
9
|
+
The URI format for Facebook Ads is as follows:
|
|
10
|
+
|
|
11
|
+
```plaintext
|
|
12
|
+
facebookads://?access_token=<access_token>&account_id=<account_id>
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
URI parameters:
|
|
16
|
+
|
|
17
|
+
- `access_token` is associated with Business Facebook App.
|
|
18
|
+
- `account_id` is associated with Ad manager.
|
|
19
|
+
|
|
20
|
+
Both are used for authentication with Facebook Ads API.
|
|
21
|
+
|
|
22
|
+
The URI is used to connect to Facebook Ads API for extracting data.
|
|
23
|
+
|
|
24
|
+
## Setting up a Facebook Ads Integration
|
|
25
|
+
|
|
26
|
+
Facebook Ads requires a few steps to set up an integration, please follow the guide dltHub [has built here](https://dlthub.com/docs/dlt-ecosystem/verified-sources/facebook_ads#setup-guide).
|
|
27
|
+
|
|
28
|
+
Once you complete the guide, you should have an access token and an Account ID. Let's say your `access_token` is `abcdef` and `account_id` is `1234`, here's a sample command that will copy the data from Facebook Ads into a DuckDB database:
|
|
29
|
+
|
|
30
|
+
```sh
|
|
31
|
+
ingestr ingest \
|
|
32
|
+
--source-uri 'facebookads://?access_token=easdyh&account_id=1234' \
|
|
33
|
+
--source-table 'campaigns' \
|
|
34
|
+
--dest-uri 'duckdb:///facebook.duckdb' \
|
|
35
|
+
--dest-table 'dest.campaigns'
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
The result of this command will be a table in the `facebook.duckdb` database.
|
|
39
|
+
|
|
40
|
+
## Tables
|
|
41
|
+
|
|
42
|
+
Facebook Ads source allows ingesting the following sources into separate tables:
|
|
43
|
+
|
|
44
|
+
- `campaigns`: Retrieves campaign data with fields:
|
|
45
|
+
- `id`
|
|
46
|
+
- `updated_time`
|
|
47
|
+
- `created_time`
|
|
48
|
+
- `name`
|
|
49
|
+
- `status`
|
|
50
|
+
- `effective_status`
|
|
51
|
+
- `objective`
|
|
52
|
+
- `start_time`
|
|
53
|
+
- `stop_time`
|
|
54
|
+
- `daily_budget`
|
|
55
|
+
- `lifetime_budget`
|
|
56
|
+
|
|
57
|
+
- `ad_sets`: Retrieves ad set data with fields:
|
|
58
|
+
- `id`
|
|
59
|
+
- `updated_time`
|
|
60
|
+
- `created_time`
|
|
61
|
+
- `name`
|
|
62
|
+
- `status`
|
|
63
|
+
- `effective_status`
|
|
64
|
+
- `campaign_id`
|
|
65
|
+
- `start_time`
|
|
66
|
+
- `end_time`
|
|
67
|
+
- `daily_budget`
|
|
68
|
+
- `lifetime_budget`
|
|
69
|
+
- `optimization_goal`
|
|
70
|
+
- `promoted_object`
|
|
71
|
+
- `billing_event`
|
|
72
|
+
- `bid_amount`
|
|
73
|
+
- `bid_strategy`
|
|
74
|
+
- `targeting`
|
|
75
|
+
|
|
76
|
+
- `leads`: Retrieves lead data with fields:
|
|
77
|
+
- `id`
|
|
78
|
+
- `created_time`
|
|
79
|
+
- `ad_id`
|
|
80
|
+
- `ad_name`
|
|
81
|
+
- `adset_id`
|
|
82
|
+
- `adset_name`
|
|
83
|
+
- `campaign_id`
|
|
84
|
+
- `campaign_name`
|
|
85
|
+
- `form_id`
|
|
86
|
+
- `field_data`
|
|
87
|
+
|
|
88
|
+
- `ads_creatives`: Retrieves ad creative data with fields:
|
|
89
|
+
- `id`
|
|
90
|
+
- `name`
|
|
91
|
+
- `status`
|
|
92
|
+
- `thumbnail_url`
|
|
93
|
+
- `object_story_spec`
|
|
94
|
+
- `effective_object_story_id`
|
|
95
|
+
- `call_to_action_type`
|
|
96
|
+
- `object_type`
|
|
97
|
+
- `template_url`
|
|
98
|
+
- `url_tags`
|
|
99
|
+
- `instagram_actor_id`
|
|
100
|
+
- `product_set_id`
|
|
101
|
+
|
|
102
|
+
- `ads`: Retrieves ad data with fields:
|
|
103
|
+
- `id`
|
|
104
|
+
- `updated_time`
|
|
105
|
+
- `created_time`
|
|
106
|
+
- `name`
|
|
107
|
+
- `status`
|
|
108
|
+
- `effective_status`
|
|
109
|
+
- `adset_id`
|
|
110
|
+
- `campaign_id`
|
|
111
|
+
- `creative`
|
|
112
|
+
- `targeting`
|
|
113
|
+
- `tracking_specs`
|
|
114
|
+
- `conversion_specs`
|
|
115
|
+
|
|
116
|
+
- `facebook_insights`: Retrieves insights data with fields:
|
|
117
|
+
- `campaign_id`
|
|
118
|
+
- `adset_id`
|
|
119
|
+
- `ad_id`
|
|
120
|
+
- `date_start`
|
|
121
|
+
- `date_stop`
|
|
122
|
+
- `reach`
|
|
123
|
+
- `impressions`
|
|
124
|
+
- `frequency`
|
|
125
|
+
- `clicks`
|
|
126
|
+
- `unique_clicks`
|
|
127
|
+
- `ctr`
|
|
128
|
+
- `unique_ctr`
|
|
129
|
+
- `cpc`
|
|
130
|
+
- `cpm`
|
|
131
|
+
- `cpp`
|
|
132
|
+
- `spend`
|
|
133
|
+
- `actions`
|
|
134
|
+
- `action_values`
|
|
135
|
+
- `cost_per_action_type`
|
|
136
|
+
- `website_ctr`
|
|
137
|
+
- `account_currency`
|
|
138
|
+
- `ad_click_actions`
|
|
139
|
+
- `ad_name`
|
|
140
|
+
- `adset_name`
|
|
141
|
+
- `campaign_name`
|
|
142
|
+
- `country`
|
|
143
|
+
- `dma`
|
|
144
|
+
- `full_view_impressions`
|
|
145
|
+
- `full_view_reach`
|
|
146
|
+
- `inline_link_click_ctr`
|
|
147
|
+
- `outbound_clicks`
|
|
148
|
+
- `social_spend`
|
|
149
|
+
- `conversions`
|
|
150
|
+
- `video_thruplay_watched_actions`
|
|
151
|
+
|
|
152
|
+
Use these as `--source-table` parameter in the `ingestr ingest` command.
|
|
153
|
+
|
|
154
|
+
### Facebook Insights Custom Configuration
|
|
155
|
+
|
|
156
|
+
The `facebook_insights` table supports advanced configuration for breakdowns and custom metrics:
|
|
157
|
+
|
|
158
|
+
#### Format Options
|
|
159
|
+
|
|
160
|
+
1. **Default usage**: `facebook_insights`
|
|
161
|
+
- Uses default breakdown and default fields
|
|
162
|
+
|
|
163
|
+
2. **Custom breakdown**: `facebook_insights:breakdown_type`
|
|
164
|
+
- Uses specified breakdown with default fields
|
|
165
|
+
|
|
166
|
+
3. **Custom breakdown + metrics**: `facebook_insights:breakdown_type:metric1,metric2,metric3`
|
|
167
|
+
- Uses specified breakdown with custom metrics
|
|
168
|
+
|
|
169
|
+
#### Available Breakdown Types
|
|
170
|
+
|
|
171
|
+
- `ads_insights` (default)
|
|
172
|
+
- `ads_insights_age_and_gender`
|
|
173
|
+
- `ads_insights_country`
|
|
174
|
+
- `ads_insights_platform_and_device`
|
|
175
|
+
- `ads_insights_region`
|
|
176
|
+
- `ads_insights_dma`
|
|
177
|
+
- `ads_insights_hourly_advertiser`
|
|
178
|
+
|
|
179
|
+
#### Examples
|
|
180
|
+
|
|
181
|
+
```sh
|
|
182
|
+
# Default facebook_insights
|
|
183
|
+
ingestr ingest \
|
|
184
|
+
--source-uri 'facebookads://?access_token=easdyh&account_id=1234' \
|
|
185
|
+
--source-table 'facebook_insights' \
|
|
186
|
+
--dest-uri 'duckdb:///facebook.duckdb' \
|
|
187
|
+
--dest-table 'dest.insights'
|
|
188
|
+
|
|
189
|
+
# Age and gender breakdown with default metrics
|
|
190
|
+
ingestr ingest \
|
|
191
|
+
--source-uri 'facebookads://?access_token=easdyh&account_id=1234' \
|
|
192
|
+
--source-table 'facebook_insights:ads_insights_age_and_gender' \
|
|
193
|
+
--dest-uri 'duckdb:///facebook.duckdb' \
|
|
194
|
+
--dest-table 'dest.insights_demographics'
|
|
195
|
+
|
|
196
|
+
# Country breakdown with custom metrics
|
|
197
|
+
ingestr ingest \
|
|
198
|
+
--source-uri 'facebookads://?access_token=easdyh&account_id=1234' \
|
|
199
|
+
--source-table 'facebook_insights:ads_insights_country:impressions,clicks,spend,reach,cpm,ctr' \
|
|
200
|
+
--dest-uri 'duckdb:///facebook.duckdb' \
|
|
201
|
+
--dest-table 'dest.insights_by_country'
|
|
202
|
+
```
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
version = "v0.13.55"
|
|
@@ -116,6 +116,8 @@ def facebook_insights_source(
|
|
|
116
116
|
batch_size: int = 50,
|
|
117
117
|
request_timeout: int = 300,
|
|
118
118
|
app_api_version: str = None,
|
|
119
|
+
start_date: pendulum.DateTime | None = None,
|
|
120
|
+
end_date: pendulum.DateTime | None = None,
|
|
119
121
|
) -> DltResource:
|
|
120
122
|
"""Incrementally loads insight reports with defined granularity level, fields, breakdowns etc.
|
|
121
123
|
|
|
@@ -148,27 +150,32 @@ def facebook_insights_source(
|
|
|
148
150
|
account_id, access_token, request_timeout, app_api_version
|
|
149
151
|
)
|
|
150
152
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
153
|
+
if start_date is None:
|
|
154
|
+
start_date = pendulum.today().subtract(days=initial_load_past_days)
|
|
155
|
+
|
|
156
|
+
columns = {}
|
|
157
|
+
for field in fields:
|
|
158
|
+
if field in INSIGHT_FIELDS_TYPES:
|
|
159
|
+
columns[field] = INSIGHT_FIELDS_TYPES[field]
|
|
154
160
|
|
|
155
161
|
@dlt.resource(
|
|
156
162
|
primary_key=INSIGHTS_PRIMARY_KEY,
|
|
157
163
|
write_disposition="merge",
|
|
158
|
-
columns=
|
|
164
|
+
columns=columns,
|
|
159
165
|
)
|
|
160
166
|
def facebook_insights(
|
|
161
167
|
date_start: dlt.sources.incremental[str] = dlt.sources.incremental(
|
|
162
168
|
"date_start",
|
|
163
|
-
initial_value=
|
|
169
|
+
initial_value=start_date.isoformat(),
|
|
170
|
+
end_value=end_date.isoformat() if end_date else None,
|
|
164
171
|
range_end="closed",
|
|
165
172
|
range_start="closed",
|
|
173
|
+
lag=attribution_window_days_lag * 24 * 60 * 60, # Convert days to seconds
|
|
166
174
|
),
|
|
167
175
|
) -> Iterator[TDataItems]:
|
|
168
|
-
start_date = get_start_date(date_start
|
|
176
|
+
start_date = get_start_date(date_start)
|
|
169
177
|
end_date = pendulum.now()
|
|
170
178
|
|
|
171
|
-
# fetch insights in incremental day steps
|
|
172
179
|
while start_date <= end_date:
|
|
173
180
|
query = {
|
|
174
181
|
"level": level,
|
|
@@ -193,7 +200,10 @@ def facebook_insights_source(
|
|
|
193
200
|
}
|
|
194
201
|
],
|
|
195
202
|
}
|
|
196
|
-
job = execute_job(
|
|
203
|
+
job = execute_job(
|
|
204
|
+
account.get_insights(params=query, is_async=True),
|
|
205
|
+
insights_max_async_sleep_seconds=10,
|
|
206
|
+
)
|
|
197
207
|
yield list(map(process_report_item, job.get_result()))
|
|
198
208
|
start_date = start_date.add(days=time_increment_days)
|
|
199
209
|
|
|
@@ -31,14 +31,13 @@ from .settings import (
|
|
|
31
31
|
|
|
32
32
|
def get_start_date(
|
|
33
33
|
incremental_start_date: dlt.sources.incremental[str],
|
|
34
|
-
attribution_window_days_lag: int = 7,
|
|
35
34
|
) -> pendulum.DateTime:
|
|
36
35
|
"""
|
|
37
36
|
Get the start date for incremental loading of Facebook Insights data.
|
|
38
37
|
"""
|
|
39
38
|
start_date: pendulum.DateTime = ensure_pendulum_datetime(
|
|
40
39
|
incremental_start_date.start_value
|
|
41
|
-
)
|
|
40
|
+
)
|
|
42
41
|
|
|
43
42
|
# facebook forgets insights so trim the lag and warn
|
|
44
43
|
min_start_date = pendulum.today().subtract(
|
|
@@ -65,7 +64,6 @@ def process_report_item(item: AbstractObject) -> DictStrAny:
|
|
|
65
64
|
for pki in INSIGHTS_PRIMARY_KEY:
|
|
66
65
|
if pki not in d:
|
|
67
66
|
d[pki] = "no_" + pki
|
|
68
|
-
|
|
69
67
|
return d
|
|
70
68
|
|
|
71
69
|
|
|
@@ -138,7 +136,7 @@ def execute_job(
|
|
|
138
136
|
) -> AbstractCrudObject:
|
|
139
137
|
status: str = None
|
|
140
138
|
time_start = time.time()
|
|
141
|
-
sleep_time =
|
|
139
|
+
sleep_time = 3
|
|
142
140
|
while status != "Job Completed":
|
|
143
141
|
duration = time.time() - time_start
|
|
144
142
|
job = job.api_get()
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
from typing import Dict
|
|
2
|
+
|
|
3
|
+
import dlt
|
|
4
|
+
from dlt.common.configuration.inject import with_config
|
|
5
|
+
from dlt.sources.helpers import requests
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
@with_config(sections=("sources", "facebook_ads"))
|
|
9
|
+
def debug_access_token(
|
|
10
|
+
access_token: str = dlt.secrets.value,
|
|
11
|
+
client_id: str = dlt.secrets.value,
|
|
12
|
+
client_secret: str = dlt.secrets.value,
|
|
13
|
+
) -> str:
|
|
14
|
+
"""Debugs the `access_token` providing info on expiration time, scopes etc. If arguments are not provides, `dlt` will inject them from configuration"""
|
|
15
|
+
debug_url = f"https://graph.facebook.com/debug_token?input_token={access_token}&access_token={client_id}|{client_secret}"
|
|
16
|
+
response = requests.get(debug_url)
|
|
17
|
+
data: Dict[str, str] = response.json()
|
|
18
|
+
|
|
19
|
+
if "error" in data:
|
|
20
|
+
raise Exception(f"Error debugging token: {data['error']}")
|
|
21
|
+
|
|
22
|
+
return data["data"]
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
@with_config(sections=("sources", "facebook_ads"))
|
|
26
|
+
def get_long_lived_token(
|
|
27
|
+
access_token: str = dlt.secrets.value,
|
|
28
|
+
client_id: str = dlt.secrets.value,
|
|
29
|
+
client_secret: str = dlt.secrets.value,
|
|
30
|
+
) -> str:
|
|
31
|
+
"""Gets the long lived access token (60 days) from `access_token`. If arguments are not provides, `dlt` will inject them from configuration"""
|
|
32
|
+
exchange_url = f"https://graph.facebook.com/v13.0/oauth/access_token?grant_type=fb_exchange_token&client_id={client_id}&client_secret={client_secret}&fb_exchange_token={access_token}"
|
|
33
|
+
response = requests.get(exchange_url)
|
|
34
|
+
data: Dict[str, str] = response.json()
|
|
35
|
+
|
|
36
|
+
if "error" in data:
|
|
37
|
+
raise Exception(f"Error refreshing token: {data['error']}")
|
|
38
|
+
|
|
39
|
+
return data["access_token"]
|
|
@@ -747,11 +747,64 @@ class FacebookAdsSource:
|
|
|
747
747
|
endpoint = None
|
|
748
748
|
if table in ["campaigns", "ad_sets", "ad_creatives", "ads", "leads"]:
|
|
749
749
|
endpoint = table
|
|
750
|
-
elif table
|
|
750
|
+
elif table == "facebook_insights":
|
|
751
751
|
return facebook_insights_source(
|
|
752
752
|
access_token=access_token[0],
|
|
753
753
|
account_id=account_id[0],
|
|
754
|
+
start_date=kwargs.get("interval_start"),
|
|
755
|
+
end_date=kwargs.get("interval_end"),
|
|
754
756
|
).with_resources("facebook_insights")
|
|
757
|
+
elif table.startswith("facebook_insights:"):
|
|
758
|
+
# Parse custom breakdowns and metrics from table name
|
|
759
|
+
# Supported formats:
|
|
760
|
+
# facebook_insights:breakdown_type
|
|
761
|
+
# facebook_insights:breakdown_type:metric1,metric2...
|
|
762
|
+
parts = table.split(":")
|
|
763
|
+
|
|
764
|
+
if len(parts) < 2 or len(parts) > 3:
|
|
765
|
+
raise ValueError(
|
|
766
|
+
"Invalid facebook_insights format. Expected: facebook_insights:breakdown_type or facebook_insights:breakdown_type:metric1,metric2..."
|
|
767
|
+
)
|
|
768
|
+
|
|
769
|
+
breakdown_type = parts[1].strip()
|
|
770
|
+
if not breakdown_type:
|
|
771
|
+
raise ValueError(
|
|
772
|
+
"Breakdown type must be provided in format: facebook_insights:breakdown_type"
|
|
773
|
+
)
|
|
774
|
+
|
|
775
|
+
# Validate breakdown type against available options from settings
|
|
776
|
+
import typing
|
|
777
|
+
|
|
778
|
+
from ingestr.src.facebook_ads.settings import TInsightsBreakdownOptions
|
|
779
|
+
|
|
780
|
+
# Get valid breakdown options from the type definition
|
|
781
|
+
valid_breakdowns = list(typing.get_args(TInsightsBreakdownOptions))
|
|
782
|
+
|
|
783
|
+
if breakdown_type not in valid_breakdowns:
|
|
784
|
+
raise ValueError(
|
|
785
|
+
f"Invalid breakdown type '{breakdown_type}'. Valid options: {', '.join(valid_breakdowns)}"
|
|
786
|
+
)
|
|
787
|
+
|
|
788
|
+
source_kwargs = {
|
|
789
|
+
"access_token": access_token[0],
|
|
790
|
+
"account_id": account_id[0],
|
|
791
|
+
"start_date": kwargs.get("interval_start"),
|
|
792
|
+
"end_date": kwargs.get("interval_end"),
|
|
793
|
+
"breakdowns": breakdown_type,
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
# If custom metrics are provided, parse them
|
|
797
|
+
if len(parts) == 3:
|
|
798
|
+
fields = [f.strip() for f in parts[2].split(",") if f.strip()]
|
|
799
|
+
if not fields:
|
|
800
|
+
raise ValueError(
|
|
801
|
+
"Custom metrics must be provided after the second colon in format: facebook_insights:breakdown_type:metric1,metric2..."
|
|
802
|
+
)
|
|
803
|
+
source_kwargs["fields"] = fields
|
|
804
|
+
|
|
805
|
+
return facebook_insights_source(**source_kwargs).with_resources(
|
|
806
|
+
"facebook_insights"
|
|
807
|
+
)
|
|
755
808
|
else:
|
|
756
809
|
raise ValueError(
|
|
757
810
|
f"Resource '{table}' is not supported for Facebook Ads source yet, if you are interested in it please create a GitHub issue at https://github.com/bruin-data/ingestr"
|
|
@@ -85,12 +85,14 @@ def incremental_stripe_source(
|
|
|
85
85
|
created: Optional[Any] = dlt.sources.incremental(
|
|
86
86
|
"created",
|
|
87
87
|
initial_value=start_date_unix,
|
|
88
|
+
end_value=transform_date(end_date) if end_date is not None else None,
|
|
88
89
|
range_end="closed",
|
|
89
90
|
range_start="closed",
|
|
90
91
|
),
|
|
91
92
|
) -> Generator[Dict[Any, Any], Any, None]:
|
|
92
|
-
|
|
93
|
-
|
|
93
|
+
yield from pagination(
|
|
94
|
+
endpoint, start_date=created.last_value, end_date=created.end_value
|
|
95
|
+
)
|
|
94
96
|
|
|
95
97
|
for endpoint in endpoints:
|
|
96
98
|
yield dlt.resource(
|
|
@@ -2250,9 +2250,9 @@
|
|
|
2250
2250
|
}
|
|
2251
2251
|
},
|
|
2252
2252
|
"node_modules/vite": {
|
|
2253
|
-
"version": "5.4.
|
|
2254
|
-
"resolved": "https://registry.npmjs.org/vite/-/vite-5.4.
|
|
2255
|
-
"integrity": "sha512-
|
|
2253
|
+
"version": "5.4.19",
|
|
2254
|
+
"resolved": "https://registry.npmjs.org/vite/-/vite-5.4.19.tgz",
|
|
2255
|
+
"integrity": "sha512-qO3aKv3HoQC8QKiNSTuUM1l9o/XX3+c+VTgLHbJWHZGeTPVAg2XwazI9UWzoxjIJCGCV2zU60uqMzjeLZuULqA==",
|
|
2256
2256
|
"dev": true,
|
|
2257
2257
|
"license": "MIT",
|
|
2258
2258
|
"dependencies": {
|
|
@@ -353,7 +353,7 @@ proto-plus==1.26.1
|
|
|
353
353
|
# google-api-core
|
|
354
354
|
# google-cloud-bigquery-storage
|
|
355
355
|
# google-cloud-spanner
|
|
356
|
-
protobuf==4.25.
|
|
356
|
+
protobuf==4.25.8
|
|
357
357
|
# via
|
|
358
358
|
# google-ads
|
|
359
359
|
# google-analytics-data
|
|
@@ -447,7 +447,7 @@ rauth==0.7.3
|
|
|
447
447
|
# via python-quickbooks
|
|
448
448
|
redshift-connector==2.1.5
|
|
449
449
|
# via -r requirements.in
|
|
450
|
-
requests==2.32.
|
|
450
|
+
requests==2.32.4
|
|
451
451
|
# via
|
|
452
452
|
# asana
|
|
453
453
|
# clickhouse-sqlalchemy
|
|
@@ -507,7 +507,7 @@ scramp==1.4.5
|
|
|
507
507
|
# via redshift-connector
|
|
508
508
|
semver==3.0.4
|
|
509
509
|
# via dlt
|
|
510
|
-
setuptools==78.1.
|
|
510
|
+
setuptools==78.1.1
|
|
511
511
|
# via
|
|
512
512
|
# dlt
|
|
513
513
|
# python-quickbooks
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
# Facebook Ads
|
|
2
|
-
|
|
3
|
-
Facebook Ads is the advertising platform that helps users to create targeted ads on Facebook, Instagram and Messenger.
|
|
4
|
-
|
|
5
|
-
ingestr supports Facebook Ads as a source.
|
|
6
|
-
|
|
7
|
-
## URI format
|
|
8
|
-
|
|
9
|
-
The URI format for Facebook Ads is as follows:
|
|
10
|
-
|
|
11
|
-
```plaintext
|
|
12
|
-
facebookads://?access_token=<access_token>&account_id=<account_id>
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
URI parameters:
|
|
16
|
-
|
|
17
|
-
- `access_token` is associated with Business Facebook App.
|
|
18
|
-
- `account_id` is associated with Ad manager.
|
|
19
|
-
|
|
20
|
-
Both are used for authentication with Facebook Ads API.
|
|
21
|
-
|
|
22
|
-
The URI is used to connect to Facebook Ads API for extracting data.
|
|
23
|
-
|
|
24
|
-
## Setting up a Facebook Ads Integration
|
|
25
|
-
|
|
26
|
-
Facebook Ads requires a few steps to set up an integration, please follow the guide dltHub [has built here](https://dlthub.com/docs/dlt-ecosystem/verified-sources/facebook_ads#setup-guide).
|
|
27
|
-
|
|
28
|
-
Once you complete the guide, you should have an access token and an Account ID. Let's say your `access_token` is `abcdef` and `account_id` is `1234`, here's a sample command that will copy the data from Facebook Ads into a DuckDB database:
|
|
29
|
-
|
|
30
|
-
```sh
|
|
31
|
-
ingestr ingest \
|
|
32
|
-
--source-uri 'facebookads://?access_token=easdyh&account_id=1234' \
|
|
33
|
-
--source-table 'campaigns' \
|
|
34
|
-
--dest-uri 'duckdb:///facebook.duckdb' \
|
|
35
|
-
--dest-table 'dest.campaigns'
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
The result of this command will be a table in the `facebook.duckdb` database.
|
|
39
|
-
|
|
40
|
-
## Tables
|
|
41
|
-
|
|
42
|
-
Facebook Ads source allows ingesting the following sources into separate tables:
|
|
43
|
-
|
|
44
|
-
- `campaigns`: Retrieves all DEFAULT_CAMPAIGN_FIELDS.
|
|
45
|
-
- `ad_sets`: Retrieves all DEFAULT_ADSET_FIELDS.
|
|
46
|
-
- `leads`: Retrieves all DEFAULT_LEAD_FIELDS.
|
|
47
|
-
- `ads_creatives`: Retrieves all DEFAULT_ADCREATIVE_FIELDS.
|
|
48
|
-
- `ads`: Retrieves all DEFAULT_ADS_FIELDS.
|
|
49
|
-
- `facebook_insights`: Retrieves all DEFAULT_INSIGHTS_FIELDS.
|
|
50
|
-
|
|
51
|
-
Use these as `--source-table` parameter in the `ingestr ingest` command.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
version = "v0.13.54"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|