mage-integrations 0.2.1__py3-none-any.whl
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.
- mage_integrations/__init__.py +0 -0
- mage_integrations/connections/__init__.py +0 -0
- mage_integrations/connections/airtable/__init__.py +31 -0
- mage_integrations/connections/base.py +19 -0
- mage_integrations/connections/bigquery/__init__.py +49 -0
- mage_integrations/connections/constants.py +3 -0
- mage_integrations/connections/couchbase/__init__.py +43 -0
- mage_integrations/connections/doris/__init__.py +89 -0
- mage_integrations/connections/dremio/__init__.py +104 -0
- mage_integrations/connections/google_analytics/__init__.py +104 -0
- mage_integrations/connections/google_analytics/constants.py +266 -0
- mage_integrations/connections/google_analytics/utils.py +14 -0
- mage_integrations/connections/google_cloud_storage/__init__.py +33 -0
- mage_integrations/connections/google_search_console/__init__.py +58 -0
- mage_integrations/connections/google_sheets/__init__.py +96 -0
- mage_integrations/connections/mssql/__init__.py +60 -0
- mage_integrations/connections/mysql/__init__.py +93 -0
- mage_integrations/connections/oracledb/__init__.py +33 -0
- mage_integrations/connections/postgresql/__init__.py +39 -0
- mage_integrations/connections/redshift/__init__.py +45 -0
- mage_integrations/connections/snowflake/__init__.py +47 -0
- mage_integrations/connections/sql/__init__.py +0 -0
- mage_integrations/connections/sql/base.py +124 -0
- mage_integrations/connections/teradata/__init__.py +33 -0
- mage_integrations/connections/trino/__init__.py +40 -0
- mage_integrations/connections/trino/connection_wrapper.py +28 -0
- mage_integrations/connections/utils/__init__.py +0 -0
- mage_integrations/connections/utils/google.py +14 -0
- mage_integrations/connections/utils/sql.py +2 -0
- mage_integrations/destinations/__init__.py +0 -0
- mage_integrations/destinations/airtable/Readme.md +27 -0
- mage_integrations/destinations/airtable/__init__.py +92 -0
- mage_integrations/destinations/airtable/templates/config.json +4 -0
- mage_integrations/destinations/amazon_s3/README.md +24 -0
- mage_integrations/destinations/amazon_s3/__init__.py +172 -0
- mage_integrations/destinations/amazon_s3/templates/config.json +10 -0
- mage_integrations/destinations/amplitude/README.md +58 -0
- mage_integrations/destinations/amplitude/__init__.py +91 -0
- mage_integrations/destinations/amplitude/templates/config.json +5 -0
- mage_integrations/destinations/base.py +810 -0
- mage_integrations/destinations/bigquery/README.md +54 -0
- mage_integrations/destinations/bigquery/__init__.py +834 -0
- mage_integrations/destinations/bigquery/constants.py +8 -0
- mage_integrations/destinations/bigquery/templates/config.json +8 -0
- mage_integrations/destinations/bigquery/utils.py +304 -0
- mage_integrations/destinations/clickhouse/LICENSE +201 -0
- mage_integrations/destinations/clickhouse/README.md +14 -0
- mage_integrations/destinations/clickhouse/__init__.py +32 -0
- mage_integrations/destinations/clickhouse/target_clickhouse/__init__.py +1 -0
- mage_integrations/destinations/clickhouse/target_clickhouse/sinks.py +234 -0
- mage_integrations/destinations/clickhouse/target_clickhouse/target.py +137 -0
- mage_integrations/destinations/clickhouse/templates/config.json +4 -0
- mage_integrations/destinations/constants.py +50 -0
- mage_integrations/destinations/delta_lake/README.md +0 -0
- mage_integrations/destinations/delta_lake/__init__.py +0 -0
- mage_integrations/destinations/delta_lake/base.py +227 -0
- mage_integrations/destinations/delta_lake/constants.py +2 -0
- mage_integrations/destinations/delta_lake_azure/README.md +18 -0
- mage_integrations/destinations/delta_lake_azure/__init__.py +45 -0
- mage_integrations/destinations/delta_lake_azure/templates/config.json +6 -0
- mage_integrations/destinations/delta_lake_s3/README.md +21 -0
- mage_integrations/destinations/delta_lake_s3/__init__.py +130 -0
- mage_integrations/destinations/delta_lake_s3/templates/config.json +9 -0
- mage_integrations/destinations/doris/README.md +32 -0
- mage_integrations/destinations/doris/__init__.py +209 -0
- mage_integrations/destinations/doris/constants.py +755 -0
- mage_integrations/destinations/doris/templates/config.json +9 -0
- mage_integrations/destinations/doris/utils.py +118 -0
- mage_integrations/destinations/elasticsearch/README.md +57 -0
- mage_integrations/destinations/elasticsearch/__init__.py +37 -0
- mage_integrations/destinations/elasticsearch/target_elasticsearch/__init__.py +0 -0
- mage_integrations/destinations/elasticsearch/target_elasticsearch/common.py +32 -0
- mage_integrations/destinations/elasticsearch/target_elasticsearch/sinks.py +262 -0
- mage_integrations/destinations/elasticsearch/target_elasticsearch/target.py +267 -0
- mage_integrations/destinations/elasticsearch/templates/config.json +8 -0
- mage_integrations/destinations/google_cloud_storage/README.md +19 -0
- mage_integrations/destinations/google_cloud_storage/__init__.py +109 -0
- mage_integrations/destinations/google_cloud_storage/templates/config.json +8 -0
- mage_integrations/destinations/kafka/README.md +18 -0
- mage_integrations/destinations/kafka/__init__.py +91 -0
- mage_integrations/destinations/kafka/templates/config.json +5 -0
- mage_integrations/destinations/mongodb/README.md +11 -0
- mage_integrations/destinations/mongodb/__init__.py +28 -0
- mage_integrations/destinations/mongodb/target_mongodb/__init__.py +0 -0
- mage_integrations/destinations/mongodb/target_mongodb/sinks.py +135 -0
- mage_integrations/destinations/mongodb/target_mongodb/target.py +169 -0
- mage_integrations/destinations/mongodb/templates/config.json +5 -0
- mage_integrations/destinations/mssql/README.md +31 -0
- mage_integrations/destinations/mssql/__init__.py +214 -0
- mage_integrations/destinations/mssql/templates/config.json +10 -0
- mage_integrations/destinations/mssql/utils.py +101 -0
- mage_integrations/destinations/mysql/README.md +36 -0
- mage_integrations/destinations/mysql/__init__.py +215 -0
- mage_integrations/destinations/mysql/constants.py +755 -0
- mage_integrations/destinations/mysql/templates/config.json +9 -0
- mage_integrations/destinations/mysql/utils.py +154 -0
- mage_integrations/destinations/opensearch/README.md +22 -0
- mage_integrations/destinations/opensearch/__init__.py +35 -0
- mage_integrations/destinations/opensearch/target_opensearch/__init__.py +0 -0
- mage_integrations/destinations/opensearch/target_opensearch/common.py +30 -0
- mage_integrations/destinations/opensearch/target_opensearch/sinks.py +221 -0
- mage_integrations/destinations/opensearch/target_opensearch/target.py +241 -0
- mage_integrations/destinations/opensearch/templates/config.json +5 -0
- mage_integrations/destinations/oracledb/README.md +22 -0
- mage_integrations/destinations/oracledb/__init__.py +241 -0
- mage_integrations/destinations/oracledb/templates/config.json +10 -0
- mage_integrations/destinations/oracledb/utils.py +114 -0
- mage_integrations/destinations/postgresql/README.md +30 -0
- mage_integrations/destinations/postgresql/__init__.py +264 -0
- mage_integrations/destinations/postgresql/templates/config.json +9 -0
- mage_integrations/destinations/postgresql/utils.py +77 -0
- mage_integrations/destinations/redshift/README.md +45 -0
- mage_integrations/destinations/redshift/__init__.py +306 -0
- mage_integrations/destinations/redshift/constants.py +155 -0
- mage_integrations/destinations/redshift/templates/config.json +11 -0
- mage_integrations/destinations/redshift/utils.py +28 -0
- mage_integrations/destinations/salesforce/README.md +38 -0
- mage_integrations/destinations/salesforce/__init__.py +37 -0
- mage_integrations/destinations/salesforce/target_salesforce/__init__.py +0 -0
- mage_integrations/destinations/salesforce/target_salesforce/session_credentials.py +96 -0
- mage_integrations/destinations/salesforce/target_salesforce/sinks.py +161 -0
- mage_integrations/destinations/salesforce/target_salesforce/target.py +182 -0
- mage_integrations/destinations/salesforce/target_salesforce/utils/__init__.py +0 -0
- mage_integrations/destinations/salesforce/target_salesforce/utils/exceptions.py +10 -0
- mage_integrations/destinations/salesforce/target_salesforce/utils/transformation.py +25 -0
- mage_integrations/destinations/salesforce/target_salesforce/utils/validation.py +54 -0
- mage_integrations/destinations/salesforce/templates/config.json +8 -0
- mage_integrations/destinations/sink.py +594 -0
- mage_integrations/destinations/snowflake/README.md +39 -0
- mage_integrations/destinations/snowflake/__init__.py +582 -0
- mage_integrations/destinations/snowflake/constants.py +1 -0
- mage_integrations/destinations/snowflake/templates/config.json +14 -0
- mage_integrations/destinations/snowflake/utils.py +92 -0
- mage_integrations/destinations/sql/__init__.py +0 -0
- mage_integrations/destinations/sql/base.py +435 -0
- mage_integrations/destinations/sql/constants.py +843 -0
- mage_integrations/destinations/sql/utils.py +363 -0
- mage_integrations/destinations/sqlsink.py +414 -0
- mage_integrations/destinations/target.py +561 -0
- mage_integrations/destinations/teradata/README.md +18 -0
- mage_integrations/destinations/teradata/__init__.py +357 -0
- mage_integrations/destinations/teradata/templates/config.json +7 -0
- mage_integrations/destinations/teradata/utils.py +103 -0
- mage_integrations/destinations/trino/README.md +84 -0
- mage_integrations/destinations/trino/__init__.py +27 -0
- mage_integrations/destinations/trino/connectors/__init__.py +0 -0
- mage_integrations/destinations/trino/connectors/base.py +325 -0
- mage_integrations/destinations/trino/connectors/deltalake.py +53 -0
- mage_integrations/destinations/trino/connectors/iceberg.py +19 -0
- mage_integrations/destinations/trino/templates/config.json +14 -0
- mage_integrations/destinations/trino/utils.py +33 -0
- mage_integrations/destinations/utils.py +50 -0
- mage_integrations/sources/README.md +3 -0
- mage_integrations/sources/__init__.py +0 -0
- mage_integrations/sources/airtable/README.md +27 -0
- mage_integrations/sources/airtable/__init__.py +180 -0
- mage_integrations/sources/airtable/templates/config.json +5 -0
- mage_integrations/sources/amazon_s3/README.md +25 -0
- mage_integrations/sources/amazon_s3/__init__.py +298 -0
- mage_integrations/sources/amazon_s3/templates/config.json +11 -0
- mage_integrations/sources/amplitude/README.md +67 -0
- mage_integrations/sources/amplitude/__init__.py +356 -0
- mage_integrations/sources/amplitude/constants.py +58 -0
- mage_integrations/sources/amplitude/schemas/active_users.json +28 -0
- mage_integrations/sources/amplitude/schemas/annotations.json +54 -0
- mage_integrations/sources/amplitude/schemas/average_session_length.json +28 -0
- mage_integrations/sources/amplitude/schemas/cohort_members.json +34 -0
- mage_integrations/sources/amplitude/schemas/cohorts.json +144 -0
- mage_integrations/sources/amplitude/schemas/event_properties.json +72 -0
- mage_integrations/sources/amplitude/schemas/event_types.json +77 -0
- mage_integrations/sources/amplitude/schemas/events.json +349 -0
- mage_integrations/sources/amplitude/schemas/new_users.json +28 -0
- mage_integrations/sources/amplitude/schemas/sessions_per_user.json +28 -0
- mage_integrations/sources/amplitude/schemas/user_properties.json +66 -0
- mage_integrations/sources/amplitude/templates/config.json +7 -0
- mage_integrations/sources/amplitude/templates/query.json +4 -0
- mage_integrations/sources/api/README.md +211 -0
- mage_integrations/sources/api/__init__.py +279 -0
- mage_integrations/sources/api/templates/config.json +9 -0
- mage_integrations/sources/azure_blob_storage/README.md +21 -0
- mage_integrations/sources/azure_blob_storage/__init__.py +160 -0
- mage_integrations/sources/azure_blob_storage/templates/config.json +5 -0
- mage_integrations/sources/base.py +781 -0
- mage_integrations/sources/bigquery/README.md +49 -0
- mage_integrations/sources/bigquery/__init__.py +56 -0
- mage_integrations/sources/bigquery/templates/config.json +4 -0
- mage_integrations/sources/catalog.py +125 -0
- mage_integrations/sources/chargebee/README.md +21 -0
- mage_integrations/sources/chargebee/__init__.py +83 -0
- mage_integrations/sources/chargebee/client.py +194 -0
- mage_integrations/sources/chargebee/schemas/common/cards.json +57 -0
- mage_integrations/sources/chargebee/schemas/common/comments.json +30 -0
- mage_integrations/sources/chargebee/schemas/common/credit_notes.json +404 -0
- mage_integrations/sources/chargebee/schemas/common/customers.json +428 -0
- mage_integrations/sources/chargebee/schemas/common/gifts.json +85 -0
- mage_integrations/sources/chargebee/schemas/common/invoices.json +680 -0
- mage_integrations/sources/chargebee/schemas/common/orders.json +431 -0
- mage_integrations/sources/chargebee/schemas/common/payment_sources.json +180 -0
- mage_integrations/sources/chargebee/schemas/common/promotional_credits.json +46 -0
- mage_integrations/sources/chargebee/schemas/common/quotes.json +380 -0
- mage_integrations/sources/chargebee/schemas/common/transactions.json +241 -0
- mage_integrations/sources/chargebee/schemas/common/virtual_bank_accounts.json +56 -0
- mage_integrations/sources/chargebee/schemas/item_model/coupons.json +251 -0
- mage_integrations/sources/chargebee/schemas/item_model/events.json +653 -0
- mage_integrations/sources/chargebee/schemas/item_model/item_families.json +63 -0
- mage_integrations/sources/chargebee/schemas/item_model/item_prices.json +342 -0
- mage_integrations/sources/chargebee/schemas/item_model/items.json +187 -0
- mage_integrations/sources/chargebee/schemas/item_model/subscriptions.json +873 -0
- mage_integrations/sources/chargebee/schemas/plan_model/addons.json +163 -0
- mage_integrations/sources/chargebee/schemas/plan_model/coupons.json +103 -0
- mage_integrations/sources/chargebee/schemas/plan_model/events.json +647 -0
- mage_integrations/sources/chargebee/schemas/plan_model/plans.json +250 -0
- mage_integrations/sources/chargebee/schemas/plan_model/subscriptions.json +465 -0
- mage_integrations/sources/chargebee/state.py +44 -0
- mage_integrations/sources/chargebee/streams/__init__.py +69 -0
- mage_integrations/sources/chargebee/streams/addons.py +19 -0
- mage_integrations/sources/chargebee/streams/base.py +244 -0
- mage_integrations/sources/chargebee/streams/comments.py +19 -0
- mage_integrations/sources/chargebee/streams/coupons.py +24 -0
- mage_integrations/sources/chargebee/streams/credit_notes.py +19 -0
- mage_integrations/sources/chargebee/streams/customers.py +19 -0
- mage_integrations/sources/chargebee/streams/events.py +24 -0
- mage_integrations/sources/chargebee/streams/gifts.py +19 -0
- mage_integrations/sources/chargebee/streams/invoices.py +19 -0
- mage_integrations/sources/chargebee/streams/item_families.py +19 -0
- mage_integrations/sources/chargebee/streams/item_prices.py +19 -0
- mage_integrations/sources/chargebee/streams/items.py +19 -0
- mage_integrations/sources/chargebee/streams/orders.py +19 -0
- mage_integrations/sources/chargebee/streams/payment_sources.py +19 -0
- mage_integrations/sources/chargebee/streams/plans.py +19 -0
- mage_integrations/sources/chargebee/streams/promotional_credits.py +19 -0
- mage_integrations/sources/chargebee/streams/quotes.py +19 -0
- mage_integrations/sources/chargebee/streams/subscriptions.py +24 -0
- mage_integrations/sources/chargebee/streams/transactions.py +19 -0
- mage_integrations/sources/chargebee/streams/util.py +6 -0
- mage_integrations/sources/chargebee/streams/virtual_bank_accounts.py +19 -0
- mage_integrations/sources/chargebee/templates/config.json +7 -0
- mage_integrations/sources/commercetools/README.md +28 -0
- mage_integrations/sources/commercetools/__init__.py +40 -0
- mage_integrations/sources/commercetools/client.py +54 -0
- mage_integrations/sources/commercetools/schemas/customers.json +108 -0
- mage_integrations/sources/commercetools/schemas/discount_codes.json +77 -0
- mage_integrations/sources/commercetools/schemas/inventory.json +50 -0
- mage_integrations/sources/commercetools/schemas/orders.json +542 -0
- mage_integrations/sources/commercetools/schemas/payments.json +113 -0
- mage_integrations/sources/commercetools/schemas/products.json +82 -0
- mage_integrations/sources/commercetools/schemas/shared/address.json +83 -0
- mage_integrations/sources/commercetools/schemas/shared/created_by.json +17 -0
- mage_integrations/sources/commercetools/schemas/shared/custom.json +17 -0
- mage_integrations/sources/commercetools/schemas/shared/dimension.json +11 -0
- mage_integrations/sources/commercetools/schemas/shared/discounted_price_per_quantity.json +30 -0
- mage_integrations/sources/commercetools/schemas/shared/field_type.json +8 -0
- mage_integrations/sources/commercetools/schemas/shared/key_reference.json +11 -0
- mage_integrations/sources/commercetools/schemas/shared/last_modified_by.json +17 -0
- mage_integrations/sources/commercetools/schemas/shared/localized_string.json +8 -0
- mage_integrations/sources/commercetools/schemas/shared/money.json +17 -0
- mage_integrations/sources/commercetools/schemas/shared/price.json +56 -0
- mage_integrations/sources/commercetools/schemas/shared/price_scoped.json +45 -0
- mage_integrations/sources/commercetools/schemas/shared/product_data.json +52 -0
- mage_integrations/sources/commercetools/schemas/shared/product_variant.json +132 -0
- mage_integrations/sources/commercetools/schemas/shared/reference.json +22 -0
- mage_integrations/sources/commercetools/schemas/shared/shipping_details.json +22 -0
- mage_integrations/sources/commercetools/schemas/shared/state.json +11 -0
- mage_integrations/sources/commercetools/schemas/shared/taxed_item_price.json +11 -0
- mage_integrations/sources/commercetools/schemas/shared/taxed_price.json +28 -0
- mage_integrations/sources/commercetools/schemas/shared/taxrate.json +37 -0
- mage_integrations/sources/commercetools/schemas.py +25 -0
- mage_integrations/sources/commercetools/streams/__init__.py +0 -0
- mage_integrations/sources/commercetools/streams/base.py +30 -0
- mage_integrations/sources/commercetools/streams/customers.py +7 -0
- mage_integrations/sources/commercetools/streams/discount_codes.py +7 -0
- mage_integrations/sources/commercetools/streams/inventory.py +7 -0
- mage_integrations/sources/commercetools/streams/orders.py +7 -0
- mage_integrations/sources/commercetools/streams/payments.py +7 -0
- mage_integrations/sources/commercetools/streams/products.py +7 -0
- mage_integrations/sources/commercetools/templates/config.json +7 -0
- mage_integrations/sources/constants.py +46 -0
- mage_integrations/sources/couchbase/README.md +25 -0
- mage_integrations/sources/couchbase/__init__.py +140 -0
- mage_integrations/sources/couchbase/templates/config.json +7 -0
- mage_integrations/sources/couchbase/utils.py +58 -0
- mage_integrations/sources/datadog/README.md +25 -0
- mage_integrations/sources/datadog/__init__.py +55 -0
- mage_integrations/sources/datadog/client.py +18 -0
- mage_integrations/sources/datadog/schemas/audit_logs.json +49 -0
- mage_integrations/sources/datadog/schemas/dashboards.json +55 -0
- mage_integrations/sources/datadog/schemas/downtimes.json +103 -0
- mage_integrations/sources/datadog/schemas/incident_teams.json +92 -0
- mage_integrations/sources/datadog/schemas/incidents.json +135 -0
- mage_integrations/sources/datadog/schemas/logs.json +61 -0
- mage_integrations/sources/datadog/schemas/synthetic_tests.json +105 -0
- mage_integrations/sources/datadog/schemas/users.json +76 -0
- mage_integrations/sources/datadog/streams/__init__.py +275 -0
- mage_integrations/sources/datadog/templates/config.json +9 -0
- mage_integrations/sources/doris/README.md +28 -0
- mage_integrations/sources/doris/__init__.py +68 -0
- mage_integrations/sources/doris/templates/config.json +13 -0
- mage_integrations/sources/dremio/README.md +44 -0
- mage_integrations/sources/dremio/__init__.py +174 -0
- mage_integrations/sources/dremio/templates/config.json +6 -0
- mage_integrations/sources/dremio/utils.py +28 -0
- mage_integrations/sources/dynamodb/README.md +14 -0
- mage_integrations/sources/dynamodb/__init__.py +225 -0
- mage_integrations/sources/dynamodb/templates/config.json +6 -0
- mage_integrations/sources/facebook_ads/README.md +49 -0
- mage_integrations/sources/facebook_ads/__init__.py +45 -0
- mage_integrations/sources/facebook_ads/tap_facebook/__init__.py +1040 -0
- mage_integrations/sources/facebook_ads/tap_facebook/process_output.py +114 -0
- mage_integrations/sources/facebook_ads/tap_facebook/schemas/adcreative.json +1440 -0
- mage_integrations/sources/facebook_ads/tap_facebook/schemas/ads.json +859 -0
- mage_integrations/sources/facebook_ads/tap_facebook/schemas/ads_insights.json +339 -0
- mage_integrations/sources/facebook_ads/tap_facebook/schemas/ads_insights_age_and_gender.json +352 -0
- mage_integrations/sources/facebook_ads/tap_facebook/schemas/ads_insights_country.json +345 -0
- mage_integrations/sources/facebook_ads/tap_facebook/schemas/ads_insights_dma.json +183 -0
- mage_integrations/sources/facebook_ads/tap_facebook/schemas/ads_insights_hourly_advertiser.json +311 -0
- mage_integrations/sources/facebook_ads/tap_facebook/schemas/ads_insights_platform_and_device.json +363 -0
- mage_integrations/sources/facebook_ads/tap_facebook/schemas/ads_insights_region.json +345 -0
- mage_integrations/sources/facebook_ads/tap_facebook/schemas/adsets.json +200 -0
- mage_integrations/sources/facebook_ads/tap_facebook/schemas/campaigns.json +98 -0
- mage_integrations/sources/facebook_ads/tap_facebook/schemas/leads.json +65 -0
- mage_integrations/sources/facebook_ads/tap_facebook/schemas/shared/ads_action_stats.json +74 -0
- mage_integrations/sources/facebook_ads/tap_facebook/schemas/shared/ads_histogram_stats.json +32 -0
- mage_integrations/sources/facebook_ads/tap_facebook/schemas/shared/ads_image_crops.json +134 -0
- mage_integrations/sources/facebook_ads/tap_facebook/schemas/shared/geo_locations.json +270 -0
- mage_integrations/sources/facebook_ads/tap_facebook/schemas/shared/targeting.json +401 -0
- mage_integrations/sources/facebook_ads/templates/config.json +5 -0
- mage_integrations/sources/facebook_ads/tests/base.py +396 -0
- mage_integrations/sources/facebook_ads/tests/facebook_ads/adcreative/output/00000000000000000000 +8 -0
- mage_integrations/sources/facebook_ads/tests/facebook_ads/ads/output/00000000000000000000 +10 -0
- mage_integrations/sources/facebook_ads/tests/facebook_ads/adsets/output/00000000000000000000 +11 -0
- mage_integrations/sources/facebook_ads/tests/facebook_ads/campaigns/output/00000000000000000000 +14 -0
- mage_integrations/sources/facebook_ads/tests/test_facebook_archived_data.py +115 -0
- mage_integrations/sources/facebook_ads/tests/test_facebook_attribution_window.py +104 -0
- mage_integrations/sources/facebook_ads/tests/test_facebook_automatic_fields.py +85 -0
- mage_integrations/sources/facebook_ads/tests/test_facebook_bookmarks.py +256 -0
- mage_integrations/sources/facebook_ads/tests/test_facebook_discovery.py +122 -0
- mage_integrations/sources/facebook_ads/tests/test_facebook_field_selection.py +118 -0
- mage_integrations/sources/facebook_ads/tests/test_facebook_invalid_attribution_window.py +65 -0
- mage_integrations/sources/facebook_ads/tests/test_facebook_start_date.py +145 -0
- mage_integrations/sources/facebook_ads/tests/unittests/test_attribute_error_retry.py +193 -0
- mage_integrations/sources/facebook_ads/tests/unittests/test_attribution_window.py +29 -0
- mage_integrations/sources/facebook_ads/tests/unittests/test_request_timeout.py +504 -0
- mage_integrations/sources/facebook_ads/tests/unittests/test_retry_logic.py +261 -0
- mage_integrations/sources/facebook_ads/tests/unittests/test_sync_batches_retry.py +154 -0
- mage_integrations/sources/facebook_ads/tests/unittests/test_tap_facebook.py +160 -0
- mage_integrations/sources/freshdesk/README.md +24 -0
- mage_integrations/sources/freshdesk/__init__.py +25 -0
- mage_integrations/sources/freshdesk/tap_freshdesk/__init__.py +325 -0
- mage_integrations/sources/freshdesk/tap_freshdesk/schemas/agents.json +85 -0
- mage_integrations/sources/freshdesk/tap_freshdesk/schemas/companies.json +45 -0
- mage_integrations/sources/freshdesk/tap_freshdesk/schemas/contacts.json +165 -0
- mage_integrations/sources/freshdesk/tap_freshdesk/schemas/conversations.json +178 -0
- mage_integrations/sources/freshdesk/tap_freshdesk/schemas/groups.json +40 -0
- mage_integrations/sources/freshdesk/tap_freshdesk/schemas/roles.json +25 -0
- mage_integrations/sources/freshdesk/tap_freshdesk/schemas/satisfaction_ratings.json +75 -0
- mage_integrations/sources/freshdesk/tap_freshdesk/schemas/tickets.json +332 -0
- mage_integrations/sources/freshdesk/tap_freshdesk/schemas/time_entries.json +72 -0
- mage_integrations/sources/freshdesk/tap_freshdesk/utils.py +93 -0
- mage_integrations/sources/freshdesk/templates/config.json +5 -0
- mage_integrations/sources/freshdesk/tests/base.py +262 -0
- mage_integrations/sources/freshdesk/tests/test_freshdesk_bookmarks.py +250 -0
- mage_integrations/sources/freshdesk/tests/test_freshdesk_check.py +29 -0
- mage_integrations/sources/freshdesk/tests/test_freshdesk_pagination.py +58 -0
- mage_integrations/sources/freshdesk/tests/test_freshdesk_start_date.py +181 -0
- mage_integrations/sources/front/README.md +25 -0
- mage_integrations/sources/front/__init__.py +40 -0
- mage_integrations/sources/front/client.py +76 -0
- mage_integrations/sources/front/context.py +62 -0
- mage_integrations/sources/front/schemas/accounts.json +37 -0
- mage_integrations/sources/front/schemas/analytics.json +71 -0
- mage_integrations/sources/front/schemas/channels.json +28 -0
- mage_integrations/sources/front/schemas/contact_groups.json +15 -0
- mage_integrations/sources/front/schemas/contacts.json +49 -0
- mage_integrations/sources/front/schemas/conversations.json +40 -0
- mage_integrations/sources/front/schemas/custom_fields.json +18 -0
- mage_integrations/sources/front/schemas/events.json +27 -0
- mage_integrations/sources/front/schemas/rules.json +21 -0
- mage_integrations/sources/front/schemas/tags.json +27 -0
- mage_integrations/sources/front/schemas/teammates.json +30 -0
- mage_integrations/sources/front/schemas/teams.json +12 -0
- mage_integrations/sources/front/schemas.py +43 -0
- mage_integrations/sources/front/streams/__init__.py +0 -0
- mage_integrations/sources/front/streams/accounts.py +7 -0
- mage_integrations/sources/front/streams/analytics.py +97 -0
- mage_integrations/sources/front/streams/base.py +29 -0
- mage_integrations/sources/front/streams/channels.py +7 -0
- mage_integrations/sources/front/streams/contact_groups.py +7 -0
- mage_integrations/sources/front/streams/contacts.py +7 -0
- mage_integrations/sources/front/streams/conversations.py +7 -0
- mage_integrations/sources/front/streams/custom_fields.py +7 -0
- mage_integrations/sources/front/streams/events.py +7 -0
- mage_integrations/sources/front/streams/rules.py +7 -0
- mage_integrations/sources/front/streams/tags.py +7 -0
- mage_integrations/sources/front/streams/teammates.py +7 -0
- mage_integrations/sources/front/streams/teams.py +7 -0
- mage_integrations/sources/front/templates/config.json +6 -0
- mage_integrations/sources/github/README.md +55 -0
- mage_integrations/sources/github/__init__.py +48 -0
- mage_integrations/sources/github/tap_github/__init__.py +47 -0
- mage_integrations/sources/github/tap_github/client.py +430 -0
- mage_integrations/sources/github/tap_github/discover.py +41 -0
- mage_integrations/sources/github/tap_github/schema.py +88 -0
- mage_integrations/sources/github/tap_github/schemas/assignees.json +72 -0
- mage_integrations/sources/github/tap_github/schemas/collaborators.json +75 -0
- mage_integrations/sources/github/tap_github/schemas/comments.json +120 -0
- mage_integrations/sources/github/tap_github/schemas/commit_comments.json +114 -0
- mage_integrations/sources/github/tap_github/schemas/commits.json +278 -0
- mage_integrations/sources/github/tap_github/schemas/events.json +1055 -0
- mage_integrations/sources/github/tap_github/schemas/issue_events.json +963 -0
- mage_integrations/sources/github/tap_github/schemas/issue_labels.json +29 -0
- mage_integrations/sources/github/tap_github/schemas/issue_milestones.json +125 -0
- mage_integrations/sources/github/tap_github/schemas/issues.json +276 -0
- mage_integrations/sources/github/tap_github/schemas/pr_commits.json +323 -0
- mage_integrations/sources/github/tap_github/schemas/project_cards.json +120 -0
- mage_integrations/sources/github/tap_github/schemas/project_columns.json +34 -0
- mage_integrations/sources/github/tap_github/schemas/projects.json +117 -0
- mage_integrations/sources/github/tap_github/schemas/pull_requests.json +1646 -0
- mage_integrations/sources/github/tap_github/schemas/releases.json +192 -0
- mage_integrations/sources/github/tap_github/schemas/review_comments.json +178 -0
- mage_integrations/sources/github/tap_github/schemas/reviews.json +70 -0
- mage_integrations/sources/github/tap_github/schemas/shared/issue_permissions.json +20 -0
- mage_integrations/sources/github/tap_github/schemas/shared/performed_via_github_app.json +61 -0
- mage_integrations/sources/github/tap_github/schemas/shared/pull_permissions.json +20 -0
- mage_integrations/sources/github/tap_github/schemas/shared/reactions.json +35 -0
- mage_integrations/sources/github/tap_github/schemas/shared/user.json +68 -0
- mage_integrations/sources/github/tap_github/schemas/stargazers.json +19 -0
- mage_integrations/sources/github/tap_github/schemas/team_members.json +74 -0
- mage_integrations/sources/github/tap_github/schemas/team_memberships.json +20 -0
- mage_integrations/sources/github/tap_github/schemas/teams.json +47 -0
- mage_integrations/sources/github/tap_github/streams.py +952 -0
- mage_integrations/sources/github/tap_github/sync.py +306 -0
- mage_integrations/sources/github/templates/config.json +7 -0
- mage_integrations/sources/github/tests/__init__.py +0 -0
- mage_integrations/sources/github/tests/base.py +445 -0
- mage_integrations/sources/google_ads/README.md +28 -0
- mage_integrations/sources/google_ads/__init__.py +41 -0
- mage_integrations/sources/google_ads/tap_google_ads/__init__.py +57 -0
- mage_integrations/sources/google_ads/tap_google_ads/client.py +17 -0
- mage_integrations/sources/google_ads/tap_google_ads/discover.py +268 -0
- mage_integrations/sources/google_ads/tap_google_ads/report_definitions.py +1877 -0
- mage_integrations/sources/google_ads/tap_google_ads/schemas/accounts.json +171 -0
- mage_integrations/sources/google_ads/tap_google_ads/schemas/ad_groups.json +268 -0
- mage_integrations/sources/google_ads/tap_google_ads/schemas/ads.json +1759 -0
- mage_integrations/sources/google_ads/tap_google_ads/schemas/campaigns.json +858 -0
- mage_integrations/sources/google_ads/tap_google_ads/streams.py +1170 -0
- mage_integrations/sources/google_ads/tap_google_ads/sync.py +144 -0
- mage_integrations/sources/google_ads/tap_google_ads/tests/base.py +434 -0
- mage_integrations/sources/google_ads/templates/config.json +13 -0
- mage_integrations/sources/google_analytics/README.md +31 -0
- mage_integrations/sources/google_analytics/__init__.py +128 -0
- mage_integrations/sources/google_analytics/templates/config.json +6 -0
- mage_integrations/sources/google_cloud_storage/README.md +40 -0
- mage_integrations/sources/google_cloud_storage/__init__.py +166 -0
- mage_integrations/sources/google_cloud_storage/templates/config.json +7 -0
- mage_integrations/sources/google_search_console/README.md +20 -0
- mage_integrations/sources/google_search_console/__init__.py +99 -0
- mage_integrations/sources/google_search_console/schemas/performance_report_country.json +31 -0
- mage_integrations/sources/google_search_console/schemas/performance_report_custom.json +40 -0
- mage_integrations/sources/google_search_console/schemas/performance_report_date.json +28 -0
- mage_integrations/sources/google_search_console/schemas/performance_report_device.json +31 -0
- mage_integrations/sources/google_search_console/schemas/performance_report_page.json +31 -0
- mage_integrations/sources/google_search_console/schemas/performance_report_query.json +31 -0
- mage_integrations/sources/google_search_console/streams.py +118 -0
- mage_integrations/sources/google_search_console/templates/config.json +6 -0
- mage_integrations/sources/google_sheets/README.md +24 -0
- mage_integrations/sources/google_sheets/__init__.py +460 -0
- mage_integrations/sources/google_sheets/templates/config.json +5 -0
- mage_integrations/sources/google_sheets/transform.py +297 -0
- mage_integrations/sources/http/__init__.py +0 -0
- mage_integrations/sources/http/client.py +179 -0
- mage_integrations/sources/hubspot/README.md +48 -0
- mage_integrations/sources/hubspot/__init__.py +41 -0
- mage_integrations/sources/hubspot/bin/run-a-test.sh +5 -0
- mage_integrations/sources/hubspot/bin/run-all-tests.sh +1 -0
- mage_integrations/sources/hubspot/tap_hubspot/__init__.py +1548 -0
- mage_integrations/sources/hubspot/tap_hubspot/constants.py +13 -0
- mage_integrations/sources/hubspot/tap_hubspot/schemas/campaigns.json +91 -0
- mage_integrations/sources/hubspot/tap_hubspot/schemas/companies.json +11 -0
- mage_integrations/sources/hubspot/tap_hubspot/schemas/contact_lists.json +97 -0
- mage_integrations/sources/hubspot/tap_hubspot/schemas/contacts.json +201 -0
- mage_integrations/sources/hubspot/tap_hubspot/schemas/contacts_by_company.json +12 -0
- mage_integrations/sources/hubspot/tap_hubspot/schemas/deal_pipelines.json +46 -0
- mage_integrations/sources/hubspot/tap_hubspot/schemas/deals.json +37 -0
- mage_integrations/sources/hubspot/tap_hubspot/schemas/email_events.json +118 -0
- mage_integrations/sources/hubspot/tap_hubspot/schemas/engagements.json +179 -0
- mage_integrations/sources/hubspot/tap_hubspot/schemas/forms.json +229 -0
- mage_integrations/sources/hubspot/tap_hubspot/schemas/owners.json +72 -0
- mage_integrations/sources/hubspot/tap_hubspot/schemas/subscription_changes.json +54 -0
- mage_integrations/sources/hubspot/tap_hubspot/schemas/versions.json +30 -0
- mage_integrations/sources/hubspot/tap_hubspot/schemas/workflows.json +48 -0
- mage_integrations/sources/hubspot/tap_hubspot/tests/__init__.py +0 -0
- mage_integrations/sources/hubspot/tap_hubspot/tests/test_bookmarks.py +62 -0
- mage_integrations/sources/hubspot/tap_hubspot/tests/test_deals.py +32 -0
- mage_integrations/sources/hubspot/tap_hubspot/tests/test_get_streams_to_sync.py +44 -0
- mage_integrations/sources/hubspot/tap_hubspot/tests/test_offsets.py +57 -0
- mage_integrations/sources/hubspot/tap_hubspot/tests/unittests/test_get_start.py +94 -0
- mage_integrations/sources/hubspot/tap_hubspot/tests/unittests/test_request_timeout.py +121 -0
- mage_integrations/sources/hubspot/tap_hubspot/tests/utils.py +80 -0
- mage_integrations/sources/hubspot/templates/config.json +6 -0
- mage_integrations/sources/hubspot/tests/base.py +383 -0
- mage_integrations/sources/hubspot/tests/client.py +1583 -0
- mage_integrations/sources/hubspot/tests/client_tester.py +280 -0
- mage_integrations/sources/hubspot/tests/test_hubspot_all_fields.py +323 -0
- mage_integrations/sources/hubspot/tests/test_hubspot_automatic_fields.py +109 -0
- mage_integrations/sources/hubspot/tests/test_hubspot_bookmarks.py +236 -0
- mage_integrations/sources/hubspot/tests/test_hubspot_bookmarks_static.py +127 -0
- mage_integrations/sources/hubspot/tests/test_hubspot_child_stream_only.py +88 -0
- mage_integrations/sources/hubspot/tests/test_hubspot_discovery.py +131 -0
- mage_integrations/sources/hubspot/tests/test_hubspot_interrupted_sync.py +137 -0
- mage_integrations/sources/hubspot/tests/test_hubspot_interrupted_sync_offset.py +135 -0
- mage_integrations/sources/hubspot/tests/test_hubspot_pagination.py +140 -0
- mage_integrations/sources/hubspot/tests/test_hubspot_start_date.py +179 -0
- mage_integrations/sources/hubspot/tests/unittests/test_deals.py +101 -0
- mage_integrations/sources/intercom/README.md +19 -0
- mage_integrations/sources/intercom/__init__.py +54 -0
- mage_integrations/sources/intercom/client.py +246 -0
- mage_integrations/sources/intercom/schema.py +57 -0
- mage_integrations/sources/intercom/schemas/admins.json +65 -0
- mage_integrations/sources/intercom/schemas/companies.json +106 -0
- mage_integrations/sources/intercom/schemas/company_attributes.json +63 -0
- mage_integrations/sources/intercom/schemas/company_segments.json +26 -0
- mage_integrations/sources/intercom/schemas/contact_attributes.json +104 -0
- mage_integrations/sources/intercom/schemas/contacts.json +534 -0
- mage_integrations/sources/intercom/schemas/conversation_parts.json +180 -0
- mage_integrations/sources/intercom/schemas/conversations.json +797 -0
- mage_integrations/sources/intercom/schemas/segments.json +26 -0
- mage_integrations/sources/intercom/schemas/tags.json +15 -0
- mage_integrations/sources/intercom/schemas/teams.json +28 -0
- mage_integrations/sources/intercom/streams.py +739 -0
- mage_integrations/sources/intercom/templates/config.json +4 -0
- mage_integrations/sources/intercom/transform.py +134 -0
- mage_integrations/sources/knowi/README.md +20 -0
- mage_integrations/sources/knowi/__init__.py +68 -0
- mage_integrations/sources/knowi/client.py +249 -0
- mage_integrations/sources/knowi/schema.py +60 -0
- mage_integrations/sources/knowi/schemas/dashboards.json +150 -0
- mage_integrations/sources/knowi/schemas/widgets.json +688 -0
- mage_integrations/sources/knowi/streams.py +190 -0
- mage_integrations/sources/knowi/templates/config.json +6 -0
- mage_integrations/sources/linkedin_ads/README.md +34 -0
- mage_integrations/sources/linkedin_ads/__init__.py +66 -0
- mage_integrations/sources/linkedin_ads/tap_linkedin_ads/__init__.py +65 -0
- mage_integrations/sources/linkedin_ads/tap_linkedin_ads/client.py +335 -0
- mage_integrations/sources/linkedin_ads/tap_linkedin_ads/discover.py +30 -0
- mage_integrations/sources/linkedin_ads/tap_linkedin_ads/schema.py +91 -0
- mage_integrations/sources/linkedin_ads/tap_linkedin_ads/schemas/account_users.json +91 -0
- mage_integrations/sources/linkedin_ads/tap_linkedin_ads/schemas/accounts.json +190 -0
- mage_integrations/sources/linkedin_ads/tap_linkedin_ads/schemas/ad_analytics_by_campaign.json +501 -0
- mage_integrations/sources/linkedin_ads/tap_linkedin_ads/schemas/ad_analytics_by_creative.json +501 -0
- mage_integrations/sources/linkedin_ads/tap_linkedin_ads/schemas/campaign_groups.json +133 -0
- mage_integrations/sources/linkedin_ads/tap_linkedin_ads/schemas/campaigns.json +469 -0
- mage_integrations/sources/linkedin_ads/tap_linkedin_ads/schemas/creatives.json +182 -0
- mage_integrations/sources/linkedin_ads/tap_linkedin_ads/schemas/video_ads.json +115 -0
- mage_integrations/sources/linkedin_ads/tap_linkedin_ads/sync.py +868 -0
- mage_integrations/sources/linkedin_ads/tap_linkedin_ads/transform.py +323 -0
- mage_integrations/sources/linkedin_ads/templates/config.json +9 -0
- mage_integrations/sources/linkedin_ads/tests/base.py +305 -0
- mage_integrations/sources/linkedin_ads/tests/test_all_fields.py +94 -0
- mage_integrations/sources/linkedin_ads/tests/test_discovery.py +95 -0
- mage_integrations/sources/linkedin_ads/tests/test_pagination.py +53 -0
- mage_integrations/sources/linkedin_ads/tests/test_start_date.py +130 -0
- mage_integrations/sources/linkedin_ads/tests/test_sync_canary.py +31 -0
- mage_integrations/sources/linkedin_ads/tests/test_sync_without_refrence_organization_id.py +31 -0
- mage_integrations/sources/linkedin_ads/tests/test_sync_without_refresh_token.py +131 -0
- mage_integrations/sources/linkedin_ads/tests/unittests/test_account_number.py +81 -0
- mage_integrations/sources/linkedin_ads/tests/unittests/test_adCampaignGroup_4XX.py +97 -0
- mage_integrations/sources/linkedin_ads/tests/unittests/test_client.py +94 -0
- mage_integrations/sources/linkedin_ads/tests/unittests/test_exception_handling.py +351 -0
- mage_integrations/sources/linkedin_ads/tests/unittests/test_fetch_access_token.py +36 -0
- mage_integrations/sources/linkedin_ads/tests/unittests/test_sync.py +197 -0
- mage_integrations/sources/linkedin_ads/tests/unittests/test_sync_endpoint.py +42 -0
- mage_integrations/sources/linkedin_ads/tests/unittests/test_timeout.py +279 -0
- mage_integrations/sources/messages.py +138 -0
- mage_integrations/sources/mode/README.md +21 -0
- mage_integrations/sources/mode/__init__.py +58 -0
- mage_integrations/sources/mode/client.py +251 -0
- mage_integrations/sources/mode/schema.py +57 -0
- mage_integrations/sources/mode/schemas/charts.json +116 -0
- mage_integrations/sources/mode/schemas/queries.json +41 -0
- mage_integrations/sources/mode/schemas/reports.json +128 -0
- mage_integrations/sources/mode/schemas/spaces.json +36 -0
- mage_integrations/sources/mode/streams.py +310 -0
- mage_integrations/sources/mode/templates/config.json +7 -0
- mage_integrations/sources/monday/README.md +24 -0
- mage_integrations/sources/monday/__init__.py +39 -0
- mage_integrations/sources/monday/client.py +35 -0
- mage_integrations/sources/monday/schemas/board_views.json +18 -0
- mage_integrations/sources/monday/schemas/boards.json +32 -0
- mage_integrations/sources/monday/schemas/columns.json +27 -0
- mage_integrations/sources/monday/schemas/groups.json +21 -0
- mage_integrations/sources/monday/schemas/workspaces.json +18 -0
- mage_integrations/sources/monday/streams.py +260 -0
- mage_integrations/sources/monday/templates/config.json +5 -0
- mage_integrations/sources/mongodb/README.md +33 -0
- mage_integrations/sources/mongodb/__init__.py +194 -0
- mage_integrations/sources/mongodb/schema.py +78 -0
- mage_integrations/sources/mongodb/spikes/atlas_setup.md +47 -0
- mage_integrations/sources/mongodb/spikes/dbreps_and_hackathon_review.md +46 -0
- mage_integrations/sources/mongodb/spikes/local_mongo_setup.md +92 -0
- mage_integrations/sources/mongodb/spikes/pymongo_spike.py +115 -0
- mage_integrations/sources/mongodb/spikes/supported_versions_spike.md +58 -0
- mage_integrations/sources/mongodb/tap_mongodb/__init__.py +465 -0
- mage_integrations/sources/mongodb/tap_mongodb/sync_strategies/common.py +354 -0
- mage_integrations/sources/mongodb/tap_mongodb/sync_strategies/full_table.py +162 -0
- mage_integrations/sources/mongodb/tap_mongodb/sync_strategies/incremental.py +125 -0
- mage_integrations/sources/mongodb/tap_mongodb/sync_strategies/oplog.py +271 -0
- mage_integrations/sources/mongodb/tap_mongodb/sync_strategies/utils.py +39 -0
- mage_integrations/sources/mongodb/templates/config.json +7 -0
- mage_integrations/sources/mongodb/tests/__init__.py +0 -0
- mage_integrations/sources/mongodb/tests/mongodb_common.py +37 -0
- mage_integrations/sources/mongodb/tests/test_mongodb_cname_restrictions.py +252 -0
- mage_integrations/sources/mongodb/tests/test_mongodb_configurable_properties.py +195 -0
- mage_integrations/sources/mongodb/tests/test_mongodb_datatype.py +246 -0
- mage_integrations/sources/mongodb/tests/test_mongodb_discovery.py +272 -0
- mage_integrations/sources/mongodb/tests/test_mongodb_fname_restrictions.py +302 -0
- mage_integrations/sources/mongodb/tests/test_mongodb_full_table.py +288 -0
- mage_integrations/sources/mongodb/tests/test_mongodb_full_table_id.py +227 -0
- mage_integrations/sources/mongodb/tests/test_mongodb_full_table_interruptible.py +232 -0
- mage_integrations/sources/mongodb/tests/test_mongodb_id_pk_variations.py +273 -0
- mage_integrations/sources/mongodb/tests/test_mongodb_incremental.py +480 -0
- mage_integrations/sources/mongodb/tests/test_mongodb_incremental_open_transactions.py +312 -0
- mage_integrations/sources/mongodb/tests/test_mongodb_index.py +162 -0
- mage_integrations/sources/mongodb/tests/test_mongodb_log_based_interruptible.py +328 -0
- mage_integrations/sources/mongodb/tests/test_mongodb_namespace_restrictions.py +258 -0
- mage_integrations/sources/mongodb/tests/test_mongodb_oplog.py +260 -0
- mage_integrations/sources/mongodb/tests/test_mongodb_oplog_aged_out.py +181 -0
- mage_integrations/sources/mongodb/tests/test_mongodb_oplog_bookmarks.py +245 -0
- mage_integrations/sources/mongodb/tests/test_mongodb_projection.py +271 -0
- mage_integrations/sources/mongodb/tests/test_mongodb_table_reset_inc.py +300 -0
- mage_integrations/sources/mongodb/tests/test_mongodb_table_reset_log.py +209 -0
- mage_integrations/sources/mongodb/tests/test_mongodb_views.py +159 -0
- mage_integrations/sources/mongodb/tests/unittests/test_common.py +436 -0
- mage_integrations/sources/mssql/README.md +28 -0
- mage_integrations/sources/mssql/__init__.py +88 -0
- mage_integrations/sources/mssql/templates/config.json +9 -0
- mage_integrations/sources/mysql/README.md +32 -0
- mage_integrations/sources/mysql/__init__.py +70 -0
- mage_integrations/sources/mysql/templates/config.json +13 -0
- mage_integrations/sources/oracledb/README.md +22 -0
- mage_integrations/sources/oracledb/__init__.py +152 -0
- mage_integrations/sources/oracledb/templates/config.json +8 -0
- mage_integrations/sources/outreach/README.md +68 -0
- mage_integrations/sources/outreach/__init__.py +47 -0
- mage_integrations/sources/outreach/tap_outreach/__init__.py +50 -0
- mage_integrations/sources/outreach/tap_outreach/client.py +131 -0
- mage_integrations/sources/outreach/tap_outreach/discover.py +87 -0
- mage_integrations/sources/outreach/tap_outreach/schemas/accounts.json +356 -0
- mage_integrations/sources/outreach/tap_outreach/schemas/call_dispositions.json +49 -0
- mage_integrations/sources/outreach/tap_outreach/schemas/call_purposes.json +43 -0
- mage_integrations/sources/outreach/tap_outreach/schemas/calls.json +179 -0
- mage_integrations/sources/outreach/tap_outreach/schemas/content_categories.json +55 -0
- mage_integrations/sources/outreach/tap_outreach/schemas/duties.json +23 -0
- mage_integrations/sources/outreach/tap_outreach/schemas/events.json +97 -0
- mage_integrations/sources/outreach/tap_outreach/schemas/mailboxes.json +306 -0
- mage_integrations/sources/outreach/tap_outreach/schemas/mailings.json +283 -0
- mage_integrations/sources/outreach/tap_outreach/schemas/opportunities.json +724 -0
- mage_integrations/sources/outreach/tap_outreach/schemas/personas.json +37 -0
- mage_integrations/sources/outreach/tap_outreach/schemas/prospects.json +906 -0
- mage_integrations/sources/outreach/tap_outreach/schemas/sequence_states.json +161 -0
- mage_integrations/sources/outreach/tap_outreach/schemas/sequence_steps.json +152 -0
- mage_integrations/sources/outreach/tap_outreach/schemas/sequence_templates.json +122 -0
- mage_integrations/sources/outreach/tap_outreach/schemas/sequences.json +275 -0
- mage_integrations/sources/outreach/tap_outreach/schemas/stages.json +55 -0
- mage_integrations/sources/outreach/tap_outreach/schemas/tasks.json +186 -0
- mage_integrations/sources/outreach/tap_outreach/schemas/teams.json +30 -0
- mage_integrations/sources/outreach/tap_outreach/schemas/users.json +361 -0
- mage_integrations/sources/outreach/tap_outreach/sync.py +378 -0
- mage_integrations/sources/outreach/templates/config.json +7 -0
- mage_integrations/sources/paystack/README.md +15 -0
- mage_integrations/sources/paystack/__init__.py +44 -0
- mage_integrations/sources/paystack/client.py +14 -0
- mage_integrations/sources/paystack/schemas/customers.json +45 -0
- mage_integrations/sources/paystack/schemas/transactions.json +170 -0
- mage_integrations/sources/paystack/streams/__init__.py +8 -0
- mage_integrations/sources/paystack/streams/base.py +122 -0
- mage_integrations/sources/paystack/streams/customers.py +18 -0
- mage_integrations/sources/paystack/streams/transactions.py +18 -0
- mage_integrations/sources/paystack/templates/config.json +5 -0
- mage_integrations/sources/pipedrive/README.md +14 -0
- mage_integrations/sources/pipedrive/__init__.py +38 -0
- mage_integrations/sources/pipedrive/tap_pipedrive/__init__.py +1 -0
- mage_integrations/sources/pipedrive/tap_pipedrive/cli.py +32 -0
- mage_integrations/sources/pipedrive/tap_pipedrive/config.py +5 -0
- mage_integrations/sources/pipedrive/tap_pipedrive/exceptions.py +46 -0
- mage_integrations/sources/pipedrive/tap_pipedrive/schemas/activity_types.json +37 -0
- mage_integrations/sources/pipedrive/tap_pipedrive/schemas/currency.json +26 -0
- mage_integrations/sources/pipedrive/tap_pipedrive/schemas/deal_products.json +125 -0
- mage_integrations/sources/pipedrive/tap_pipedrive/schemas/dealflow.json +45 -0
- mage_integrations/sources/pipedrive/tap_pipedrive/schemas/filters.json +37 -0
- mage_integrations/sources/pipedrive/tap_pipedrive/schemas/pipelines.json +31 -0
- mage_integrations/sources/pipedrive/tap_pipedrive/schemas/recents/dynamic_typing/activities.json +112 -0
- mage_integrations/sources/pipedrive/tap_pipedrive/schemas/recents/dynamic_typing/deals.json +197 -0
- mage_integrations/sources/pipedrive/tap_pipedrive/schemas/recents/dynamic_typing/notes.json +90 -0
- mage_integrations/sources/pipedrive/tap_pipedrive/schemas/recents/dynamic_typing/organizations.json +156 -0
- mage_integrations/sources/pipedrive/tap_pipedrive/schemas/recents/dynamic_typing/persons.json +174 -0
- mage_integrations/sources/pipedrive/tap_pipedrive/schemas/recents/dynamic_typing/products.json +81 -0
- mage_integrations/sources/pipedrive/tap_pipedrive/schemas/recents/files.json +97 -0
- mage_integrations/sources/pipedrive/tap_pipedrive/schemas/recents/users.json +75 -0
- mage_integrations/sources/pipedrive/tap_pipedrive/schemas/stages.json +40 -0
- mage_integrations/sources/pipedrive/tap_pipedrive/stream.py +195 -0
- mage_integrations/sources/pipedrive/tap_pipedrive/streams/__init__.py +22 -0
- mage_integrations/sources/pipedrive/tap_pipedrive/streams/activity_types.py +9 -0
- mage_integrations/sources/pipedrive/tap_pipedrive/streams/currencies.py +7 -0
- mage_integrations/sources/pipedrive/tap_pipedrive/streams/deal_products.py +17 -0
- mage_integrations/sources/pipedrive/tap_pipedrive/streams/dealflow.py +24 -0
- mage_integrations/sources/pipedrive/tap_pipedrive/streams/filters.py +9 -0
- mage_integrations/sources/pipedrive/tap_pipedrive/streams/notes.py +8 -0
- mage_integrations/sources/pipedrive/tap_pipedrive/streams/pipelines.py +9 -0
- mage_integrations/sources/pipedrive/tap_pipedrive/streams/recents/__init__.py +36 -0
- mage_integrations/sources/pipedrive/tap_pipedrive/streams/recents/dynamic_typing/__init__.py +86 -0
- mage_integrations/sources/pipedrive/tap_pipedrive/streams/recents/dynamic_typing/activities.py +16 -0
- mage_integrations/sources/pipedrive/tap_pipedrive/streams/recents/dynamic_typing/deals.py +22 -0
- mage_integrations/sources/pipedrive/tap_pipedrive/streams/recents/dynamic_typing/notes.py +14 -0
- mage_integrations/sources/pipedrive/tap_pipedrive/streams/recents/dynamic_typing/organizations.py +22 -0
- mage_integrations/sources/pipedrive/tap_pipedrive/streams/recents/dynamic_typing/persons.py +21 -0
- mage_integrations/sources/pipedrive/tap_pipedrive/streams/recents/dynamic_typing/products.py +13 -0
- mage_integrations/sources/pipedrive/tap_pipedrive/streams/recents/files.py +10 -0
- mage_integrations/sources/pipedrive/tap_pipedrive/streams/recents/users.py +21 -0
- mage_integrations/sources/pipedrive/tap_pipedrive/streams/stages.py +9 -0
- mage_integrations/sources/pipedrive/tap_pipedrive/tap.py +426 -0
- mage_integrations/sources/pipedrive/templates/config.json +4 -0
- mage_integrations/sources/postgresql/README.md +34 -0
- mage_integrations/sources/postgresql/__init__.py +499 -0
- mage_integrations/sources/postgresql/decoders.py +396 -0
- mage_integrations/sources/postgresql/templates/config.json +10 -0
- mage_integrations/sources/postmark/README.md +20 -0
- mage_integrations/sources/postmark/__init__.py +43 -0
- mage_integrations/sources/postmark/tap_postmark/__init__.py +4 -0
- mage_integrations/sources/postmark/tap_postmark/cleaners.py +331 -0
- mage_integrations/sources/postmark/tap_postmark/discover.py +55 -0
- mage_integrations/sources/postmark/tap_postmark/postmark.py +552 -0
- mage_integrations/sources/postmark/tap_postmark/schema.py +40 -0
- mage_integrations/sources/postmark/tap_postmark/schemas/messages_opens.json +134 -0
- mage_integrations/sources/postmark/tap_postmark/schemas/messages_outbound.json +93 -0
- mage_integrations/sources/postmark/tap_postmark/schemas/stats_outbound_bounces.json +81 -0
- mage_integrations/sources/postmark/tap_postmark/schemas/stats_outbound_clients.json +19 -0
- mage_integrations/sources/postmark/tap_postmark/schemas/stats_outbound_overview.json +88 -0
- mage_integrations/sources/postmark/tap_postmark/schemas/stats_outbound_platform.json +46 -0
- mage_integrations/sources/postmark/tap_postmark/streams.py +535 -0
- mage_integrations/sources/postmark/tap_postmark/sync.py +124 -0
- mage_integrations/sources/postmark/tap_postmark/tap.py +51 -0
- mage_integrations/sources/postmark/tap_postmark/tools.py +87 -0
- mage_integrations/sources/postmark/templates/config.json +4 -0
- mage_integrations/sources/powerbi/README.md +20 -0
- mage_integrations/sources/powerbi/__init__.py +68 -0
- mage_integrations/sources/powerbi/client.py +249 -0
- mage_integrations/sources/powerbi/schema.py +60 -0
- mage_integrations/sources/powerbi/schemas/apps.json +22 -0
- mage_integrations/sources/powerbi/schemas/dashboards.json +36 -0
- mage_integrations/sources/powerbi/schemas/datasets.json +31 -0
- mage_integrations/sources/powerbi/schemas/groups.json +34 -0
- mage_integrations/sources/powerbi/schemas/reports.json +25 -0
- mage_integrations/sources/powerbi/schemas/tiles.json +31 -0
- mage_integrations/sources/powerbi/streams.py +365 -0
- mage_integrations/sources/powerbi/templates/config.json +6 -0
- mage_integrations/sources/query.py +23 -0
- mage_integrations/sources/redshift/README.md +36 -0
- mage_integrations/sources/redshift/__init__.py +143 -0
- mage_integrations/sources/redshift/constants.py +57 -0
- mage_integrations/sources/redshift/templates/config.json +9 -0
- mage_integrations/sources/redshift/utils.py +26 -0
- mage_integrations/sources/salesforce/README.md +149 -0
- mage_integrations/sources/salesforce/__init__.py +77 -0
- mage_integrations/sources/salesforce/client/LICENSE +620 -0
- mage_integrations/sources/salesforce/client/__init__.py +0 -0
- mage_integrations/sources/salesforce/client/tap_salesforce/__init__.py +616 -0
- mage_integrations/sources/salesforce/client/tap_salesforce/salesforce/__init__.py +400 -0
- mage_integrations/sources/salesforce/client/tap_salesforce/salesforce/bulk.py +353 -0
- mage_integrations/sources/salesforce/client/tap_salesforce/salesforce/credentials.py +112 -0
- mage_integrations/sources/salesforce/client/tap_salesforce/salesforce/exceptions.py +8 -0
- mage_integrations/sources/salesforce/client/tap_salesforce/salesforce/rest.py +109 -0
- mage_integrations/sources/salesforce/client/tap_salesforce/sync.py +221 -0
- mage_integrations/sources/salesforce/templates/config.json +10 -0
- mage_integrations/sources/sftp/LICENSE +620 -0
- mage_integrations/sources/sftp/README.md +47 -0
- mage_integrations/sources/sftp/__init__.py +39 -0
- mage_integrations/sources/sftp/tap_sftp/__init__.py +0 -0
- mage_integrations/sources/sftp/tap_sftp/aws_ssm.py +24 -0
- mage_integrations/sources/sftp/tap_sftp/client.py +217 -0
- mage_integrations/sources/sftp/tap_sftp/decrypt.py +24 -0
- mage_integrations/sources/sftp/tap_sftp/discover.py +32 -0
- mage_integrations/sources/sftp/tap_sftp/singer_encodings/__init__.py +0 -0
- mage_integrations/sources/sftp/tap_sftp/singer_encodings/compression.py +20 -0
- mage_integrations/sources/sftp/tap_sftp/singer_encodings/csv_handler.py +58 -0
- mage_integrations/sources/sftp/tap_sftp/singer_encodings/json_schema.py +204 -0
- mage_integrations/sources/sftp/tap_sftp/stats.py +44 -0
- mage_integrations/sources/sftp/tap_sftp/sync.py +122 -0
- mage_integrations/sources/sftp/tap_sftp/tap.py +97 -0
- mage_integrations/sources/sftp/templates/config.json +22 -0
- mage_integrations/sources/snowflake/README.md +36 -0
- mage_integrations/sources/snowflake/__init__.py +63 -0
- mage_integrations/sources/snowflake/constants.py +0 -0
- mage_integrations/sources/snowflake/templates/config.json +11 -0
- mage_integrations/sources/sql/__init__.py +0 -0
- mage_integrations/sources/sql/base.py +464 -0
- mage_integrations/sources/sql/constants.py +10 -0
- mage_integrations/sources/sql/utils.py +77 -0
- mage_integrations/sources/stripe/README.md +43 -0
- mage_integrations/sources/stripe/__init__.py +1297 -0
- mage_integrations/sources/stripe/schemas/balance_transactions.json +145 -0
- mage_integrations/sources/stripe/schemas/charges.json +1 -0
- mage_integrations/sources/stripe/schemas/coupons.json +120 -0
- mage_integrations/sources/stripe/schemas/customers.json +501 -0
- mage_integrations/sources/stripe/schemas/disputes.json +210 -0
- mage_integrations/sources/stripe/schemas/events.json +68 -0
- mage_integrations/sources/stripe/schemas/invoice_items.json +251 -0
- mage_integrations/sources/stripe/schemas/invoice_line_items.json +504 -0
- mage_integrations/sources/stripe/schemas/invoices.json +966 -0
- mage_integrations/sources/stripe/schemas/payment_intents.json +1101 -0
- mage_integrations/sources/stripe/schemas/payout_transactions.json +20 -0
- mage_integrations/sources/stripe/schemas/payouts.json +280 -0
- mage_integrations/sources/stripe/schemas/plans.json +1 -0
- mage_integrations/sources/stripe/schemas/products.json +181 -0
- mage_integrations/sources/stripe/schemas/shared/charge.json +1896 -0
- mage_integrations/sources/stripe/schemas/shared/discount.json +177 -0
- mage_integrations/sources/stripe/schemas/shared/plan.json +190 -0
- mage_integrations/sources/stripe/schemas/shared/source.json +573 -0
- mage_integrations/sources/stripe/schemas/shared/tax_ids.json +84 -0
- mage_integrations/sources/stripe/schemas/subscription_items.json +456 -0
- mage_integrations/sources/stripe/schemas/subscriptions.json +494 -0
- mage_integrations/sources/stripe/schemas/transfers.json +170 -0
- mage_integrations/sources/stripe/templates/config.json +5 -0
- mage_integrations/sources/tableau/README.md +22 -0
- mage_integrations/sources/tableau/__init__.py +71 -0
- mage_integrations/sources/tableau/client.py +251 -0
- mage_integrations/sources/tableau/schema.py +60 -0
- mage_integrations/sources/tableau/schemas/views.json +50 -0
- mage_integrations/sources/tableau/schemas/workbooks.json +250 -0
- mage_integrations/sources/tableau/streams.py +193 -0
- mage_integrations/sources/tableau/templates/config.json +7 -0
- mage_integrations/sources/teradata/README.md +24 -0
- mage_integrations/sources/teradata/__init__.py +255 -0
- mage_integrations/sources/teradata/templates/config.json +7 -0
- mage_integrations/sources/titanic/README.md +0 -0
- mage_integrations/sources/titanic/__init__.py +34 -0
- mage_integrations/sources/titanic/schemas/passengers.json +81 -0
- mage_integrations/sources/titanic/templates/config.json +4 -0
- mage_integrations/sources/twitter_ads/README.md +29 -0
- mage_integrations/sources/twitter_ads/__init__.py +56 -0
- mage_integrations/sources/twitter_ads/tap_twitter_ads/__init__.py +132 -0
- mage_integrations/sources/twitter_ads/tap_twitter_ads/client.py +108 -0
- mage_integrations/sources/twitter_ads/tap_twitter_ads/discover.py +31 -0
- mage_integrations/sources/twitter_ads/tap_twitter_ads/schema.py +223 -0
- mage_integrations/sources/twitter_ads/tap_twitter_ads/schemas/account_media.json +74 -0
- mage_integrations/sources/twitter_ads/tap_twitter_ads/schemas/accounts.json +45 -0
- mage_integrations/sources/twitter_ads/tap_twitter_ads/schemas/advertiser_business_categories.json +25 -0
- mage_integrations/sources/twitter_ads/tap_twitter_ads/schemas/campaigns.json +69 -0
- mage_integrations/sources/twitter_ads/tap_twitter_ads/schemas/cards.json +37 -0
- mage_integrations/sources/twitter_ads/tap_twitter_ads/schemas/cards_image_conversation.json +56 -0
- mage_integrations/sources/twitter_ads/tap_twitter_ads/schemas/cards_poll.json +73 -0
- mage_integrations/sources/twitter_ads/tap_twitter_ads/schemas/cards_video_conversation.json +62 -0
- mage_integrations/sources/twitter_ads/tap_twitter_ads/schemas/content_categories.json +25 -0
- mage_integrations/sources/twitter_ads/tap_twitter_ads/schemas/funding_instruments.json +71 -0
- mage_integrations/sources/twitter_ads/tap_twitter_ads/schemas/iab_categories.json +15 -0
- mage_integrations/sources/twitter_ads/tap_twitter_ads/schemas/line_item_apps.json +32 -0
- mage_integrations/sources/twitter_ads/tap_twitter_ads/schemas/line_items.json +127 -0
- mage_integrations/sources/twitter_ads/tap_twitter_ads/schemas/media_creatives.json +38 -0
- mage_integrations/sources/twitter_ads/tap_twitter_ads/schemas/preroll_call_to_actions.json +32 -0
- mage_integrations/sources/twitter_ads/tap_twitter_ads/schemas/promotable_users.json +26 -0
- mage_integrations/sources/twitter_ads/tap_twitter_ads/schemas/promoted_accounts.json +35 -0
- mage_integrations/sources/twitter_ads/tap_twitter_ads/schemas/promoted_tweets.json +35 -0
- mage_integrations/sources/twitter_ads/tap_twitter_ads/schemas/scheduled_promoted_tweets.json +32 -0
- mage_integrations/sources/twitter_ads/tap_twitter_ads/schemas/shared/billing.json +12 -0
- mage_integrations/sources/twitter_ads/tap_twitter_ads/schemas/shared/dimensions.json +87 -0
- mage_integrations/sources/twitter_ads/tap_twitter_ads/schemas/shared/engagement_all.json +39 -0
- mage_integrations/sources/twitter_ads/tap_twitter_ads/schemas/shared/engagement_basic.json +24 -0
- mage_integrations/sources/twitter_ads/tap_twitter_ads/schemas/shared/media.json +12 -0
- mage_integrations/sources/twitter_ads/tap_twitter_ads/schemas/shared/mobile_conversion.json +60 -0
- mage_integrations/sources/twitter_ads/tap_twitter_ads/schemas/shared/mobile_conversion_obj.json +21 -0
- mage_integrations/sources/twitter_ads/tap_twitter_ads/schemas/shared/report_account.json +23 -0
- mage_integrations/sources/twitter_ads/tap_twitter_ads/schemas/shared/report_funding_instrument.json +26 -0
- mage_integrations/sources/twitter_ads/tap_twitter_ads/schemas/shared/report_mobile_conversion.json +23 -0
- mage_integrations/sources/twitter_ads/tap_twitter_ads/schemas/shared/report_organic_tweet.json +26 -0
- mage_integrations/sources/twitter_ads/tap_twitter_ads/schemas/shared/report_other.json +38 -0
- mage_integrations/sources/twitter_ads/tap_twitter_ads/schemas/shared/report_web_conversion.json +23 -0
- mage_integrations/sources/twitter_ads/tap_twitter_ads/schemas/shared/video.json +36 -0
- mage_integrations/sources/twitter_ads/tap_twitter_ads/schemas/shared/web_conversion.json +21 -0
- mage_integrations/sources/twitter_ads/tap_twitter_ads/schemas/shared/web_conversion_obj.json +36 -0
- mage_integrations/sources/twitter_ads/tap_twitter_ads/schemas/tailored_audiences.json +70 -0
- mage_integrations/sources/twitter_ads/tap_twitter_ads/schemas/targeting_app_store_categories.json +18 -0
- mage_integrations/sources/twitter_ads/tap_twitter_ads/schemas/targeting_conversations.json +18 -0
- mage_integrations/sources/twitter_ads/tap_twitter_ads/schemas/targeting_criteria.json +44 -0
- mage_integrations/sources/twitter_ads/tap_twitter_ads/schemas/targeting_devices.json +21 -0
- mage_integrations/sources/twitter_ads/tap_twitter_ads/schemas/targeting_events.json +123 -0
- mage_integrations/sources/twitter_ads/tap_twitter_ads/schemas/targeting_interests.json +15 -0
- mage_integrations/sources/twitter_ads/tap_twitter_ads/schemas/targeting_languages.json +15 -0
- mage_integrations/sources/twitter_ads/tap_twitter_ads/schemas/targeting_locations.json +21 -0
- mage_integrations/sources/twitter_ads/tap_twitter_ads/schemas/targeting_network_operators.json +18 -0
- mage_integrations/sources/twitter_ads/tap_twitter_ads/schemas/targeting_platform_versions.json +21 -0
- mage_integrations/sources/twitter_ads/tap_twitter_ads/schemas/targeting_platforms.json +15 -0
- mage_integrations/sources/twitter_ads/tap_twitter_ads/schemas/targeting_tv_markets.json +15 -0
- mage_integrations/sources/twitter_ads/tap_twitter_ads/schemas/targeting_tv_shows.json +37 -0
- mage_integrations/sources/twitter_ads/tap_twitter_ads/schemas/tracking_tags.json +30 -0
- mage_integrations/sources/twitter_ads/tap_twitter_ads/schemas/tweets.json +920 -0
- mage_integrations/sources/twitter_ads/tap_twitter_ads/streams.py +1875 -0
- mage_integrations/sources/twitter_ads/tap_twitter_ads/sync.py +176 -0
- mage_integrations/sources/twitter_ads/tap_twitter_ads/transform.py +165 -0
- mage_integrations/sources/twitter_ads/templates/config.json +27 -0
- mage_integrations/sources/utils.py +318 -0
- mage_integrations/sources/zendesk/README.md +64 -0
- mage_integrations/sources/zendesk/__init__.py +45 -0
- mage_integrations/sources/zendesk/spikes/ticket_events.py +138 -0
- mage_integrations/sources/zendesk/tap_zendesk/__init__.py +253 -0
- mage_integrations/sources/zendesk/tap_zendesk/discover.py +80 -0
- mage_integrations/sources/zendesk/tap_zendesk/http.py +253 -0
- mage_integrations/sources/zendesk/tap_zendesk/metrics.py +102 -0
- mage_integrations/sources/zendesk/tap_zendesk/schemas/group_memberships.json +52 -0
- mage_integrations/sources/zendesk/tap_zendesk/schemas/groups.json +46 -0
- mage_integrations/sources/zendesk/tap_zendesk/schemas/macros.json +116 -0
- mage_integrations/sources/zendesk/tap_zendesk/schemas/organizations.json +114 -0
- mage_integrations/sources/zendesk/tap_zendesk/schemas/satisfaction_ratings.json +49 -0
- mage_integrations/sources/zendesk/tap_zendesk/schemas/shared/attachments.json +148 -0
- mage_integrations/sources/zendesk/tap_zendesk/schemas/shared/metadata.json +145 -0
- mage_integrations/sources/zendesk/tap_zendesk/schemas/shared/via.json +122 -0
- mage_integrations/sources/zendesk/tap_zendesk/schemas/sla_policies.json +128 -0
- mage_integrations/sources/zendesk/tap_zendesk/schemas/tags.json +20 -0
- mage_integrations/sources/zendesk/tap_zendesk/schemas/ticket_audits.json +789 -0
- mage_integrations/sources/zendesk/tap_zendesk/schemas/ticket_comments.json +72 -0
- mage_integrations/sources/zendesk/tap_zendesk/schemas/ticket_fields.json +199 -0
- mage_integrations/sources/zendesk/tap_zendesk/schemas/ticket_forms.json +113 -0
- mage_integrations/sources/zendesk/tap_zendesk/schemas/ticket_metrics.json +277 -0
- mage_integrations/sources/zendesk/tap_zendesk/schemas/tickets.json +393 -0
- mage_integrations/sources/zendesk/tap_zendesk/schemas/users.json +382 -0
- mage_integrations/sources/zendesk/tap_zendesk/streams.py +657 -0
- mage_integrations/sources/zendesk/tap_zendesk/sync.py +61 -0
- mage_integrations/sources/zendesk/templates/config.json +6 -0
- mage_integrations/sources/zendesk/test/__init__.py +0 -0
- mage_integrations/sources/zendesk/test/base.py +400 -0
- mage_integrations/sources/zendesk/test/test_all_fields.py +83 -0
- mage_integrations/sources/zendesk/test/test_all_streams.py +150 -0
- mage_integrations/sources/zendesk/test/test_automatic_fields.py +71 -0
- mage_integrations/sources/zendesk/test/test_bookmarks.py +160 -0
- mage_integrations/sources/zendesk/test/test_custom_fields_discover.py +43 -0
- mage_integrations/sources/zendesk/test/test_discovery.py +129 -0
- mage_integrations/sources/zendesk/test/test_minimal_selection.py +67 -0
- mage_integrations/sources/zendesk/test/test_pagination.py +74 -0
- mage_integrations/sources/zendesk/test/test_standard_bookmark.py +197 -0
- mage_integrations/sources/zendesk/test/test_start_date.py +165 -0
- mage_integrations/sources/zendesk/test/unittests/test_discovery_mode.py +308 -0
- mage_integrations/sources/zendesk/test/unittests/test_exception.py +55 -0
- mage_integrations/sources/zendesk/test/unittests/test_http.py +481 -0
- mage_integrations/sources/zendesk/test/unittests/test_init.py +23 -0
- mage_integrations/sources/zendesk/test/unittests/test_request_timeout.py +628 -0
- mage_integrations/sources/zendesk/test/unittests/test_tickets_child_stream_skip_404_error.py +82 -0
- mage_integrations/sources/zendesk/test/unittests/test_yield_records.py +193 -0
- mage_integrations/tests/__init__.py +0 -0
- mage_integrations/tests/connections/__init__.py +0 -0
- mage_integrations/tests/destinations/__init__.py +0 -0
- mage_integrations/tests/destinations/amplitude/__init__.py +0 -0
- mage_integrations/tests/destinations/amplitude/test_amplitude.py +117 -0
- mage_integrations/tests/destinations/bigquery/__init__.py +0 -0
- mage_integrations/tests/destinations/bigquery/test_bigquery.py +54 -0
- mage_integrations/tests/destinations/doris/__init__.py +0 -0
- mage_integrations/tests/destinations/doris/test_doris.py +64 -0
- mage_integrations/tests/destinations/mongodb/__init__.py +0 -0
- mage_integrations/tests/destinations/mongodb/test_mongodb.py +67 -0
- mage_integrations/tests/destinations/mssql/__init__.py +0 -0
- mage_integrations/tests/destinations/mssql/test_mssql.py +64 -0
- mage_integrations/tests/destinations/mysql/__init__.py +0 -0
- mage_integrations/tests/destinations/mysql/test_mysql.py +116 -0
- mage_integrations/tests/destinations/oracledb/__init__.py +0 -0
- mage_integrations/tests/destinations/oracledb/test_oracledb.py +63 -0
- mage_integrations/tests/destinations/postgresql/__init__.py +0 -0
- mage_integrations/tests/destinations/postgresql/test_postgres.py +60 -0
- mage_integrations/tests/destinations/redshift/__init__.py +0 -0
- mage_integrations/tests/destinations/redshift/test_redshift.py +68 -0
- mage_integrations/tests/destinations/search/__init__.py +0 -0
- mage_integrations/tests/destinations/search/test_sinks.py +71 -0
- mage_integrations/tests/destinations/snowflake/__init__.py +0 -0
- mage_integrations/tests/destinations/snowflake/test_snowflake.py +113 -0
- mage_integrations/tests/destinations/sql/__init__.py +0 -0
- mage_integrations/tests/destinations/sql/mixins.py +48 -0
- mage_integrations/tests/destinations/sql/test_truncate.py +94 -0
- mage_integrations/tests/destinations/test_base.py +557 -0
- mage_integrations/tests/sources/__init__.py +0 -0
- mage_integrations/tests/sources/amplitude/__init__.py +0 -0
- mage_integrations/tests/sources/amplitude/test_amplitude.py +232 -0
- mage_integrations/tests/sources/api/__init__.py +0 -0
- mage_integrations/tests/sources/api/test_api.py +377 -0
- mage_integrations/tests/sources/bigquery/__init__.py +0 -0
- mage_integrations/tests/sources/bigquery/test_bigquery.py +232 -0
- mage_integrations/tests/sources/couchbase/__init__.py +0 -0
- mage_integrations/tests/sources/couchbase/test_couchbase.py +379 -0
- mage_integrations/tests/sources/doris/__init__.py +0 -0
- mage_integrations/tests/sources/doris/test_doris.py +118 -0
- mage_integrations/tests/sources/mongodb/__init__.py +0 -0
- mage_integrations/tests/sources/mongodb/test_common.py +73 -0
- mage_integrations/tests/sources/mongodb/test_schema.py +91 -0
- mage_integrations/tests/sources/mysql/__init__.py +0 -0
- mage_integrations/tests/sources/mysql/test_mysql.py +114 -0
- mage_integrations/tests/sources/postgresql/__init__.py +0 -0
- mage_integrations/tests/sources/postgresql/test_postgresql.py +46 -0
- mage_integrations/tests/sources/sql/__init__.py +0 -0
- mage_integrations/tests/sources/sql/test_base.py +215 -0
- mage_integrations/tests/sources/test_base.py +404 -0
- mage_integrations/tests/test_dependency_contracts.py +28 -0
- mage_integrations/tests/utils/__init__.py +0 -0
- mage_integrations/tests/utils/test_frames.py +122 -0
- mage_integrations/transformers/__init__.py +0 -0
- mage_integrations/transformers/base.py +183 -0
- mage_integrations/transformers/utils.py +39 -0
- mage_integrations/utils/__init__.py +0 -0
- mage_integrations/utils/array.py +40 -0
- mage_integrations/utils/dates.py +45 -0
- mage_integrations/utils/dictionary.py +108 -0
- mage_integrations/utils/files.py +5 -0
- mage_integrations/utils/frames.py +123 -0
- mage_integrations/utils/logger/__init__.py +103 -0
- mage_integrations/utils/logger/constants.py +11 -0
- mage_integrations/utils/parsers.py +56 -0
- mage_integrations/utils/schema_helpers.py +37 -0
- mage_integrations/utils/strings.py +6 -0
- mage_integrations-0.2.1.dist-info/METADATA +304 -0
- mage_integrations-0.2.1.dist-info/RECORD +1016 -0
- mage_integrations-0.2.1.dist-info/WHEEL +5 -0
- mage_integrations-0.2.1.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
from google.analytics.data_v1beta.types.data import MetricType
|
|
2
|
+
from mage_integrations.connections.google_analytics import \
|
|
3
|
+
GoogleAnalytics as GoogleAnalyticsConnection
|
|
4
|
+
from mage_integrations.connections.google_analytics.constants import DIMENSIONS, METRICS
|
|
5
|
+
from mage_integrations.sources.base import Source, main
|
|
6
|
+
from mage_integrations.sources.catalog import Catalog, CatalogEntry
|
|
7
|
+
from mage_integrations.sources.constants import (
|
|
8
|
+
COLUMN_TYPE_INTEGER,
|
|
9
|
+
COLUMN_TYPE_NULL,
|
|
10
|
+
COLUMN_TYPE_NUMBER,
|
|
11
|
+
COLUMN_TYPE_STRING,
|
|
12
|
+
REPLICATION_METHOD_FULL_TABLE,
|
|
13
|
+
UNIQUE_CONFLICT_METHOD_UPDATE,
|
|
14
|
+
)
|
|
15
|
+
from mage_integrations.sources.utils import get_standard_metadata
|
|
16
|
+
|
|
17
|
+
from mage_integrations.utils.schema_helpers import extract_selected_columns
|
|
18
|
+
from singer.schema import Schema
|
|
19
|
+
from typing import Dict, Generator, List
|
|
20
|
+
import singer
|
|
21
|
+
|
|
22
|
+
LOGGER = singer.get_logger()
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class GoogleAnalytics(Source):
|
|
26
|
+
ROW_LIMIT = 10000
|
|
27
|
+
|
|
28
|
+
def __init__(self, **kwargs):
|
|
29
|
+
super().__init__(**kwargs)
|
|
30
|
+
|
|
31
|
+
self.connection = GoogleAnalyticsConnection(
|
|
32
|
+
self.config['property_id'],
|
|
33
|
+
path_to_credentials_json_file=self.config['path_to_credentials_json_file'],
|
|
34
|
+
)
|
|
35
|
+
|
|
36
|
+
def discover(self, streams: List[str] = None) -> Catalog:
|
|
37
|
+
metadata = self.connection.get_metadata()
|
|
38
|
+
properties = dict()
|
|
39
|
+
stream_id = 'google_analytics_custom'
|
|
40
|
+
unique_constraints = []
|
|
41
|
+
valid_replication_keys = []
|
|
42
|
+
|
|
43
|
+
for dim in metadata['dimensions']:
|
|
44
|
+
column_format = None
|
|
45
|
+
column_properties = None
|
|
46
|
+
column_types = ['string']
|
|
47
|
+
properties[dim.api_name] = dict(
|
|
48
|
+
properties=column_properties,
|
|
49
|
+
format=column_format,
|
|
50
|
+
type=column_types,
|
|
51
|
+
)
|
|
52
|
+
for metric in metadata['metrics']:
|
|
53
|
+
column_format = None
|
|
54
|
+
column_properties = None
|
|
55
|
+
column_types = [COLUMN_TYPE_NULL]
|
|
56
|
+
if metric.type_ == MetricType.TYPE_INTEGER:
|
|
57
|
+
column_types.append(COLUMN_TYPE_INTEGER)
|
|
58
|
+
elif metric.type_ == MetricType.TYPE_FLOAT:
|
|
59
|
+
column_types.append(COLUMN_TYPE_NUMBER)
|
|
60
|
+
else:
|
|
61
|
+
column_types.append(COLUMN_TYPE_STRING)
|
|
62
|
+
|
|
63
|
+
properties[metric.api_name] = dict(
|
|
64
|
+
properties=column_properties,
|
|
65
|
+
format=column_format,
|
|
66
|
+
type=column_types,
|
|
67
|
+
)
|
|
68
|
+
|
|
69
|
+
schema = Schema.from_dict(dict(
|
|
70
|
+
properties=properties,
|
|
71
|
+
type='object',
|
|
72
|
+
))
|
|
73
|
+
metadata = get_standard_metadata(
|
|
74
|
+
key_properties=unique_constraints,
|
|
75
|
+
replication_method=REPLICATION_METHOD_FULL_TABLE,
|
|
76
|
+
schema=schema.to_dict(),
|
|
77
|
+
stream_id=stream_id,
|
|
78
|
+
valid_replication_keys=unique_constraints + valid_replication_keys,
|
|
79
|
+
)
|
|
80
|
+
catalog_entry = CatalogEntry(
|
|
81
|
+
key_properties=unique_constraints,
|
|
82
|
+
metadata=metadata,
|
|
83
|
+
replication_method=REPLICATION_METHOD_FULL_TABLE,
|
|
84
|
+
schema=schema,
|
|
85
|
+
stream=stream_id,
|
|
86
|
+
tap_stream_id=stream_id,
|
|
87
|
+
unique_conflict_method=UNIQUE_CONFLICT_METHOD_UPDATE,
|
|
88
|
+
unique_constraints=unique_constraints,
|
|
89
|
+
)
|
|
90
|
+
|
|
91
|
+
streams = [catalog_entry]
|
|
92
|
+
|
|
93
|
+
return Catalog(streams)
|
|
94
|
+
|
|
95
|
+
def load_data(
|
|
96
|
+
self,
|
|
97
|
+
stream,
|
|
98
|
+
bookmarks: Dict = None,
|
|
99
|
+
query: Dict = {},
|
|
100
|
+
**kwargs,
|
|
101
|
+
) -> Generator[List[Dict], None, None]:
|
|
102
|
+
columns = extract_selected_columns(stream.metadata)
|
|
103
|
+
dimensions = [c for c in columns if c in DIMENSIONS]
|
|
104
|
+
metrics = [c for c in columns if c in METRICS]
|
|
105
|
+
offset = 0
|
|
106
|
+
while True:
|
|
107
|
+
rows = self.connection.load(
|
|
108
|
+
self.config.get('start_date'),
|
|
109
|
+
end_date=self.config.get('end_date'),
|
|
110
|
+
dimensions=dimensions,
|
|
111
|
+
limit=self.ROW_LIMIT,
|
|
112
|
+
metrics=metrics,
|
|
113
|
+
offset=offset,
|
|
114
|
+
)
|
|
115
|
+
if not rows:
|
|
116
|
+
return
|
|
117
|
+
offset += len(rows)
|
|
118
|
+
yield rows
|
|
119
|
+
|
|
120
|
+
def get_forced_replication_method(self, stream_id):
|
|
121
|
+
return REPLICATION_METHOD_FULL_TABLE
|
|
122
|
+
|
|
123
|
+
def test_connection(self):
|
|
124
|
+
self.connection.connect()
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
if __name__ == '__main__':
|
|
128
|
+
main(GoogleAnalytics)
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Google Cloud Storage
|
|
2
|
+
|
|
3
|
+
<br />
|
|
4
|
+
|
|
5
|
+
## Config
|
|
6
|
+
|
|
7
|
+
You must enter the following credentials when configuring this source:
|
|
8
|
+
|
|
9
|
+
| Key | Description | Sample value |
|
|
10
|
+
|---------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------|
|
|
11
|
+
| `path_to_credentials_json_file` | Google service account credential json file. If Mage is running on GCP, you can leave this value null and then Mage will use the instance service account to authenticate. | `/path/to/service_account_credentials.json` |
|
|
12
|
+
| `bucket` | Name of the google cloud storage bucket to save data in. | my_bucket |
|
|
13
|
+
| `file_type` | The type of google cloud storage files. Supported file type values: `parquet`, `csv` | `parquet` |
|
|
14
|
+
| `credentials_info` | An alternative to specify the Google service account credentials. | Structure is shown below |
|
|
15
|
+
| `prefix` | A string prefix used to filter the blobs (objects) in your Google Cloud Storage bucket. Only blobs whose names start with this prefix will be considered. | sales_data_ |
|
|
16
|
+
|
|
17
|
+
`credentials_info` structure:
|
|
18
|
+
```yaml
|
|
19
|
+
type: str
|
|
20
|
+
project_id: str
|
|
21
|
+
private_key_id: str
|
|
22
|
+
private_key: str
|
|
23
|
+
client_email: str
|
|
24
|
+
client_id: str
|
|
25
|
+
auth_uri: str
|
|
26
|
+
token_uri: str
|
|
27
|
+
auth_provider_x509_cert_url: str
|
|
28
|
+
client_x509_cert_url: str
|
|
29
|
+
universe_domain: str
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
<br />
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
### Get Started
|
|
36
|
+
1. [Enable the Google Cloud Storage API](https://console.cloud.google.com/flows/enableapi?apiid=storage-api.googleapis.com)
|
|
37
|
+
2. Create the service account. [Check out this guide](https://cloud.google.com/iam/docs/service-accounts-create)
|
|
38
|
+
3. Download your credentials file, and add it to your mage project.
|
|
39
|
+
|
|
40
|
+
Your account should have "Storage Admin" role for easy interactions with your bucket.
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
from collections import Counter
|
|
2
|
+
from typing import Dict, Generator, List
|
|
3
|
+
|
|
4
|
+
import pandas as pd
|
|
5
|
+
from charset_normalizer import from_bytes
|
|
6
|
+
from singer.schema import Schema
|
|
7
|
+
|
|
8
|
+
from mage_integrations.connections.google_cloud_storage import (
|
|
9
|
+
GoogleCloudStorage as GSCConnection,
|
|
10
|
+
)
|
|
11
|
+
from mage_integrations.sources.base import Source, main
|
|
12
|
+
from mage_integrations.sources.catalog import Catalog, CatalogEntry
|
|
13
|
+
from mage_integrations.sources.constants import (
|
|
14
|
+
COLUMN_TYPE_ARRAY,
|
|
15
|
+
COLUMN_TYPE_OBJECT,
|
|
16
|
+
COLUMN_TYPE_STRING,
|
|
17
|
+
REPLICATION_METHOD_FULL_TABLE,
|
|
18
|
+
UNIQUE_CONFLICT_METHOD_UPDATE,
|
|
19
|
+
)
|
|
20
|
+
from mage_integrations.sources.utils import get_standard_metadata
|
|
21
|
+
from mage_integrations.transformers.utils import convert_data_type, infer_dtypes
|
|
22
|
+
from mage_integrations.utils.frames import (
|
|
23
|
+
nested_column_type,
|
|
24
|
+
read_file_frame,
|
|
25
|
+
records_from_frame,
|
|
26
|
+
)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class GoogleCloudStorage(Source):
|
|
30
|
+
@property
|
|
31
|
+
def bucket(self):
|
|
32
|
+
return self.config['bucket']
|
|
33
|
+
|
|
34
|
+
@property
|
|
35
|
+
def file_type(self) -> str:
|
|
36
|
+
return self.config.get('file_type')
|
|
37
|
+
|
|
38
|
+
@property
|
|
39
|
+
def prefix(self) -> str:
|
|
40
|
+
return self.config.get('prefix')
|
|
41
|
+
|
|
42
|
+
def build_client(self):
|
|
43
|
+
connection = GSCConnection(
|
|
44
|
+
credentials_info=self.config.get('credentials_info'),
|
|
45
|
+
path_to_credentials_json_file=self.config.get('path_to_credentials_json_file'),
|
|
46
|
+
)
|
|
47
|
+
client = connection.build_connection()
|
|
48
|
+
return client
|
|
49
|
+
|
|
50
|
+
def discover(self, streams: List[str] = None) -> Catalog:
|
|
51
|
+
client = self.build_client()
|
|
52
|
+
|
|
53
|
+
streams = []
|
|
54
|
+
for blob in client.list_blobs(self.bucket, prefix=self.prefix):
|
|
55
|
+
if blob.size == 0:
|
|
56
|
+
continue
|
|
57
|
+
|
|
58
|
+
key = blob.name
|
|
59
|
+
|
|
60
|
+
# Ensure the file type matches the required file type
|
|
61
|
+
if not key.endswith(f'.{self.file_type}'):
|
|
62
|
+
continue
|
|
63
|
+
|
|
64
|
+
parts = key.split('.')
|
|
65
|
+
stream_id = '_'.join(parts[:-1])
|
|
66
|
+
|
|
67
|
+
df = self.__build_df(key)
|
|
68
|
+
|
|
69
|
+
properties = {}
|
|
70
|
+
for col in df.columns:
|
|
71
|
+
nested_type = nested_column_type(df[col].dtype)
|
|
72
|
+
if nested_type:
|
|
73
|
+
properties[col] = dict(type=['null', nested_type])
|
|
74
|
+
continue
|
|
75
|
+
df_filtered = df[df[col].notnull()][[col]]
|
|
76
|
+
|
|
77
|
+
for k, v in infer_dtypes(df_filtered).items():
|
|
78
|
+
if 'mixed' == v:
|
|
79
|
+
counter = Counter(map(type, df_filtered[col].values))
|
|
80
|
+
dtype, count = sorted(
|
|
81
|
+
[(k, v) for k, v in dict(counter).items()],
|
|
82
|
+
key=lambda t: t[1],
|
|
83
|
+
reverse=True,
|
|
84
|
+
)[0]
|
|
85
|
+
|
|
86
|
+
if dtype is list:
|
|
87
|
+
col_type = COLUMN_TYPE_ARRAY
|
|
88
|
+
elif dtype is dict:
|
|
89
|
+
col_type = COLUMN_TYPE_OBJECT
|
|
90
|
+
else:
|
|
91
|
+
col_type = COLUMN_TYPE_STRING
|
|
92
|
+
else:
|
|
93
|
+
col_type = convert_data_type(v)
|
|
94
|
+
properties[k] = dict(
|
|
95
|
+
type=[
|
|
96
|
+
'null',
|
|
97
|
+
col_type,
|
|
98
|
+
],
|
|
99
|
+
)
|
|
100
|
+
|
|
101
|
+
schema = Schema.from_dict(dict(
|
|
102
|
+
properties=properties,
|
|
103
|
+
type='object',
|
|
104
|
+
))
|
|
105
|
+
|
|
106
|
+
metadata = get_standard_metadata(
|
|
107
|
+
key_properties=[],
|
|
108
|
+
replication_method=REPLICATION_METHOD_FULL_TABLE,
|
|
109
|
+
schema=schema.to_dict(),
|
|
110
|
+
stream_id=stream_id,
|
|
111
|
+
)
|
|
112
|
+
catalog_entry = CatalogEntry(
|
|
113
|
+
key_properties=[],
|
|
114
|
+
metadata=metadata,
|
|
115
|
+
replication_method=REPLICATION_METHOD_FULL_TABLE,
|
|
116
|
+
schema=schema,
|
|
117
|
+
stream=stream_id,
|
|
118
|
+
tap_stream_id=stream_id,
|
|
119
|
+
unique_conflict_method=UNIQUE_CONFLICT_METHOD_UPDATE,
|
|
120
|
+
)
|
|
121
|
+
|
|
122
|
+
streams.append(catalog_entry)
|
|
123
|
+
|
|
124
|
+
return Catalog(streams)
|
|
125
|
+
|
|
126
|
+
def load_data(
|
|
127
|
+
self,
|
|
128
|
+
*args,
|
|
129
|
+
**kwargs,
|
|
130
|
+
) -> Generator[List[Dict], None, None]:
|
|
131
|
+
client = self.build_client()
|
|
132
|
+
|
|
133
|
+
for blob in client.list_blobs(self.bucket, prefix=self.prefix):
|
|
134
|
+
if blob.size == 0:
|
|
135
|
+
continue
|
|
136
|
+
|
|
137
|
+
key = blob.name
|
|
138
|
+
stream_id = '_'.join(key.split('.')[:-1])
|
|
139
|
+
|
|
140
|
+
# load selected streams only
|
|
141
|
+
if stream_id in self.selected_streams:
|
|
142
|
+
df = self.__build_df(blob.name)
|
|
143
|
+
yield records_from_frame(df)
|
|
144
|
+
|
|
145
|
+
def test_connection(self) -> None:
|
|
146
|
+
client = self.build_client()
|
|
147
|
+
if not client.get_bucket(self.bucket).exists():
|
|
148
|
+
raise Exception(f'Bucket {self.bucket} does not exist.')
|
|
149
|
+
client.list_blobs(self.bucket)
|
|
150
|
+
|
|
151
|
+
def __build_df(self, key: str) -> 'pd.DataFrame':
|
|
152
|
+
client = self.build_client()
|
|
153
|
+
df = pd.DataFrame()
|
|
154
|
+
bucket = client.get_bucket(self.bucket)
|
|
155
|
+
blob = bucket.get_blob(key)
|
|
156
|
+
data = blob.download_as_bytes()
|
|
157
|
+
if '.parquet' in key:
|
|
158
|
+
df = read_file_frame(data, 'parquet')
|
|
159
|
+
elif '.csv' in key:
|
|
160
|
+
encoding = from_bytes(data).best().encoding
|
|
161
|
+
df = read_file_frame(data, 'csv', encoding=encoding)
|
|
162
|
+
return df
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
if __name__ == '__main__':
|
|
166
|
+
main(GoogleCloudStorage)
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Google Search Console
|
|
2
|
+
|
|
3
|
+
<br />
|
|
4
|
+
|
|
5
|
+
## Config
|
|
6
|
+
|
|
7
|
+
You must enter the following credentials when configuring this source:
|
|
8
|
+
|
|
9
|
+
| Key | Description | Sample value
|
|
10
|
+
| --- | --- | --- |
|
|
11
|
+
| `path_to_credentials_json_file` | Google service account credential json file. | `/path/to/service_account_credentials.json` |
|
|
12
|
+
| `email` | If you have delegated domain-wide access to the service account and you want to impersonate a user account, enter the user email. | `test@xyz.com` |
|
|
13
|
+
| `site_urls` | Website urls separated by comma. | `https://www.mage.ai, sc-domain:example.com` |
|
|
14
|
+
| `start_date` | The start date of google search console query. | `2022-01-01` |
|
|
15
|
+
<br />
|
|
16
|
+
|
|
17
|
+
Prerequisites:
|
|
18
|
+
* Google Search Console API needs to be enabled https://console.cloud.google.com/apis/dashboard
|
|
19
|
+
* The service account needs to have access to the Google Search Console data.
|
|
20
|
+
* In Google Search Console page https://search.google.com/search-console, click "Settings", and then add your service account email to "Users and permissions" list.
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
from datetime import datetime, timedelta
|
|
2
|
+
from mage_integrations.connections.google_search_console import \
|
|
3
|
+
GoogleSearchConsole as GoogleSearchConsoleConnection
|
|
4
|
+
from mage_integrations.sources.base import Source, main
|
|
5
|
+
from mage_integrations.sources.google_search_console.streams import STREAMS
|
|
6
|
+
from mage_integrations.utils.dictionary import merge_dict
|
|
7
|
+
from mage_integrations.utils.schema_helpers import extract_selected_columns
|
|
8
|
+
from typing import Dict, Generator, List
|
|
9
|
+
import singer
|
|
10
|
+
|
|
11
|
+
LOGGER = singer.get_logger()
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class GoogleSearchConsole(Source):
|
|
15
|
+
DATE_FORMAT = '%Y-%m-%d'
|
|
16
|
+
ROW_LIMIT = 1000
|
|
17
|
+
|
|
18
|
+
def __init__(self, **kwargs):
|
|
19
|
+
super().__init__(**kwargs)
|
|
20
|
+
|
|
21
|
+
self.connection = GoogleSearchConsoleConnection(
|
|
22
|
+
email=self.config.get('email'),
|
|
23
|
+
path_to_credentials_json_file=self.config['path_to_credentials_json_file'],
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
def load_data(
|
|
27
|
+
self,
|
|
28
|
+
stream,
|
|
29
|
+
bookmarks: Dict = None,
|
|
30
|
+
query: Dict = {},
|
|
31
|
+
**kwargs,
|
|
32
|
+
) -> Generator[List[Dict], None, None]:
|
|
33
|
+
stream_name = stream.tap_stream_id
|
|
34
|
+
|
|
35
|
+
endpoint_config = STREAMS[stream_name]
|
|
36
|
+
body_params = endpoint_config.get('body', {})
|
|
37
|
+
|
|
38
|
+
start_date = self.config.get('start_date')
|
|
39
|
+
if bookmarks is not None and bookmarks.get('date') is not None:
|
|
40
|
+
start_date = datetime.strptime(bookmarks.get('date'), self.DATE_FORMAT)
|
|
41
|
+
start_date += timedelta(days=1)
|
|
42
|
+
start_date = start_date.strftime(self.DATE_FORMAT)
|
|
43
|
+
|
|
44
|
+
end_date = datetime.now().strftime(self.DATE_FORMAT)
|
|
45
|
+
|
|
46
|
+
site_list = self.config['site_urls'].replace(' ', '').split(',')
|
|
47
|
+
for site in site_list:
|
|
48
|
+
# Skip/ignore sitemaps for domain property sites
|
|
49
|
+
# Reference issue: https://github.com/googleapis/google-api-php-client/issues/1607
|
|
50
|
+
# "...sitemaps API does not support domain property urls at this time."
|
|
51
|
+
if stream_name == 'sitemaps' and site[0:9] == 'sc-domain':
|
|
52
|
+
LOGGER.info('Skipping Site: {}'.format(site))
|
|
53
|
+
LOGGER.info(' Sitemaps API does not support domain property urls at this time.')
|
|
54
|
+
|
|
55
|
+
else:
|
|
56
|
+
# Not sitemaps and sites = sc-domain
|
|
57
|
+
LOGGER.info('STARTED Syncing: {}, Site: {}'.format(stream_name, site))
|
|
58
|
+
|
|
59
|
+
columns = extract_selected_columns(stream.metadata)
|
|
60
|
+
dimensions_all = ['date', 'country', 'device', 'page', 'query']
|
|
61
|
+
dimensions = [c for c in columns if c in dimensions_all]
|
|
62
|
+
body_params['dimensions'] = dimensions
|
|
63
|
+
LOGGER.info('stream: {}, dimensions_list: {}'.format(stream_name, dimensions))
|
|
64
|
+
|
|
65
|
+
body_params['startDate'] = start_date
|
|
66
|
+
body_params['endDate'] = end_date
|
|
67
|
+
start_row = 0
|
|
68
|
+
body_params['startRow'] = start_row
|
|
69
|
+
body_params['rowLimit'] = self.ROW_LIMIT
|
|
70
|
+
|
|
71
|
+
while True:
|
|
72
|
+
rows_raw = self.connection.load(site, body_params)
|
|
73
|
+
rows = []
|
|
74
|
+
if rows_raw is None:
|
|
75
|
+
break
|
|
76
|
+
for r in rows_raw:
|
|
77
|
+
keys = r.pop('keys')
|
|
78
|
+
r['site_url'] = site
|
|
79
|
+
rows.append(merge_dict(r, zip(dimensions, keys)))
|
|
80
|
+
start_row += self.ROW_LIMIT
|
|
81
|
+
body_params['startRow'] = start_row
|
|
82
|
+
|
|
83
|
+
yield rows
|
|
84
|
+
|
|
85
|
+
def get_forced_replication_method(self, stream_id):
|
|
86
|
+
return STREAMS[stream_id]['replication_method']
|
|
87
|
+
|
|
88
|
+
def get_table_key_properties(self, stream_id):
|
|
89
|
+
return STREAMS[stream_id]['key_properties']
|
|
90
|
+
|
|
91
|
+
def get_valid_replication_keys(self, stream_id):
|
|
92
|
+
return STREAMS[stream_id].get('replication_keys', [])
|
|
93
|
+
|
|
94
|
+
def test_connection(self):
|
|
95
|
+
self.connection.connect()
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
if __name__ == '__main__':
|
|
99
|
+
main(GoogleSearchConsole)
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "object",
|
|
3
|
+
"additionalProperties": false,
|
|
4
|
+
"properties": {
|
|
5
|
+
"site_url": {
|
|
6
|
+
"type": ["null", "string"]
|
|
7
|
+
},
|
|
8
|
+
"search_type": {
|
|
9
|
+
"type": ["null", "string"]
|
|
10
|
+
},
|
|
11
|
+
"date": {
|
|
12
|
+
"type": ["null", "string"],
|
|
13
|
+
"format": "date-time"
|
|
14
|
+
},
|
|
15
|
+
"country": {
|
|
16
|
+
"type": ["null", "string"]
|
|
17
|
+
},
|
|
18
|
+
"clicks": {
|
|
19
|
+
"type": ["null", "integer"]
|
|
20
|
+
},
|
|
21
|
+
"impressions": {
|
|
22
|
+
"type": ["null", "integer"]
|
|
23
|
+
},
|
|
24
|
+
"ctr": {
|
|
25
|
+
"type": ["null", "number"]
|
|
26
|
+
},
|
|
27
|
+
"position": {
|
|
28
|
+
"type": ["null", "number"]
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "object",
|
|
3
|
+
"additionalProperties": false,
|
|
4
|
+
"properties": {
|
|
5
|
+
"site_url": {
|
|
6
|
+
"type": ["null", "string"]
|
|
7
|
+
},
|
|
8
|
+
"search_type": {
|
|
9
|
+
"type": ["null", "string"]
|
|
10
|
+
},
|
|
11
|
+
"date": {
|
|
12
|
+
"type": ["null", "string"],
|
|
13
|
+
"format": "date-time"
|
|
14
|
+
},
|
|
15
|
+
"country": {
|
|
16
|
+
"type": ["null", "string"]
|
|
17
|
+
},
|
|
18
|
+
"device": {
|
|
19
|
+
"type": ["null", "string"]
|
|
20
|
+
},
|
|
21
|
+
"page": {
|
|
22
|
+
"type": ["null", "string"]
|
|
23
|
+
},
|
|
24
|
+
"query": {
|
|
25
|
+
"type": ["null", "string"]
|
|
26
|
+
},
|
|
27
|
+
"clicks": {
|
|
28
|
+
"type": ["null", "integer"]
|
|
29
|
+
},
|
|
30
|
+
"impressions": {
|
|
31
|
+
"type": ["null", "integer"]
|
|
32
|
+
},
|
|
33
|
+
"ctr": {
|
|
34
|
+
"type": ["null", "number"]
|
|
35
|
+
},
|
|
36
|
+
"position": {
|
|
37
|
+
"type": ["null", "number"]
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "object",
|
|
3
|
+
"additionalProperties": false,
|
|
4
|
+
"properties": {
|
|
5
|
+
"site_url": {
|
|
6
|
+
"type": ["null", "string"]
|
|
7
|
+
},
|
|
8
|
+
"search_type": {
|
|
9
|
+
"type": ["null", "string"]
|
|
10
|
+
},
|
|
11
|
+
"date": {
|
|
12
|
+
"type": ["null", "string"],
|
|
13
|
+
"format": "date-time"
|
|
14
|
+
},
|
|
15
|
+
"clicks": {
|
|
16
|
+
"type": ["null", "integer"]
|
|
17
|
+
},
|
|
18
|
+
"impressions": {
|
|
19
|
+
"type": ["null", "integer"]
|
|
20
|
+
},
|
|
21
|
+
"ctr": {
|
|
22
|
+
"type": ["null", "number"]
|
|
23
|
+
},
|
|
24
|
+
"position": {
|
|
25
|
+
"type": ["null", "number"]
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "object",
|
|
3
|
+
"additionalProperties": false,
|
|
4
|
+
"properties": {
|
|
5
|
+
"site_url": {
|
|
6
|
+
"type": ["null", "string"]
|
|
7
|
+
},
|
|
8
|
+
"search_type": {
|
|
9
|
+
"type": ["null", "string"]
|
|
10
|
+
},
|
|
11
|
+
"date": {
|
|
12
|
+
"type": ["null", "string"],
|
|
13
|
+
"format": "date-time"
|
|
14
|
+
},
|
|
15
|
+
"device": {
|
|
16
|
+
"type": ["null", "string"]
|
|
17
|
+
},
|
|
18
|
+
"clicks": {
|
|
19
|
+
"type": ["null", "integer"]
|
|
20
|
+
},
|
|
21
|
+
"impressions": {
|
|
22
|
+
"type": ["null", "integer"]
|
|
23
|
+
},
|
|
24
|
+
"ctr": {
|
|
25
|
+
"type": ["null", "number"]
|
|
26
|
+
},
|
|
27
|
+
"position": {
|
|
28
|
+
"type": ["null", "number"]
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "object",
|
|
3
|
+
"additionalProperties": false,
|
|
4
|
+
"properties": {
|
|
5
|
+
"site_url": {
|
|
6
|
+
"type": ["null", "string"]
|
|
7
|
+
},
|
|
8
|
+
"search_type": {
|
|
9
|
+
"type": ["null", "string"]
|
|
10
|
+
},
|
|
11
|
+
"date": {
|
|
12
|
+
"type": ["null", "string"],
|
|
13
|
+
"format": "date-time"
|
|
14
|
+
},
|
|
15
|
+
"page": {
|
|
16
|
+
"type": ["null", "string"]
|
|
17
|
+
},
|
|
18
|
+
"clicks": {
|
|
19
|
+
"type": ["null", "integer"]
|
|
20
|
+
},
|
|
21
|
+
"impressions": {
|
|
22
|
+
"type": ["null", "integer"]
|
|
23
|
+
},
|
|
24
|
+
"ctr": {
|
|
25
|
+
"type": ["null", "number"]
|
|
26
|
+
},
|
|
27
|
+
"position": {
|
|
28
|
+
"type": ["null", "number"]
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "object",
|
|
3
|
+
"additionalProperties": false,
|
|
4
|
+
"properties": {
|
|
5
|
+
"site_url": {
|
|
6
|
+
"type": ["null", "string"]
|
|
7
|
+
},
|
|
8
|
+
"search_type": {
|
|
9
|
+
"type": ["null", "string"]
|
|
10
|
+
},
|
|
11
|
+
"date": {
|
|
12
|
+
"type": ["null", "string"],
|
|
13
|
+
"format": "date-time"
|
|
14
|
+
},
|
|
15
|
+
"query": {
|
|
16
|
+
"type": ["null", "string"]
|
|
17
|
+
},
|
|
18
|
+
"clicks": {
|
|
19
|
+
"type": ["null", "integer"]
|
|
20
|
+
},
|
|
21
|
+
"impressions": {
|
|
22
|
+
"type": ["null", "integer"]
|
|
23
|
+
},
|
|
24
|
+
"ctr": {
|
|
25
|
+
"type": ["null", "number"]
|
|
26
|
+
},
|
|
27
|
+
"position": {
|
|
28
|
+
"type": ["null", "number"]
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|