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,272 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import datetime
|
|
3
|
+
import unittest
|
|
4
|
+
import datetime
|
|
5
|
+
import pymongo
|
|
6
|
+
import string
|
|
7
|
+
import random
|
|
8
|
+
import time
|
|
9
|
+
import re
|
|
10
|
+
import bson
|
|
11
|
+
import decimal
|
|
12
|
+
|
|
13
|
+
from tap_tester import connections, menagerie, runner
|
|
14
|
+
from mongodb_common import drop_all_collections, get_test_connection, ensure_environment_variables_set
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def random_string_generator(size=6, chars=string.ascii_uppercase + string.digits):
|
|
18
|
+
return ''.join(random.choice(chars) for x in range(size))
|
|
19
|
+
|
|
20
|
+
def generate_simple_coll_docs(num_docs):
|
|
21
|
+
docs = []
|
|
22
|
+
for int_value in range(num_docs):
|
|
23
|
+
docs.append({"int_field": int_value, "string_field": random_string_generator()})
|
|
24
|
+
return docs
|
|
25
|
+
|
|
26
|
+
class MongoDBDiscovery(unittest.TestCase):
|
|
27
|
+
AUTOMATIC = "automatic"
|
|
28
|
+
UNSUPPORTED = "unsupported"
|
|
29
|
+
VALID_REPLICATION_KEYS = "valid-replication-keys"
|
|
30
|
+
PRIMARY_KEYS = "table-key-properties"
|
|
31
|
+
FORCED_REPLICATION_METHOD = "forced-replication-method"
|
|
32
|
+
INCREMENTAL = "INCREMENTAL"
|
|
33
|
+
FULL_TABLE = "FULL_TABLE"
|
|
34
|
+
LOG_BASED = "LOG_BASED"
|
|
35
|
+
|
|
36
|
+
def setUp(self):
|
|
37
|
+
|
|
38
|
+
ensure_environment_variables_set()
|
|
39
|
+
|
|
40
|
+
with get_test_connection() as client:
|
|
41
|
+
# drop all dbs/collections
|
|
42
|
+
drop_all_collections(client)
|
|
43
|
+
|
|
44
|
+
# simple_coll_1 has 50 documents
|
|
45
|
+
client["simple_db"]["simple_coll_1"].insert_many(generate_simple_coll_docs(50))
|
|
46
|
+
|
|
47
|
+
# simple_coll_2 has 100 documents
|
|
48
|
+
client["simple_db"]["simple_coll_2"].insert_many(generate_simple_coll_docs(100))
|
|
49
|
+
|
|
50
|
+
# admin_coll_1 has 50 documents
|
|
51
|
+
client["admin"]["admin_coll_1"].insert_many(generate_simple_coll_docs(50))
|
|
52
|
+
|
|
53
|
+
# create view on simple_coll_1
|
|
54
|
+
client["simple_db"].command(bson.son.SON([("create", "simple_view_1"), ("viewOn", "simple_coll_1"), ("pipeline", [])]))
|
|
55
|
+
|
|
56
|
+
# collections with same names as others in different dbs
|
|
57
|
+
client["simple_db_2"]["simple_coll_1"].insert_many(generate_simple_coll_docs(50))
|
|
58
|
+
client["simple_db_2"]["SIMPLE_COLL_1"].insert_many(generate_simple_coll_docs(50))
|
|
59
|
+
|
|
60
|
+
# collections with special characters in names
|
|
61
|
+
client["special_db"]["hebrew_ישראל"].insert_many(generate_simple_coll_docs(50))
|
|
62
|
+
client['special_db']['hello!world?'].insert_many(generate_simple_coll_docs(50))
|
|
63
|
+
|
|
64
|
+
# Add datatype collections
|
|
65
|
+
pattern = re.compile('.*')
|
|
66
|
+
regex = bson.Regex.from_native(pattern)
|
|
67
|
+
regex.flags ^= re.UNICODE
|
|
68
|
+
datatype_doc = {
|
|
69
|
+
"double_field": 4.3,
|
|
70
|
+
"string_field": "a sample string",
|
|
71
|
+
"object_field" : {
|
|
72
|
+
"obj_field_1_key": "obj_field_1_val",
|
|
73
|
+
"obj_field_2_key": "obj_field_2_val"
|
|
74
|
+
},
|
|
75
|
+
"array_field" : [
|
|
76
|
+
"array_item_1",
|
|
77
|
+
"array_item_2",
|
|
78
|
+
"array_item_3"
|
|
79
|
+
],
|
|
80
|
+
"binary_data_field" : b"a binary string",
|
|
81
|
+
"object_id_field": bson.objectid.ObjectId(b'123456789123'),
|
|
82
|
+
"boolean_field" : True,
|
|
83
|
+
"date_field" : datetime.datetime.now(),
|
|
84
|
+
"null_field": None,
|
|
85
|
+
"regex_field" : regex,
|
|
86
|
+
"32_bit_integer_field" : 32,
|
|
87
|
+
"timestamp_field" : bson.timestamp.Timestamp(int(time.time()), 1),
|
|
88
|
+
"64_bit_integer_field" : 34359738368,
|
|
89
|
+
"decimal_field" : bson.Decimal128(decimal.Decimal('1.34')),
|
|
90
|
+
"javaScript_field" : bson.code.Code("var x, y, z;"),
|
|
91
|
+
"javaScript_with_scope_field" : bson.code.Code("function incrementX() { x++; }", scope={"x": 1}),
|
|
92
|
+
"min_key_field" : bson.min_key.MinKey,
|
|
93
|
+
"max_key_field" : bson.max_key.MaxKey
|
|
94
|
+
}
|
|
95
|
+
client["datatype_db"]["datatype_coll_1"].insert_one(datatype_doc)
|
|
96
|
+
|
|
97
|
+
client["datatype_db"]["datatype_coll_2"].insert_one(datatype_doc)
|
|
98
|
+
client["datatype_db"]["datatype_coll_2"].create_index([("date_field", pymongo.ASCENDING)])
|
|
99
|
+
client["datatype_db"]["datatype_coll_2"].create_index([("timestamp_field", pymongo.ASCENDING)])
|
|
100
|
+
client["datatype_db"]["datatype_coll_2"].create_index([("32_bit_integer_field", pymongo.ASCENDING)])
|
|
101
|
+
client["datatype_db"]["datatype_coll_2"].create_index([("64_bit_integer_field", pymongo.ASCENDING)])
|
|
102
|
+
|
|
103
|
+
def expected_check_streams(self):
|
|
104
|
+
return {
|
|
105
|
+
'simple_db-simple_coll_1',
|
|
106
|
+
'simple_db-simple_coll_2',
|
|
107
|
+
'simple_db_2-simple_coll_1',
|
|
108
|
+
'simple_db_2-SIMPLE_COLL_1',
|
|
109
|
+
'admin-admin_coll_1',
|
|
110
|
+
#'simple_db-simple_view_1',
|
|
111
|
+
'datatype_db-datatype_coll_1',
|
|
112
|
+
'datatype_db-datatype_coll_2',
|
|
113
|
+
'special_db-hebrew_ישראל',
|
|
114
|
+
'special_db-hello!world?'
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
def expected_primary_keys(self):
|
|
118
|
+
"""Defaults to '_id' in discovery, standard ObjectId(), any value can be provided (TODO where?)"""
|
|
119
|
+
return {
|
|
120
|
+
stream: {'_id'}
|
|
121
|
+
for stream in self.expected_check_streams()
|
|
122
|
+
}
|
|
123
|
+
def expected_replication_keys(self):
|
|
124
|
+
return {
|
|
125
|
+
'simple_db-simple_coll_1': {'_id'},
|
|
126
|
+
'simple_db-simple_coll_2': {'_id'},
|
|
127
|
+
'simple_db_2-simple_coll_1': {'_id'},
|
|
128
|
+
'simple_db_2-SIMPLE_COLL_1': {'_id'},
|
|
129
|
+
'admin-admin_coll_1': {'_id'},
|
|
130
|
+
#'simple_db-simple_view_1': {'_id'},
|
|
131
|
+
'datatype_db-datatype_coll_1': {
|
|
132
|
+
'_id',
|
|
133
|
+
},
|
|
134
|
+
'datatype_db-datatype_coll_2': {
|
|
135
|
+
'_id',
|
|
136
|
+
'date_field',
|
|
137
|
+
'timestamp_field',
|
|
138
|
+
'32_bit_integer_field',
|
|
139
|
+
'64_bit_integer_field',
|
|
140
|
+
},
|
|
141
|
+
'special_db-hebrew_ישראל': {'_id'},
|
|
142
|
+
'special_db-hello!world?': {'_id'},
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
def expected_row_counts(self):
|
|
146
|
+
return {
|
|
147
|
+
'simple_db-simple_coll_1': 50,
|
|
148
|
+
'simple_db-simple_coll_2': 100,
|
|
149
|
+
'simple_db_2-simple_coll_1': 50,
|
|
150
|
+
'simple_db_2-SIMPLE_COLL_1': 50,
|
|
151
|
+
'admin-admin_coll_1': 50,
|
|
152
|
+
#'simple_db-simple_view_1': 50,
|
|
153
|
+
'datatype_db-datatype_coll_1': 1,
|
|
154
|
+
'datatype_db-datatype_coll_2': 1,
|
|
155
|
+
'special_db-hebrew_ישראל': 50,
|
|
156
|
+
'special_db-hello!world?': 50
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
def expected_table_names(self):
|
|
160
|
+
return {
|
|
161
|
+
'simple_coll_1',
|
|
162
|
+
'simple_coll_2',
|
|
163
|
+
'SIMPLE_COLL_1',
|
|
164
|
+
'admin_coll_1',
|
|
165
|
+
'datatype_coll_1',
|
|
166
|
+
'datatype_coll_2',
|
|
167
|
+
'hebrew_ישראל',
|
|
168
|
+
'hello!world?'
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
def name(self):
|
|
172
|
+
return "mongodb_discovery"
|
|
173
|
+
|
|
174
|
+
def tap_name(self):
|
|
175
|
+
return "tap-mongodb"
|
|
176
|
+
|
|
177
|
+
def get_type(self):
|
|
178
|
+
return "platform.mongodb"
|
|
179
|
+
|
|
180
|
+
def get_credentials(self):
|
|
181
|
+
return {'password': os.getenv('TAP_MONGODB_PASSWORD')}
|
|
182
|
+
|
|
183
|
+
def get_properties(self):
|
|
184
|
+
return {'host' : os.getenv('TAP_MONGODB_HOST'),
|
|
185
|
+
'port' : os.getenv('TAP_MONGODB_PORT'),
|
|
186
|
+
'user' : os.getenv('TAP_MONGODB_USER'),
|
|
187
|
+
'database' : os.getenv('TAP_MONGODB_DBNAME')
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
def test_run(self):
|
|
191
|
+
conn_id = connections.ensure_connection(self)
|
|
192
|
+
|
|
193
|
+
# run in check mode
|
|
194
|
+
check_job_name = runner.run_check_mode(self, conn_id)
|
|
195
|
+
|
|
196
|
+
# check exit codes
|
|
197
|
+
exit_status = menagerie.get_exit_status(conn_id, check_job_name)
|
|
198
|
+
menagerie.verify_check_exit_status(self, exit_status, check_job_name)
|
|
199
|
+
|
|
200
|
+
# Verify a catalog was produced by discovery
|
|
201
|
+
catalog = menagerie.get_catalog(conn_id)
|
|
202
|
+
self.assertGreater(len(catalog), 0)
|
|
203
|
+
|
|
204
|
+
# Verify stream_name entries match the expected table names
|
|
205
|
+
stream_catalogs = catalog['streams']
|
|
206
|
+
stream_names = {catalog['stream_name'] for catalog in stream_catalogs}
|
|
207
|
+
self.assertSetEqual(self.expected_table_names(), stream_names)
|
|
208
|
+
|
|
209
|
+
# Verify tap_stream_id entries follow naming convention <db_name>-<table_name>
|
|
210
|
+
stream_ids = {catalog['tap_stream_id'] for catalog in stream_catalogs}
|
|
211
|
+
self.assertSetEqual(self.expected_check_streams(), stream_ids)
|
|
212
|
+
|
|
213
|
+
# Stream level assertions
|
|
214
|
+
for stream in self.expected_check_streams():
|
|
215
|
+
with self.subTest(stream=stream):
|
|
216
|
+
|
|
217
|
+
# gathering expectations
|
|
218
|
+
expected_primary_keys = self.expected_primary_keys()[stream]
|
|
219
|
+
expected_replication_keys = self.expected_replication_keys()[stream]
|
|
220
|
+
expected_row_count = self.expected_row_counts()[stream]
|
|
221
|
+
|
|
222
|
+
# collecting actual values...
|
|
223
|
+
stream_catalog = [catalog for catalog in stream_catalogs
|
|
224
|
+
if catalog["tap_stream_id"] == stream][0]
|
|
225
|
+
schema_and_metadata = menagerie.get_annotated_schema(conn_id, stream_catalog['stream_id'])
|
|
226
|
+
stream_metadata = schema_and_metadata["metadata"]
|
|
227
|
+
empty_breadcrumb_metadata = [item for item in stream_metadata if item.get("breadcrumb") == []]
|
|
228
|
+
stream_properties = empty_breadcrumb_metadata[0]['metadata']
|
|
229
|
+
actual_primary_keys = set(stream_properties.get(self.PRIMARY_KEYS, []))
|
|
230
|
+
actual_replication_keys = set(stream_properties.get(self.VALID_REPLICATION_KEYS, []))
|
|
231
|
+
actual_replication_method = stream_properties.get(self.FORCED_REPLICATION_METHOD)
|
|
232
|
+
actual_stream_inclusion = stream_properties.get('inclusion')
|
|
233
|
+
actual_field_inclusions = set(
|
|
234
|
+
item.get("metadata").get("inclusion")
|
|
235
|
+
for item in stream_metadata
|
|
236
|
+
if item.get("breadcrumb", []) != []
|
|
237
|
+
)
|
|
238
|
+
actual_fields_to_datatypes = {
|
|
239
|
+
item['breadcrumb'][1]: item['metadata'].get('sql-datatype')
|
|
240
|
+
for item in stream_metadata if item.get('breadcrumb') != []
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
# Verify there is only 1 top level breadcrumb in metadata
|
|
244
|
+
self.assertEqual(1, len(empty_breadcrumb_metadata))
|
|
245
|
+
|
|
246
|
+
# Verify replication key(s) match expectations
|
|
247
|
+
self.assertSetEqual(expected_replication_keys, actual_replication_keys)
|
|
248
|
+
|
|
249
|
+
# Verify primary key(s) match expectations
|
|
250
|
+
self.assertSetEqual(expected_primary_keys, actual_primary_keys)
|
|
251
|
+
|
|
252
|
+
# Verify no field-level inclusion exists
|
|
253
|
+
self.assertSetEqual(set(), actual_field_inclusions)
|
|
254
|
+
|
|
255
|
+
# Verify row-count metadata matches expectations
|
|
256
|
+
self.assertEqual(expected_row_count, stream_properties['row-count'])
|
|
257
|
+
|
|
258
|
+
# Verify selected metadata is None for all streams
|
|
259
|
+
self.assertIsNone(stream_properties.get('selected'))
|
|
260
|
+
|
|
261
|
+
# Verify is-view metadata is False
|
|
262
|
+
self.assertFalse(stream_properties['is-view'])
|
|
263
|
+
|
|
264
|
+
# Verify no forced-replication-method is present in metadata
|
|
265
|
+
self.assertNotIn(self.FORCED_REPLICATION_METHOD, stream_properties.keys())
|
|
266
|
+
|
|
267
|
+
# Verify database-name is consistent with the tap_stream_id
|
|
268
|
+
tap_stream_id_db_prefix = stream_catalog['tap_stream_id'].split('-')[0]
|
|
269
|
+
self.assertEqual(tap_stream_id_db_prefix, stream_properties['database-name'])
|
|
270
|
+
|
|
271
|
+
# Verify schema types match expectations
|
|
272
|
+
self.assertDictEqual({'type': 'object'}, stream_catalog['schema'])
|
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
import tap_tester.connections as connections
|
|
2
|
+
import tap_tester.menagerie as menagerie
|
|
3
|
+
import tap_tester.runner as runner
|
|
4
|
+
import os
|
|
5
|
+
import datetime
|
|
6
|
+
import unittest
|
|
7
|
+
import datetime
|
|
8
|
+
import pymongo
|
|
9
|
+
import string
|
|
10
|
+
import random
|
|
11
|
+
import time
|
|
12
|
+
import re
|
|
13
|
+
import pprint
|
|
14
|
+
import pdb
|
|
15
|
+
import bson
|
|
16
|
+
from bson import ObjectId
|
|
17
|
+
from functools import reduce
|
|
18
|
+
from mongodb_common import drop_all_collections, get_test_connection, ensure_environment_variables_set
|
|
19
|
+
import decimal
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
RECORD_COUNT = {}
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def random_string_generator(size=6, chars=string.ascii_uppercase + string.digits):
|
|
26
|
+
return ''.join(random.choice(chars) for x in range(size))
|
|
27
|
+
|
|
28
|
+
def generate_simple_coll_docs(num_docs):
|
|
29
|
+
docs = []
|
|
30
|
+
for int_value in range(num_docs):
|
|
31
|
+
# TDL-20088. Version 4.2 does not support leading "." or leading "$" in
|
|
32
|
+
# field names. Also unsupported: use of field names with "." in find() queries
|
|
33
|
+
docs.append({"int.field": int_value, "string$field": random_string_generator()})
|
|
34
|
+
return docs
|
|
35
|
+
|
|
36
|
+
class MongoDBFieldNameRestrictions(unittest.TestCase):
|
|
37
|
+
''' Test edge case field name restrictions per the documentation (use of '.' and '$')
|
|
38
|
+
Reference https://jira.talendforge.org/browse/TDL-18990 for details '''
|
|
39
|
+
|
|
40
|
+
def setUp(self):
|
|
41
|
+
|
|
42
|
+
ensure_environment_variables_set()
|
|
43
|
+
|
|
44
|
+
with get_test_connection() as client:
|
|
45
|
+
############# Drop all dbs/collections #############
|
|
46
|
+
drop_all_collections(client)
|
|
47
|
+
|
|
48
|
+
############# Add simple collections #############
|
|
49
|
+
# simple_coll_1 has 50 documents
|
|
50
|
+
client["simple_db"]["simple_coll_1"].insert_many(generate_simple_coll_docs(50))
|
|
51
|
+
|
|
52
|
+
# simple_coll_2 has 100 documents
|
|
53
|
+
client["simple_db"]["simple_coll_2"].insert_many(generate_simple_coll_docs(100))
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
def expected_check_streams(self):
|
|
57
|
+
return {
|
|
58
|
+
'simple_db-simple_coll_1',
|
|
59
|
+
'simple_db-simple_coll_2',
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
def expected_pks(self):
|
|
63
|
+
return {
|
|
64
|
+
'simple_coll_1': {'_id'},
|
|
65
|
+
'simple_coll_2': {'_id'},
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
def expected_row_counts(self):
|
|
69
|
+
return {
|
|
70
|
+
'simple_coll_1': 50,
|
|
71
|
+
'simple_coll_2': 100,
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
def expected_sync_streams(self):
|
|
75
|
+
return {
|
|
76
|
+
'simple_coll_1',
|
|
77
|
+
'simple_coll_2'
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
def name(self):
|
|
81
|
+
return "tap_tester_mongodb_fname_restrict"
|
|
82
|
+
|
|
83
|
+
def tap_name(self):
|
|
84
|
+
return "tap-mongodb"
|
|
85
|
+
|
|
86
|
+
def get_type(self):
|
|
87
|
+
return "platform.mongodb"
|
|
88
|
+
|
|
89
|
+
def get_credentials(self):
|
|
90
|
+
return {'password': os.getenv('TAP_MONGODB_PASSWORD')}
|
|
91
|
+
|
|
92
|
+
def get_properties(self):
|
|
93
|
+
return {'host' : os.getenv('TAP_MONGODB_HOST'),
|
|
94
|
+
'port' : os.getenv('TAP_MONGODB_PORT'),
|
|
95
|
+
'user' : os.getenv('TAP_MONGODB_USER'),
|
|
96
|
+
'database' : os.getenv('TAP_MONGODB_DBNAME')
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
def test_run(self):
|
|
101
|
+
|
|
102
|
+
conn_id = connections.ensure_connection(self)
|
|
103
|
+
|
|
104
|
+
# ---------------------------------
|
|
105
|
+
# ----------- Discovery ----------
|
|
106
|
+
# ---------------------------------
|
|
107
|
+
|
|
108
|
+
# run in discovery mode
|
|
109
|
+
check_job_name = runner.run_check_mode(self, conn_id)
|
|
110
|
+
|
|
111
|
+
# verify check exit codes
|
|
112
|
+
exit_status = menagerie.get_exit_status(conn_id, check_job_name)
|
|
113
|
+
menagerie.verify_check_exit_status(self, exit_status, check_job_name)
|
|
114
|
+
|
|
115
|
+
# verify the tap discovered the right streams
|
|
116
|
+
found_catalogs = menagerie.get_catalogs(conn_id)
|
|
117
|
+
|
|
118
|
+
# assert we find the correct streams
|
|
119
|
+
self.assertEqual(self.expected_check_streams(),
|
|
120
|
+
{c['tap_stream_id'] for c in found_catalogs})
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
for tap_stream_id in self.expected_check_streams():
|
|
124
|
+
found_stream = [c for c in found_catalogs if c['tap_stream_id'] == tap_stream_id][0]
|
|
125
|
+
|
|
126
|
+
# assert that the pks are correct
|
|
127
|
+
self.assertEqual(self.expected_pks()[found_stream['stream_name']],
|
|
128
|
+
set(found_stream.get('metadata', {}).get('table-key-properties')))
|
|
129
|
+
|
|
130
|
+
# assert that the row counts are correct
|
|
131
|
+
self.assertEqual(self.expected_row_counts()[found_stream['stream_name']],
|
|
132
|
+
found_stream.get('metadata', {}).get('row-count'))
|
|
133
|
+
|
|
134
|
+
# ----------------------------------------
|
|
135
|
+
# ----------- Initial Full Table ---------
|
|
136
|
+
# ----------------------------------------
|
|
137
|
+
|
|
138
|
+
# Select simple_coll_1 and simple_coll_2 streams and add replication method metadata
|
|
139
|
+
for stream_catalog in found_catalogs:
|
|
140
|
+
annotated_schema = menagerie.get_annotated_schema(conn_id, stream_catalog['stream_id'])
|
|
141
|
+
additional_md = [{ "breadcrumb" : [], "metadata" : {'replication-method' : 'LOG_BASED'}}]
|
|
142
|
+
selected_metadata = connections.select_catalog_and_fields_via_metadata(conn_id,
|
|
143
|
+
stream_catalog,
|
|
144
|
+
annotated_schema,
|
|
145
|
+
additional_md)
|
|
146
|
+
|
|
147
|
+
# Run sync
|
|
148
|
+
sync_job_name = runner.run_sync_mode(self, conn_id)
|
|
149
|
+
|
|
150
|
+
exit_status = menagerie.get_exit_status(conn_id, sync_job_name)
|
|
151
|
+
menagerie.verify_sync_exit_status(self, exit_status, sync_job_name)
|
|
152
|
+
|
|
153
|
+
# verify the persisted schema was correct
|
|
154
|
+
records_by_stream = runner.get_records_from_target_output()
|
|
155
|
+
|
|
156
|
+
# assert that each of the streams that we synced are the ones that we expect to see
|
|
157
|
+
record_count_by_stream = runner.examine_target_output_file(self,
|
|
158
|
+
conn_id,
|
|
159
|
+
self.expected_sync_streams(),
|
|
160
|
+
self.expected_pks())
|
|
161
|
+
|
|
162
|
+
# Verify that the full table was synced
|
|
163
|
+
for tap_stream_id in self.expected_sync_streams():
|
|
164
|
+
self.assertGreaterEqual(record_count_by_stream[tap_stream_id],self.expected_row_counts()[tap_stream_id])
|
|
165
|
+
|
|
166
|
+
# Verify that we have 'initial_full_table_complete' bookmark
|
|
167
|
+
state = menagerie.get_state(conn_id)
|
|
168
|
+
first_versions = {}
|
|
169
|
+
|
|
170
|
+
for tap_stream_id in self.expected_check_streams():
|
|
171
|
+
# assert that the state has an initial_full_table_complete == True
|
|
172
|
+
self.assertTrue(state['bookmarks'][tap_stream_id]['initial_full_table_complete'])
|
|
173
|
+
# assert that there is a version bookmark in state
|
|
174
|
+
first_versions[tap_stream_id] = state['bookmarks'][tap_stream_id]['version']
|
|
175
|
+
self.assertIsNotNone(first_versions[tap_stream_id])
|
|
176
|
+
# Verify that we have a oplog_ts_time and oplog_ts_inc bookmark
|
|
177
|
+
self.assertIsNotNone(state['bookmarks'][tap_stream_id]['oplog_ts_time'])
|
|
178
|
+
self.assertIsNotNone(state['bookmarks'][tap_stream_id]['oplog_ts_inc'])
|
|
179
|
+
|
|
180
|
+
changed_ids = set()
|
|
181
|
+
with get_test_connection() as client:
|
|
182
|
+
# Delete two documents for each collection
|
|
183
|
+
object_id = client['simple_db']['simple_coll_1'].find()[0]['_id']
|
|
184
|
+
changed_ids.add(object_id)
|
|
185
|
+
client["simple_db"]["simple_coll_1"].delete_one({'_id': object_id})
|
|
186
|
+
|
|
187
|
+
object_id = client['simple_db']['simple_coll_1'].find()[1]['_id']
|
|
188
|
+
changed_ids.add(object_id)
|
|
189
|
+
client["simple_db"]["simple_coll_1"].delete_one({'_id': object_id})
|
|
190
|
+
|
|
191
|
+
object_id = client['simple_db']['simple_coll_2'].find()[0]['_id']
|
|
192
|
+
changed_ids.add(object_id)
|
|
193
|
+
client["simple_db"]["simple_coll_2"].delete_one({'_id': object_id})
|
|
194
|
+
|
|
195
|
+
object_id = client['simple_db']['simple_coll_2'].find()[1]['_id']
|
|
196
|
+
changed_ids.add(object_id)
|
|
197
|
+
client["simple_db"]["simple_coll_2"].delete_one({'_id': object_id})
|
|
198
|
+
|
|
199
|
+
# Update two documents for each collection
|
|
200
|
+
|
|
201
|
+
# curor objects do not support negative indicies so set indicies for last two records
|
|
202
|
+
num_records = client['simple_db']['simple_coll_1'].find().count()
|
|
203
|
+
last_index = num_records - 1
|
|
204
|
+
sec_last_index = num_records -2
|
|
205
|
+
|
|
206
|
+
# Not supported in mongodb 4.2 TDL-20088
|
|
207
|
+
# object_id = client['simple_db']['simple_coll_1'].find()[sec_last_index]['_id'] # int.field 48
|
|
208
|
+
# changed_ids.add(object_id)
|
|
209
|
+
# client["simple_db"]["simple_coll_1"].update_one({'_id': object_id},{'$set': {'int.field': -1}})
|
|
210
|
+
|
|
211
|
+
object_id = client['simple_db']['simple_coll_1'].find()[last_index]['_id'] # int.field 49
|
|
212
|
+
changed_ids.add(object_id)
|
|
213
|
+
client["simple_db"]["simple_coll_1"].update_one({'_id': object_id},{'$set': {'string$field': "Updated_1"}})
|
|
214
|
+
|
|
215
|
+
num_records = client['simple_db']['simple_coll_2'].find().count()
|
|
216
|
+
last_index = num_records - 1
|
|
217
|
+
sec_last_index = num_records - 2
|
|
218
|
+
|
|
219
|
+
# Not supported in mongodb 4.2 TDL-20088
|
|
220
|
+
# object_id = client['simple_db']['simple_coll_2'].find()[sec_last_index]['_id'] # int.field 98
|
|
221
|
+
# changed_ids.add(object_id)
|
|
222
|
+
# client["simple_db"]["simple_coll_2"].update_one({'_id': object_id},{'$set': {'int.field': -1}})
|
|
223
|
+
|
|
224
|
+
object_id = client['simple_db']['simple_coll_2'].find()[last_index]['_id'] # int.field 99
|
|
225
|
+
changed_ids.add(object_id)
|
|
226
|
+
client["simple_db"]["simple_coll_2"].update_one({'_id': object_id},{'$set': {'string$field': "Updated_2"}})
|
|
227
|
+
|
|
228
|
+
# Insert two documents for each collection
|
|
229
|
+
last_index = client['simple_db']['simple_coll_1'].find().count()
|
|
230
|
+
client["simple_db"]["simple_coll_1"].insert_one({"int.field": 50, "string$field": random_string_generator()})
|
|
231
|
+
object_id = client["simple_db"]["simple_coll_1"].find()[last_index]['_id']
|
|
232
|
+
changed_ids.add(object_id)
|
|
233
|
+
|
|
234
|
+
last_index += 1 # inserting a new item
|
|
235
|
+
client["simple_db"]["simple_coll_1"].insert_one({"int.field": 51, "string$field": random_string_generator()})
|
|
236
|
+
object_id = client["simple_db"]["simple_coll_1"].find()[last_index]['_id']
|
|
237
|
+
changed_ids.add(object_id)
|
|
238
|
+
|
|
239
|
+
last_index = client['simple_db']['simple_coll_2'].find().count()
|
|
240
|
+
client["simple_db"]["simple_coll_2"].insert_one({"int.field": 100, "string$field": random_string_generator()})
|
|
241
|
+
object_id = client["simple_db"]["simple_coll_2"].find()[last_index]['_id']
|
|
242
|
+
changed_ids.add(object_id)
|
|
243
|
+
|
|
244
|
+
last_index += 1
|
|
245
|
+
client["simple_db"]["simple_coll_2"].insert_one({"int.field": 101, "string$field": random_string_generator()})
|
|
246
|
+
object_id = client["simple_db"]["simple_coll_2"].find()[last_index]['_id']
|
|
247
|
+
changed_ids.add(object_id)
|
|
248
|
+
|
|
249
|
+
# -------------------------------------------
|
|
250
|
+
# ----------- Subsequent Oplog Sync ---------
|
|
251
|
+
# -------------------------------------------
|
|
252
|
+
|
|
253
|
+
# Run sync
|
|
254
|
+
sync_job_name = runner.run_sync_mode(self, conn_id)
|
|
255
|
+
|
|
256
|
+
exit_status = menagerie.get_exit_status(conn_id, sync_job_name)
|
|
257
|
+
menagerie.verify_sync_exit_status(self, exit_status, sync_job_name)
|
|
258
|
+
|
|
259
|
+
# verify the persisted schema was correct
|
|
260
|
+
messages_by_stream = runner.get_records_from_target_output()
|
|
261
|
+
records_by_stream = {}
|
|
262
|
+
for stream_name in self.expected_sync_streams():
|
|
263
|
+
records_by_stream[stream_name] = [x for x in messages_by_stream[stream_name]['messages'] if x.get('action') == 'upsert']
|
|
264
|
+
|
|
265
|
+
|
|
266
|
+
# assert that each of the streams that we synced are the ones that we expect to see
|
|
267
|
+
record_count_by_stream = runner.examine_target_output_file(self,
|
|
268
|
+
conn_id,
|
|
269
|
+
self.expected_sync_streams(),
|
|
270
|
+
self.expected_pks())
|
|
271
|
+
|
|
272
|
+
# Verify that we got at least 6 records due to changes
|
|
273
|
+
# (could be more due to overlap in gte oplog clause)
|
|
274
|
+
for k,v in record_count_by_stream.items():
|
|
275
|
+
self.assertGreaterEqual(v, 5)
|
|
276
|
+
|
|
277
|
+
# Verify that we got 2 records with _SDC_DELETED_AT
|
|
278
|
+
self.assertEqual(2, len([x['data'] for x in records_by_stream['simple_coll_1'] if x['data'].get('_sdc_deleted_at')]))
|
|
279
|
+
self.assertEqual(2, len([x['data'] for x in records_by_stream['simple_coll_2'] if x['data'].get('_sdc_deleted_at')]))
|
|
280
|
+
# Verify that the _id of the records sent are the same set as the
|
|
281
|
+
# _ids of the documents changed
|
|
282
|
+
actual = set([ObjectId(x['data']['_id']) for x in records_by_stream['simple_coll_1']]).union(
|
|
283
|
+
set([ObjectId(x['data']['_id']) for x in records_by_stream['simple_coll_2']]))
|
|
284
|
+
self.assertEqual(changed_ids, actual)
|
|
285
|
+
|
|
286
|
+
# Verify the updated record values in the db match the tap output file
|
|
287
|
+
found_id_db = client['simple_db']['simple_coll_1'].find({'string$field': "Updated_1"})[0]['_id']
|
|
288
|
+
found_id_tap = [ x['data']['_id'] for x in records_by_stream['simple_coll_1']
|
|
289
|
+
if x['data'].get('string$field') == 'Updated_1' ]
|
|
290
|
+
self.assertEqual(str(found_id_db), found_id_tap[0])
|
|
291
|
+
|
|
292
|
+
found_id_db = client['simple_db']['simple_coll_2'].find({'string$field': "Updated_2"})[0]['_id']
|
|
293
|
+
found_id_tap = [ x['data']['_id'] for x in records_by_stream['simple_coll_2']
|
|
294
|
+
if x['data'].get('string$field') == 'Updated_2' ]
|
|
295
|
+
self.assertEqual(str(found_id_db), found_id_tap[0])
|
|
296
|
+
|
|
297
|
+
# Not supported in mongodb 4.2 TDL-20088. Verify updated record values in db match tap output file
|
|
298
|
+
# found_int = -1 # one document in each colleciton was updated to have an int value of -1
|
|
299
|
+
# found_ints_1 = [x['data']['int.field'] for x in records_by_stream['simple_coll_1'] if x['data'].get('int.field')]
|
|
300
|
+
# found_ints_2 = [x['data']['int.field'] for x in records_by_stream['simple_coll_2'] if x['data'].get('int.field')]
|
|
301
|
+
# self.assertIn(found_int, found_ints_1)
|
|
302
|
+
# self.assertIn(found_int, found_ints_2)
|