├── .github ├── CODEOWNERS └── workflows │ └── ci.yml ├── .gitignore ├── Dockerfile ├── LICENSE ├── README.md ├── analysis └── .gitkeep ├── data └── .gitkeep ├── dbt_project.yml ├── docker-compose.yml ├── integration_tests ├── clickhouse │ └── users_settings.xml ├── data │ ├── ads │ │ ├── ads_adgroups.csv │ │ ├── ads_adgroups_facts.csv │ │ ├── ads_ads.csv │ │ ├── ads_ads_facts.csv │ │ ├── ads_campaigns.csv │ │ ├── ads_campaigns_facts.csv │ │ ├── ads_keywords.csv │ │ ├── ads_keywords_facts.csv │ │ └── ads_location_criterions.csv │ ├── amocrm │ │ ├── amocrm_companies.csv │ │ ├── amocrm_contacts.csv │ │ ├── amocrm_leads.csv │ │ ├── amocrm_leads_attributes.csv │ │ ├── amocrm_leads_facts.csv │ │ ├── amocrm_leads_tags.csv │ │ └── amocrm_users.csv │ ├── bitrix24 │ │ ├── bitrix24_companies.csv │ │ ├── bitrix24_contacts.csv │ │ ├── bitrix24_deals.csv │ │ ├── bitrix24_deals_facts.csv │ │ ├── bitrix24_leads.csv │ │ ├── bitrix24_leads_facts.csv │ │ ├── bitrix24_products.csv │ │ ├── bitrix24_products_facts.csv │ │ └── bitrix24_users.csv │ ├── currencies │ │ ├── currency_item_facts.csv │ │ └── currency_items.csv │ ├── direct │ │ ├── direct_adgroups.csv │ │ ├── direct_ads.csv │ │ ├── direct_ads_facts.csv │ │ ├── direct_campaigns.csv │ │ ├── direct_regions.csv │ │ └── direct_sitelinks.csv │ ├── facebook │ │ ├── facebook_ads.csv │ │ ├── facebook_ads_facts.csv │ │ ├── facebook_adsets.csv │ │ ├── facebook_campaigns.csv │ │ └── facebook_creatives.csv │ ├── ga │ │ ├── analytics_costs_facts.csv │ │ ├── analytics_devices.csv │ │ ├── analytics_events.csv │ │ ├── analytics_events_facts.csv │ │ ├── analytics_goals.csv │ │ ├── analytics_goals_facts.csv │ │ ├── analytics_mcf_facts.csv │ │ └── analytics_sessions_facts.csv │ ├── gaw │ │ ├── adwords_adgroups.csv │ │ ├── adwords_ads.csv │ │ ├── adwords_ads_facts.csv │ │ ├── adwords_campaigns.csv │ │ ├── adwords_keywords.csv │ │ ├── adwords_keywords_facts.csv │ │ └── adwords_location_criterions.csv │ ├── general │ │ ├── general_accounts.csv │ │ ├── general_clientids.csv │ │ ├── general_costs_facts.csv │ │ ├── general_dates.csv │ │ ├── general_locations.csv │ │ ├── general_sites.csv │ │ └── general_traffic.csv │ ├── metrika │ │ ├── metrika_devices.csv │ │ └── metrika_sessions_facts.csv │ └── mytarget │ │ ├── mytarget_banners.csv │ │ ├── mytarget_banners_facts.csv │ │ ├── mytarget_campaigns.csv │ │ └── mytarget_campaigns_facts.csv ├── dbt_project.yml ├── packages.yml └── profiles.yml ├── macros ├── .gitkeep ├── clean_up.sql ├── custom_schema_management.sql ├── schema_tests.sql └── source_filter_rows.sql ├── models ├── sources │ └── sources.yml └── staging │ ├── ads │ ├── ads.yml │ ├── stg_ads_adgroups.sql │ ├── stg_ads_adgroups_facts.sql │ ├── stg_ads_ads.sql │ ├── stg_ads_ads_facts.sql │ ├── stg_ads_campaigns.sql │ ├── stg_ads_campaigns_facts.sql │ ├── stg_ads_keywords.sql │ ├── stg_ads_keywords_facts.sql │ └── stg_ads_location_criterions.sql │ ├── amocrm │ ├── amocrm.yml │ ├── stg_amo_companies.sql │ ├── stg_amo_contacts.sql │ ├── stg_amo_leads.sql │ ├── stg_amo_leads_attributes.sql │ ├── stg_amo_leads_facts.sql │ ├── stg_amo_leads_tags.sql │ └── stg_amo_users.sql │ ├── bitrix24 │ ├── bitrix24.yml │ ├── stg_b24_companies.sql │ ├── stg_b24_contacts.sql │ ├── stg_b24_deals.sql │ ├── stg_b24_deals_facts.sql │ ├── stg_b24_leads.sql │ ├── stg_b24_leads_facts.sql │ ├── stg_b24_products.sql │ ├── stg_b24_products_facts.sql │ └── stg_b24_users.sql │ ├── currencies │ ├── currency.yml │ ├── stg_currency_items.sql │ └── stg_currency_items_facts.sql │ ├── direct │ ├── direct.yml │ ├── stg_yd_adgroups.sql │ ├── stg_yd_ads.sql │ ├── stg_yd_ads_facts.sql │ ├── stg_yd_campaigns.sql │ ├── stg_yd_regions.sql │ └── stg_yd_sitelinks.sql │ ├── facebook │ ├── facebook.yml │ ├── stg_fb_ads.sql │ ├── stg_fb_ads_facts.sql │ ├── stg_fb_adsets.sql │ ├── stg_fb_campaigns.sql │ └── stg_fb_creatives.sql │ ├── ga │ ├── ga.yml │ ├── stg_ga_costs_facts.sql │ ├── stg_ga_devices.sql │ ├── stg_ga_events.sql │ ├── stg_ga_events_facts.sql │ ├── stg_ga_goals.sql │ ├── stg_ga_goals_facts.sql │ ├── stg_ga_mcf_facts.sql │ └── stg_ga_sessions_facts.sql │ ├── gaw │ ├── gaw.yml │ ├── stg_gaw_adgroups.sql │ ├── stg_gaw_ads.sql │ ├── stg_gaw_ads_facts.sql │ ├── stg_gaw_campaigns.sql │ ├── stg_gaw_keywords.sql │ ├── stg_gaw_keywords_facts.sql │ └── stg_gaw_location_criterions.sql │ ├── general │ ├── general.yml │ ├── stg_general_accounts.sql │ ├── stg_general_clientids.sql │ ├── stg_general_costs_facts.sql │ ├── stg_general_dates.sql │ ├── stg_general_locations.sql │ ├── stg_general_sites.sql │ └── stg_general_traffic.sql │ ├── metrika │ ├── metrika.yml │ ├── stg_ym_devices.sql │ ├── stg_ym_goals.sql │ ├── stg_ym_goals_facts.sql │ ├── stg_ym_purchases.sql │ ├── stg_ym_purchases_facts.sql │ └── stg_ym_sessions_facts.sql │ ├── mytarget │ ├── mytarget.yml │ ├── stg_mt_banners.sql │ ├── stg_mt_banners_facts.sql │ ├── stg_mt_campaigns.sql │ └── stg_mt_campaigns_facts.sql │ └── vkontakte │ ├── stg_vkontakte_ads.sql │ ├── stg_vkontakte_ads_facts.sql │ ├── stg_vkontakte_campaigns.sql │ ├── stg_vkontakte_campaigns_facts.sql │ ├── stg_vkontakte_groups.sql │ ├── stg_vkontakte_groups_facts.sql │ ├── stg_vkontakte_members.sql │ ├── stg_vkontakte_members_facts.sql │ ├── stg_vkontakte_posts.sql │ ├── stg_vkontakte_posts_facts.sql │ └── vkontakte.yml ├── packages.yml ├── snapshots └── .gitkeep └── tests └── .gitkeep /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @kzzzr 2 | .github/workflows @kzzzr -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: Continuous Integration Tests 2 | 3 | on: 4 | pull_request: 5 | branches: [ main ] 6 | env: 7 | DBT_PROJECT_DIR: integration_tests 8 | concurrency: 9 | group: ${{ github.ref }} 10 | cancel-in-progress: true 11 | 12 | jobs: 13 | postgresql: 14 | name: PostgreSQL CI 15 | timeout-minutes: 30 16 | env: 17 | DBT_TARGET: postgres 18 | DBT_SOURCE_DATABASE: postgres 19 | DBT_SOURCE_SCHEMA: public 20 | strategy: 21 | matrix: 22 | version: [12, 13, 14] 23 | services: 24 | postgres: 25 | image: postgres:${{ matrix.version }}-alpine 26 | ports: 27 | - 5432:5432 28 | env: 29 | POSTGRES_PASSWORD: postgres 30 | runs-on: ubuntu-latest 31 | steps: 32 | - uses: actions/checkout@v3 33 | - name: wait for services to start up 34 | run: sleep 10 35 | - name: dbt version 36 | uses: kzzzr/mybi-dbt-action@v4 37 | with: 38 | command: dbt --version 39 | - name: dbt debug 40 | uses: kzzzr/mybi-dbt-action@v4 41 | with: 42 | command: dbt debug 43 | - name: dbt deps 44 | uses: kzzzr/mybi-dbt-action@v4 45 | with: 46 | command: dbt deps 47 | - name: dbt seed 48 | uses: kzzzr/mybi-dbt-action@v4 49 | with: 50 | command: dbt seed --full-refresh 51 | - name: dbt build 52 | uses: kzzzr/mybi-dbt-action@v4 53 | with: 54 | command: dbt build --full-refresh 55 | - name: Setup tmate session 56 | uses: mxschmitt/action-tmate@v3 57 | if: ${{ failure() }} 58 | timeout-minutes: 30 59 | 60 | clickhouse: 61 | name: Clickhouse CI 62 | timeout-minutes: 30 63 | env: 64 | DBT_TARGET: clickhouse 65 | DBT_SOURCE_DATABASE: default 66 | DBT_SOURCE_SCHEMA: default 67 | strategy: 68 | matrix: 69 | version: [22.3, 22.7, 22.8] 70 | services: 71 | clickhouse: 72 | image: clickhouse/clickhouse-server:${{ matrix.version }} 73 | ports: 74 | - 9000:9000 75 | - 8123:8123 76 | runs-on: ubuntu-latest 77 | steps: 78 | - uses: actions/checkout@v3 79 | - name: wait for services to start up 80 | run: sleep 10 81 | - name: dbt version 82 | uses: kzzzr/mybi-dbt-action@v4 83 | with: 84 | command: dbt --version 85 | - name: dbt debug 86 | uses: kzzzr/mybi-dbt-action@v4 87 | with: 88 | command: dbt debug 89 | - name: dbt deps 90 | uses: kzzzr/mybi-dbt-action@v4 91 | with: 92 | command: dbt deps 93 | - name: dbt seed 94 | uses: kzzzr/mybi-dbt-action@v4 95 | with: 96 | command: dbt seed --full-refresh 97 | - name: dbt build 98 | uses: kzzzr/mybi-dbt-action@v4 99 | with: 100 | command: dbt build --full-refresh 101 | - name: Setup tmate session 102 | uses: mxschmitt/action-tmate@v3 103 | if: ${{ failure() }} 104 | timeout-minutes: 30 -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | target/ 2 | logs/ 3 | *.log 4 | .DS_Store 5 | 6 | dbt_modules/ 7 | dbt_packages/ 8 | 9 | integration_tests/.user.yml 10 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | ARG DBT_VERSION=1.0.0 2 | FROM fishtownanalytics/dbt:${DBT_VERSION} 3 | 4 | RUN set -ex \ 5 | && python -m pip install --upgrade pip setuptools \ 6 | && python -m pip install --upgrade dbt-postgres 'dbt-clickhouse>=1.2.2' 7 | 8 | WORKDIR /usr/app/ 9 | ENV DBT_PROFILES_DIR=. 10 | 11 | ENTRYPOINT ["tail", "-f", "/dev/null"] 12 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # dbt module to build DWH on top of myBI Connect data 2 | 3 | [![Continuous Integration Tests](https://github.com/kzzzr/mybi-dbt-core/actions/workflows/ci.yml/badge.svg)](https://github.com/kzzzr/mybi-dbt-core/actions/workflows/ci.yml) 4 | 5 | ![](https://habrastorage.org/webt/l8/9t/gu/l89tgucplrrnkg421ytbfceg7ia.png) 6 | 7 | [mybi-dbt-core](https://github.com/kzzzr/mybi-dbt-core) is [dbt](https://www.getdbt.com/) module to quick start transformations on top of data synced by [myBI Connect](https://connect.mybi.ru/) along with multiple useful macros. 8 | 9 | 🚀 Get experience with [myBI Market + dbt demo project](https://github.com/kzzzr/mybi-dbt-showcase) 10 | 11 | ## Installation instructions 12 | 13 | New to dbt packages? Read more about them [here](https://docs.getdbt.com/docs/building-a-dbt-project/package-management/). 14 | 15 | * Include this package in your `packages.yml` file 16 | * Run `dbt deps` to install the package 17 | 18 | ## Main features 19 | 20 | ### Supported Adapters 21 | - [x] [Clickhouse](https://docs.getdbt.com/reference/warehouse-setups/clickhouse-setup) 22 | - [x] [PostgreSQL](https://docs.getdbt.com/reference/warehouse-setups/postgres-setup) 23 | 24 | ### Sources 25 | Reference any data source from [sources.yml](models/sources/sources.yml) as `select * from source('general', 'dates')`: 26 | 27 | ### Models + Tests 28 | 29 | Access data tables as simple as `select * from ref('stg_yd_ads_facts')`: 30 | * filters on `account_id` applied 31 | * joined with date dimension 32 | * comprehensive data testing (`unique`, `not_null`, `relationships`) 33 | 34 | Supported data sources: 35 | * `general` – [General]() 36 | * `metrika` – [Yandex.Metrika](https://docs.mybi.ru/yandeks-metrika-beta-struktura-bazovoy-vygruzki/) 37 | * `direct` – [Yandex.Direct](https://docs.mybi.ru/yandeks-direkt-struktura-bazovoy-vygruzki/) 38 | * `ads` – [Google Ads](https://docs.mybi.ru/google-ads-struktura-bazovoy-vygruzki/) 39 | * `mytarget` – [myTarget](https://docs.mybi.ru/mytarget-struktura-bazovoy-vygruzki/) 40 | * `bitrix24` – [Bitrix24](https://docs.mybi.ru/bitriks24-struktura-bazovoy-vygruzki/) 41 | * `amocrm` – [AmoCRM](https://docs.mybi.ru/amocrm-struktura-bazovoy-vygruzki/) 42 | * `ga` – [Google Analytics](https://docs.mybi.ru/google-analytics-struktura-bazovoy-vygruzki/) 43 | * `currency` – [Currency exchange rates](https://docs.mybi.ru/kursy-valyut-struktura-bazovoy-vygruzki/) 44 | * `vkontakte` – [Vkontakte](https://docs.mybi.ru/vkontakte-struktura-bazovoy-vygruzki/) 45 | 46 | ### Macros 47 | 48 | * All the macros and tests from [dbt_utils](https://github.com/dbt-labs/dbt-utils) package are available 49 | * [source_filter_rows](macros/source_filter_rows.sql) macro to limit rows for specific accounts, dev/test environments 50 | * (WIP) [clean_up](macros/clean_up.sql) 51 | 52 | ## Demo project (tutorial) 53 | 54 | Get experience with worked example of this module usage: 55 | - 🚀 [myBI Market + dbt demo project](https://github.com/kzzzr/mybi-dbt-showcase) 56 | 57 | ## Contributing 58 | 59 | Development is done via Docker containers and .csv mock files. Refer to [integration_tests](integration_tests) folder. 60 | 61 | Any PR will be tested with [Continuous Integration workflow](.github/workflows/ci.yml) 62 | 63 | Development workflow looks like this: 64 | 65 | ```bash 66 | # launch containers: dbt, clickhouse, postgres 67 | docker-compose build --no-cache 68 | docker-compose up -d 69 | 70 | # enter container with dbt installed 71 | docker-compose exec dbt bash 72 | cd integration_tests/ 73 | 74 | # test connections 75 | dbt --version 76 | dbt debug --target clickhouse 77 | dbt debug --target postgres 78 | 79 | # Setup target variables 80 | export DBT_SOURCE_DATABASE=default DBT_SOURCE_SCHEMA=default # for Clickhouse 81 | export DBT_SOURCE_DATABASE=postgres DBT_SOURCE_SCHEMA=public # for Postgres 82 | 83 | # introduce any code changes 84 | 85 | # install dependencies (modules) 86 | dbt clean 87 | dbt deps 88 | 89 | # build and test on dummy data 90 | dbt seed --full-refresh 91 | dbt build --full-refresh 92 | 93 | # exit container and clean up 94 | docker-compose down 95 | ``` 96 | -------------------------------------------------------------------------------- /analysis/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kzzzr/mybi-dbt-core/1bfb6b02352e676ccbf203f643a050c9c2da8dd6/analysis/.gitkeep -------------------------------------------------------------------------------- /data/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kzzzr/mybi-dbt-core/1bfb6b02352e676ccbf203f643a050c9c2da8dd6/data/.gitkeep -------------------------------------------------------------------------------- /dbt_project.yml: -------------------------------------------------------------------------------- 1 | name: 'mybi_dbt_core' 2 | version: '1.0.0' 3 | config-version: 2 4 | 5 | require-dbt-version: [">=1.2.0", "<2.0.0"] 6 | 7 | profile: 'mybi_dbt_core' 8 | 9 | model-paths: ["models"] 10 | test-paths: ["tests"] 11 | seed-paths: ["data"] 12 | macro-paths: ["macros"] 13 | snapshot-paths: ["snapshots"] 14 | 15 | target-path: "target" 16 | clean-targets: 17 | - "target" 18 | - "dbt_packages" 19 | 20 | quoting: 21 | database: True 22 | schema: True 23 | identifier: True 24 | 25 | vars: 26 | limit_data_days: 5 27 | 28 | # dbt_source_database: null 29 | # dbt_source_schema: null 30 | 31 | account_id_ads: null 32 | account_id_amocrm: null 33 | account_id_bitrix24: null 34 | account_id_currency: null 35 | account_id_direct: null 36 | account_id_facebook: null 37 | account_id_ga: null 38 | account_id_gaw: null 39 | account_id_metrika: null 40 | account_id_mytarget: null 41 | account_id_vkontakte: null 42 | 43 | caption_ads: 'google_ads' 44 | caption_amocrm: 'amocrm' 45 | caption_bitrix24: 'bitrix24' 46 | caption_direct: 'yandex_direct' 47 | caption_facebook: 'facebook' 48 | caption_ga: 'google_analytics' 49 | caption_gaw: 'google_adwords' 50 | caption_metrika: 'yandex_metrika' 51 | caption_mytarget: 'mytarget' 52 | caption_vkontakte: 'vkontakte' 53 | 54 | models: 55 | 56 | mybi_dbt_core: 57 | +materialized: table 58 | +enabled: true 59 | 60 | staging: 61 | +schema: staging 62 | +tags: ["staging"] 63 | 64 | ads: 65 | +tags: ["ads"] 66 | amocrm: 67 | +tags: ["amocrm"] 68 | bitrix24: 69 | +tags: ["bitrix24"] 70 | currencies: 71 | +tags: ["currencies"] 72 | direct: 73 | +tags: ["direct"] 74 | facebook: 75 | +tags: ["facebook"] 76 | ga: 77 | +tags: ["ga"] 78 | gaw: 79 | +tags: ["gaw"] 80 | general: 81 | +tags: ["general"] 82 | metrika: 83 | +tags: ["metrika"] 84 | mytarget: 85 | +tags: ["mytarget"] 86 | vkontakte: 87 | +enabled: false 88 | +tags: ["vkontakte"] -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '2' 2 | services: 3 | 4 | dbt: 5 | build: . 6 | volumes: 7 | - .:/usr/app/ 8 | ports: 9 | - "8080:8080" 10 | 11 | clickhouse: 12 | image: clickhouse/clickhouse-server:22.3 13 | ports: 14 | - 9000:9000 15 | - 8123:8123 16 | 17 | postgres: 18 | image: postgres:14-alpine 19 | ports: 20 | - 5432:5432 21 | environment: 22 | - POSTGRES_PASSWORD=postgres 23 | -------------------------------------------------------------------------------- /integration_tests/clickhouse/users_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /integration_tests/data/ads/ads_adgroups.csv: -------------------------------------------------------------------------------- 1 | "id","account_id","adgroup_id","name","status","tracking_url_template","url_custom_parameters" 2 | 34,35960,122437504930,Брендовые запросы,ENABLED,,[] 3 | 35,35960,126976374373,массовая смс рассылка через интернет,ENABLED,,[] 4 | 36,35960,126976374653,купить/закзать смс рассылку,ENABLED,,[] 5 | 37,35960,126976375093,лучшие смс рассылки,ENABLED,,[] 6 | 38,35960,126976376853,рекламная рассылка смс,ENABLED,,[] 7 | 39,35960,126976377013,сервис смс рассылки,ENABLED,,[] 8 | 40,35960,126976377533,массовые смс рассылки,ENABLED,,[] 9 | 41,35960,126976377573,смс рассылка через,ENABLED,,[] 10 | 42,35960,126976377813,рассылка sms сообщений,ENABLED,,[] 11 | 47,35960,131178613150,рассылка WhatsApp с компьютера,ENABLED,,[] 12 | 48,35960,131178613590,WhatsApp рассылка онлайн,ENABLED,,[] 13 | 50,35960,131178614110,массовая рассылка WhatsApp,ENABLED,,[] 14 | 51,35960,131178614150,автоматическая рассылка WhatsApp,ENABLED,,[] 15 | 53,35960,131178614790,WhatsApp рассылка,ENABLED,,[] 16 | 54,35960,131178615590,сервис WhatsApp рассылок,ENABLED,,[] 17 | -------------------------------------------------------------------------------- /integration_tests/data/ads/ads_ads.csv: -------------------------------------------------------------------------------- 1 | "id","account_id","ad_id","display_url","final_urls","tracking_url_template","url_custom_parameters","type","headline","headline_part_one","headline_part_two","description","description_part_one","description_part_two","path_one","path_two","status","approval_status","phone_number","final_mobile_urls" 2 | 41,35960,546293753210,,"URL",,[],EXPANDED_TEXT_AD,,Автоматическая Рассылка СМС,Минимальный пакет SMS 999 руб.,"50 руб уже на счету. Защита Вашей базы! Online оплата, Акции, Скидки, Бонусы.",,,СМС_рассылка,Для_бизнеса,ENABLED,APPROVED,,[] 3 | 42,35960,546293753222,,"URL",,[],EXPANDED_TEXT_AD,,"Заказать СМС Рассылку от 2,11р",Минимальный пакет SMS 999 руб.,"50 руб уже на счету. Защита Вашей базы! Online оплата, Акции, Скидки, Бонусы.",,,СМС_рассылка,Для_бизнеса,ENABLED,APPROVED,,[] 4 | 43,35960,546293753237,,"URL",,[],EXPANDED_TEXT_AD,,"Лучшие СМС Рассылки от 2,11р",Минимальный пакет SMS 999 руб.,"50 руб уже на счету. Защита Вашей базы! Online оплата, Акции, Скидки, Бонусы.",,,СМС_рассылка,Для_бизнеса,ENABLED,APPROVED,,[] 5 | 44,35960,546293753438,,"URL",,[],EXPANDED_TEXT_AD,,СМС рассылка рекламы от 39к,Минимальный пакет SMS 999 руб.,"50 руб уже на счету. Защита Вашей базы! Online оплата, Акции, Скидки, Бонусы.",,,СМС_рассылка,Для_бизнеса,ENABLED,APPROVED,,[] 6 | 45,35960,546293753441,,"URL",,[],EXPANDED_TEXT_AD,,Рекламная Рассылка СМС от 39к,Минимальный пакет SMS 999 руб.,"50 руб уже на счету. Защита Вашей базы! Online оплата, Акции, Скидки, Бонусы.",,,СМС_рассылка,Для_бизнеса,ENABLED,APPROVED,,[] 7 | 46,35960,546293753444,,"URL",,[],EXPANDED_TEXT_AD,,Служба Массовой Рассылки СМС,Минимальный пакет SMS 999 руб.,"50 руб уже на счету. Защита Вашей базы! Online оплата, Акции, Скидки, Бонусы.",,,СМС_рассылка,Для_бизнеса,ENABLED,APPROVED,,[] 8 | 47,35960,546293753447,,"URL",,[],EXPANDED_TEXT_AD,,Сервис Массовой Рассылки СМС,Минимальный пакет SMS 999 руб.,"50 руб уже на счету. Защита Вашей базы! Online оплата, Акции, Скидки, Бонусы.",,,СМС_рассылка,Для_бизнеса,ENABLED,APPROVED,,[] 9 | 48,35960,546293753474,,"URL",,[],EXPANDED_TEXT_AD,,"Массовые СМС Рассылки от 2,11р",Минимальный пакет SMS 999 руб.,"50 руб уже на счету. Защита Вашей базы! Online оплата, Акции, Скидки, Бонусы.",,,СМС_рассылка,Для_бизнеса,ENABLED,APPROVED,,[] 10 | 49,35960,546293753477,,"URL",,[],EXPANDED_TEXT_AD,,"Массовые СМС Рассылки от 2,11р",Минимальный пакет SMS 999 руб.,"50 руб уже на счету. Защита Вашей базы! Online оплата, Акции, Скидки, Бонусы.",,,СМС_рассылка,Для_бизнеса,ENABLED,APPROVED,,[] 11 | 50,35960,546293753480,,"URL",,[],EXPANDED_TEXT_AD,,"СМС Рассылка от 2,11 руб.",Минимальный пакет SMS 999 руб.,"50 руб уже на счету. Защита Вашей базы! Online оплата, Акции, Скидки, Бонусы.",,,СМС_рассылка,Для_бизнеса,ENABLED,APPROVED,,[] 12 | 51,35960,546293753489,,"URL",,[],EXPANDED_TEXT_AD,,"Рассылка SMS от 2,11 руб",Минимальный пакет SMS 999 руб.,"50 руб уже на счету. Защита Вашей базы! Online оплата, Акции, Скидки, Бонусы.",,,СМС_рассылка,Для_бизнеса,ENABLED,APPROVED,,[] 13 | 52,35960,546293753492,,"URL",,[],EXPANDED_TEXT_AD,,"Рассылка SMS от 2,11 руб",Минимальный пакет SMS 999 руб.,"50 руб уже на счету. Защита Вашей базы! Online оплата, Акции, Скидки, Бонусы.",,,СМС_рассылка,Для_бизнеса,ENABLED,APPROVED,,[] 14 | -------------------------------------------------------------------------------- /integration_tests/data/ads/ads_campaigns.csv: -------------------------------------------------------------------------------- 1 | "id","account_id","campaign_id","name","status","serving_status","ad_serving_optimization_status","advertising_channel_type","advertising_channel_sub_type","tracking_url_template","app_id","app_vendor","url_custom_parameters" 2 | 5,35960,14662697017,[Поиск ] СМС рассылка,PAUSED,SERVING,OPTIMIZE,SEARCH,,{lpurl}?utm_source=google&utm_medium=cpc&utm_campaign=SMS_rassylka_na_poiske_rf&utm_content={creative}&utm_term={keyword}.{matchtype}®ion={region_id}®ion_name={region_name}.{device}.{devicemodel}.{target}.{match},,,[] 3 | 6,35960,14662697215,[Поиск ] WhatsApp,PAUSED,SERVING,OPTIMIZE,SEARCH,,{lpurl}?utm_source=google&utm_medium=cpc&utm_campaign=WhatsApp_na_poiske_rf&utm_content={creative}&utm_term={keyword}.{matchtype}®ion={region_id}®ion_name={region_name}.{device}.{devicemodel}.{target}.{match},,,[] 4 | 7,35960,14664592973,[Поиск ] Рассылка телеграм,PAUSED,SERVING,OPTIMIZE,SEARCH,,{lpurl}?utm_source=google&utm_medium=cpc&utm_campaign=Telegram_na_Poiske_rf&utm_content={creative}&utm_term={keyword}.{matchtype}®ion={region_id}®ion_name={region_name}.{device}.{devicemodel}.{target}.{match},,,[] 5 | 8,35960,14664600173,[Поиск ] Блог,PAUSED,SERVING,OPTIMIZE,SEARCH,,{lpurl}?utm_source=google&utm_medium=cpc&utm_campaign=Poisk_Blog_rf&utm_content={creative}&utm_term={keyword}.{matchtype}®ion={region_id}®ion_name={region_name}.{device}.{devicemodel}.{target}.{match},,,[] 6 | 9,35960,14664600659,[Поиск ] СМС Дар брендовые запросы,PAUSED,SERVING,OPTIMIZE,SEARCH,,{lpurl}?utm_source=google&utm_medium=cpc&utm_campaign=Poisk_Brendovye_rf&utm_content={creative}&utm_term={keyword}.{matchtype}®ion={region_id}®ion_name={region_name}.{device}.{devicemodel}.{target}.{match},,,[] 7 | 2,35957,797217301,СМС рассылка / На поиске,PAUSED,SERVING,OPTIMIZE,SEARCH,,{lpurl}?utm_source=google&utm_medium=cpc&utm_campaign=Poisk_SMS&utm_content={creative}&utm_term={keyword}®ion={region_id}®ion_name={region_name}.{device}.{devicemodel}.{target}.{match},,,[] 8 | 3,35957,805020912,WhatsApp / На поиске,PAUSED,SERVING,OPTIMIZE,SEARCH,,{lpurl}?utm_source=google&utm_medium=cpc&utm_campaign=Poisk_Whatsapp&utm_content={creative}&utm_term={keyword}®ion={region_id}®ion_name={region_name}.{device}.{devicemodel}.{target}.{match},,,[] 9 | 18,35964,11970798397,Блог / На поиске,ENABLED,SERVING,OPTIMIZE,SEARCH,,{lpurl}?utm_source=google&utm_medium=cpc&utm_campaign=Poisk_Blog&utm_content={creative}&utm_term={keyword}®ion={region_id}®ion_name={region_name}.{device}.{devicemodel}.{target}.{match},,,[] 10 | 19,35960,14662697257,[Поиск ] HLR запрос,PAUSED,SERVING,OPTIMIZE,SEARCH,,{lpurl}?utm_source=google&utm_medium=cpc&utm_campaign=HLR_na_poiske_rf&utm_content={creative}&utm_term={keyword}.{matchtype}®ion={region_id}®ion_name={region_name}.{device}.{devicemodel}.{target}.{match},,,[] 11 | 20,35960,14958621961,[Discovery] СМС рассылка,PAUSED,SERVING,OPTIMIZE,UNKNOWN,,,,,[] 12 | 21,35960,14960564105,[Discovery] WhatsApp,PAUSED,SERVING,OPTIMIZE,UNKNOWN,,,,,[] 13 | 25,35960,15421433460,Discovery | WhatsApp | РФ,PAUSED,SERVING,OPTIMIZE,UNKNOWN,,{lpurl}?utm_source=google&utm_medium=cpc&utm_campaign=Discovery_WhatsApp&utm_content={creative}&utm_term={keyword}.{matchtype}®ion={region_id}®ion_name={region_name}.{device}.{devicemodel}.{target}.{match},,,[] 14 | 27,35961,6466854472,WhatsApp / На поиске | РФ,PAUSED,SERVING,OPTIMIZE,SEARCH,,{lpurl}?utm_medium=cpc&utm_source=google.search&utm_campaign=WhatsApp_na_poiske&utm_content={creative}&utm_term={keyword}&utm_phrase={targetid}&utm_stage={placement},,,[] 15 | 28,35961,6466855165,СМС рассылка / На поиске | РФ,PAUSED,SERVING,OPTIMIZE,SEARCH,,{lpurl}?utm_medium=cpc&utm_source=google.search&utm_campaign=SMS_rassylka_na_poiske&utm_content={creative}&utm_term={keyword}&utm_phrase={targetid}&utm_stage={placement},,,[] 16 | 29,35961,8291214870,Рассылка телеграм/ На поиске | РФ,PAUSED,SERVING,OPTIMIZE,SEARCH,,,,,[] 17 | 30,35961,11863473288,СМС Дар брендовые запросы | РФ,PAUSED,SERVING,OPTIMIZE,SEARCH,,{lpurl}?utm_medium=cpc&utm_source=google.search&utm_campaign=WhatsApp_na_poiske&utm_content={creative}&utm_term={keyword}&utm_phrase={targetid}&utm_stage={placement},,,[] 18 | 31,35961,12089682886,Блог/Поиск | РФ,PAUSED,SERVING,OPTIMIZE,SEARCH,,{lpurl}?utm_medium=cpc&utm_source=google.search&utm_campaign=WhatsApp_na_poiske&utm_content={creative}&utm_term={keyword}&utm_phrase={targetid}&utm_stage={placement},,,[] 19 | 32,35961,14643214696,СМС рассылка / На поиске | МСК,PAUSED,SERVING,OPTIMIZE,SEARCH,,{lpurl}?utm_medium=cpc&utm_source=google.search&utm_campaign=SMS_rassylka_na_poiske&utm_content={creative}&utm_term={keyword}&utm_phrase={targetid}&utm_stage={placement},,,[] 20 | 33,35961,14643215014,Рассылка телеграм/ На поиске | МСК,PAUSED,SERVING,OPTIMIZE,SEARCH,,,,,[] 21 | 34,35964,11073204678,HLR запрос/Поиск,PAUSED,SERVING,OPTIMIZE,SEARCH,,,,,[] 22 | 35,35957,10741495871,HLR запрос/Поиск,PAUSED,SERVING,OPTIMIZE,SEARCH,,{lpurl}?utm_source=google.search&utm_medium=cpc&utm_campaign=google_{network}&utm_content={creative}&utm_term={keyword}.{matchtype}.{device}.{devicemodel}.{target}.{adposition},,,[] 23 | 36,35957,12086634632,Блог/Поиск,PAUSED,SERVING,OPTIMIZE,SEARCH,,{lpurl}?utm_source=google&utm_medium=cpc&utm_campaign=Poisk_Blog&utm_content={creative}&utm_term={keyword}.{matchtype}®ion={region_id}®ion_name={region_name}.{device}.{devicemodel}.{target}.{match},,,[] 24 | 37,35961,6466855336,Вайбер / На поиске,PAUSED,SERVING,OPTIMIZE,SEARCH,,{lpurl}?utm_medium=cpc&utm_source=google.search&utm_campaign=Viber_na_poiske&utm_content={creative}&utm_term={keyword}&utm_phrase={targetid}&utm_stage={placement},,,[] 25 | 38,35961,9635730413,Remarketing / KMS,PAUSED,SERVING,OPTIMIZE,DISPLAY,,{lpurl}?utm_source=google.context&utm_medium=cpc&utm_campaign=Remarketing_KMS&network={network}&placement={placement}&position={adposition}&campaignid={campaignid}&adgroupid={adgroupid}&adid={creative}&match={matchtype}&keyword={keyword}&device={device}&devicemodel={devicemodel},,,[] 26 | 39,35961,11154042909,HLR запрос/Поиск | РФ,PAUSED,SERVING,OPTIMIZE,SEARCH,,,,,[] 27 | 40,35960,15568738030,Ретаргетинг | WhatsApp | РФ,ENABLED,SERVING,OPTIMIZE,DISPLAY,,{lpurl}?utm_source=google&utm_medium=cpc&utm_campaign=Retargeting_WhatsApp&utm_content={creative}&utm_term={keyword}.{matchtype}®ion={region_id}®ion_name={region_name}.{device}.{devicemodel}.{target}.{match},,,[] 28 | 41,35957,15851548791,Perfomanse_Max/WhatsApp/РФ,PAUSED,SERVING,OPTIMIZE,PERFORMANCE_MAX,,{lpurl}?utm_source=google&utm_medium=cpc&utm_campaign=PM_WhatsApp&utm_content={creative}&utm_term={keyword}®ion={region_id}®ion_name={region_name}.{device}.{devicemodel}.{target}.{match},,,[] 29 | 47,35960,15568731037,Ремаркетинг | Telegram | РФ,ENABLED,SERVING,OPTIMIZE,DISPLAY,,{lpurl}?utm_source=google&utm_medium=cpc&utm_campaign=Retargeting_Telegram&utm_content={creative}&utm_term={keyword}.{matchtype}®ion={region_id}®ion_name={region_name}.{device}.{devicemodel}.{target}.{match},,,[] 30 | 48,35960,15571967906,Ремаркетинг | SMS | РФ,ENABLED,SERVING,OPTIMIZE,DISPLAY,,{lpurl}?utm_source=google&utm_medium=cpc&utm_campaign=Retargeting_SMS&utm_content={creative}&utm_term={keyword}.{matchtype}®ion={region_id}®ion_name={region_name}.{device}.{devicemodel}.{target}.{match},,,[] 31 | -------------------------------------------------------------------------------- /integration_tests/data/ads/ads_keywords.csv: -------------------------------------------------------------------------------- 1 | "id","account_id","keyword_id","name","final_urls","status","first_page_cpc","top_of_page_cpc","final_mobile_urls","tracking_url_template","url_custom_parameters" 2 | 86,35960,17013209198,сервис смс рассылок,[],ENABLED,0,0,[],,[] 3 | 87,35960,23340616725,стоимость смс рассылки,[],ENABLED,0,0,[],,[] 4 | 95,35960,296958436976,смс рассылка по базе номеров,[],ENABLED,0,0,[],,[] 5 | 104,35960,306267164549,массовая смс рассылка через интернет,[],ENABLED,0,0,[],,[] 6 | 109,35960,310097563403,заказать смс рассылку,[],ENABLED,0,0,[],,[] 7 | 110,35960,310097563563,купить смс рассылку,[],ENABLED,0,0,[],,[] 8 | 111,35960,311440196541,рекламная рассылка смс,[],ENABLED,0,0,[],,[] 9 | 113,35960,319189014370,лучшие смс рассылки,[],ENABLED,0,0,[],,[] 10 | 115,35960,319526662543,рассылка смс по базе,[],ENABLED,0,0,[],,[] 11 | 119,35960,372012863160,смс рассылка по геолокации,[],ENABLED,0,0,[],,[] 12 | 120,35960,375406695059,стоимость смс рассылок,[],ENABLED,0,0,[],,[] 13 | 135,35960,425516772678,смс рассылка россия,[],ENABLED,0,0,[],,[] 14 | 136,35960,425575707755,сервис смс рассылок россия,[],ENABLED,0,0,[],,[] 15 | 164,35960,1074915425944,смс дар,[],PAUSED,0,0,[],,[] 16 | 171,35960,1423137122070,смс дар,[],PAUSED,0,0,[],,[] 17 | 172,35960,1423137122310,смс даром,[],PAUSED,0,0,[],,[] 18 | -------------------------------------------------------------------------------- /integration_tests/data/amocrm/amocrm_companies.csv: -------------------------------------------------------------------------------- 1 | "id","account_id","company_id","name","phone","email","site","is_deleted" 2 | 1,20652,0,,,,,0 3 | -------------------------------------------------------------------------------- /integration_tests/data/amocrm/amocrm_contacts.csv: -------------------------------------------------------------------------------- 1 | "id","account_id","contact_id","name","company","post","phone","email","request_id","is_deleted" 2 | 88,20652,7448329,name,,,phone,email,,0 3 | 143,20652,8306145,name,,,phone,email,,0 4 | 151,20652,8313211,name,,,phone,email,,0 5 | 246,20652,9004981,name,,,phone,email,,0 6 | 288,20652,9223425,name,,,phone,email,,0 7 | 330,20652,9604501,name,,,phone,email,,0 8 | 336,20652,9629111,name,,,phone,email,,0 9 | 418,20652,10030981,name,,,phone,email,,0 10 | 432,20652,10120569,name,,,phone,email,,0 11 | 433,20652,10125011,name,,,phone,email,,0 12 | 484,20652,10574527,name,,,phone,email,,0 13 | 551,20652,11203797,name,,,phone,email,,0 14 | 679,20652,12529181,name,,,phone,email,,0 15 | 714,20652,12917313,name,,,phone,email,,0 16 | 837,20652,13701385,name,,,phone,email,,0 17 | 869,20652,13760603,name,,,phone,email,,0 18 | 896,20652,13938277,name,,,phone,email,,0 19 | 910,20652,13964143,name,,,phone,email,,0 20 | 2082,20652,15522749,name,,,phone,email,,0 21 | 2151,20652,15767241,name,,,phone,email,,0 22 | 2218,20652,15888487,name,,,phone,email,,0 23 | 2275,20652,15996877,name,,,phone,email,,0 24 | 2346,20652,16156439,name,,,phone,email,,0 25 | 2362,20652,16198267,name,,,phone,email,,0 26 | 2383,20652,16215945,name,,,phone,email,,0 27 | 2417,20652,16303993,name,,,phone,email,,0 28 | 4943,20652,16969845,name,,,phone,email,,0 29 | 4959,20652,17000309,name,,,phone,email,,0 30 | 4992,20652,17109155,name,,,phone,email,,0 31 | 5030,20652,17173773,name,,,phone,email,,0 32 | 5135,20652,17439439,name,,,phone,email,,0 33 | 5168,20652,17483703,name,,,phone,email,,0 34 | 5174,20652,17490517,name,,,phone,email,,0 35 | 5255,20652,17609265,name,,,phone,email,,0 36 | 5301,20652,17655141,name,,,phone,email,,0 37 | 5347,20652,17705309,name,,,phone,email,,0 38 | 5353,20652,17709891,name,,,phone,email,,0 39 | 5390,20652,17751767,name,,,phone,email,,0 40 | 5455,20652,17830155,name,,,phone,email,,0 41 | 5456,20652,17830857,name,,,phone,email,,0 42 | 5457,20652,17832625,name,,,phone,email,,0 43 | 5458,20652,17832897,name,,,phone,email,,0 44 | 5460,20652,17834173,name,,,phone,email,,0 45 | 5461,20652,17836641,name,,,phone,email,,0 46 | 5462,20652,17837093,name,,,phone,email,,0 47 | 5463,20652,17838261,name,,,phone,email,,0 48 | 5464,20652,17839829,name,,,phone,email,,0 49 | 5466,20652,17841955,name,,,phone,email,,0 50 | 5467,20652,17842073,name,,,phone,email,,0 51 | 5468,20652,17842963,name,,,phone,email,,0 52 | 5469,20652,17845243,name,,,phone,email,,0 53 | 5470,20652,17854365,name,,,phone,email,,0 54 | 5472,20652,17864799,name,,,phone,email,,0 55 | 5473,20652,17869345,name,,,phone,email,,0 56 | 5474,20652,17879085,name,,,phone,email,,0 57 | 5475,20652,17881227,name,,,phone,email,,0 58 | 5476,20652,17882131,name,,,phone,email,,0 59 | 5477,20652,17882717,name,,,phone,email,,0 60 | 5478,20652,17883981,name,,,phone,email,,0 61 | 5479,20652,17887467,name,,,phone,email,,0 62 | 5480,20652,17888741,name,,,phone,email,,0 63 | 5481,20652,17888851,name,,,phone,email,,0 64 | 5482,20652,17892669,name,,,phone,email,,0 65 | 5483,20652,17893641,name,,,phone,email,,0 66 | 5484,20652,17893803,name,,,phone,email,,0 67 | 5485,20652,17893979,name,,,phone,email,,0 68 | 5486,20652,17894471,name,,,phone,email,,0 69 | 5487,20652,17894677,name,,,phone,email,,0 70 | 5488,20652,17895103,name,,,phone,email,,0 71 | 5490,20652,17897215,name,,,phone,email,,0 72 | 5491,20652,17898195,name,,,phone,email,,0 73 | 5492,20652,17899255,name,,,phone,email,,0 74 | 5493,20652,17902909,name,,,phone,email,,0 75 | 5494,20652,17915273,name,,,phone,email,,0 76 | 5497,20652,17917489,name,,,phone,email,,0 77 | 5498,20652,17918101,name,,,phone,email,,0 78 | 5499,20652,17918535,name,,,phone,email,,0 79 | 5500,20652,17918591,name,,,phone,email,,0 80 | 5501,20652,17919167,name,,,phone,email,,0 81 | 5502,20652,17921645,name,,,phone,email,,0 82 | 5503,20652,17922645,name,,,phone,email,,0 83 | 5504,20652,17931881,name,,,phone,email,,0 84 | 5505,20652,17935653,name,,,phone,email,,0 85 | 5506,20652,17935699,name,,,phone,email,,0 86 | 5507,20652,17935721,name,,,phone,email,,0 87 | 5508,20652,17937709,name,,,phone,email,,0 88 | 5509,20652,17937913,name,,,phone,email,,0 89 | 5510,20652,17938607,name,,,phone,email,,0 90 | 5511,20652,17938815,name,,,phone,email,,0 91 | 5512,20652,17939703,name,,,phone,email,,0 92 | 5513,20652,17939809,name,,,phone,email,,0 93 | 5514,20652,17939921,name,,,phone,email,,0 94 | 5515,20652,17940085,name,,,phone,email,,0 95 | 5516,20652,17940219,name,,,phone,email,,0 96 | -------------------------------------------------------------------------------- /integration_tests/data/amocrm/amocrm_leads_facts.csv: -------------------------------------------------------------------------------- 1 | "account_id","clientids_id","users_id","leads_id","contacts_id","companies_id","unsorteds_id","created_id","closed_id","price" 2 | 20652,1,2,2852,5516,1,1,161467,359,"0,00" 3 | 20652,1,2,2851,5515,1,1,161466,359,"0,00" 4 | 20652,1,2,2850,5514,1,1,161465,359,"0,00" 5 | 20652,1,2,2849,5513,1,1,161464,359,"0,00" 6 | 20652,1,2,2848,5512,1,1,161463,359,"0,00" 7 | 20652,1,2,2846,5510,1,1,161462,359,"0,00" 8 | 20652,1,6,2845,2082,1,1,161461,359,"5000,00" 9 | 20652,1,3,2844,4959,1,1,161460,359,"4900,00" 10 | 20652,1,6,2841,2151,1,1,161459,359,"5626,00" 11 | 20652,1,7,2840,5509,1,1,161458,359,"0,00" 12 | 20652,1,7,2839,5508,1,1,161457,359,"0,00" 13 | 20652,1,7,2837,5507,1,1,161456,359,"0,00" 14 | 20652,1,3,2836,5506,1,1,161455,359,"5000,00" 15 | 20652,1,7,2835,5505,1,1,161454,359,"0,00" 16 | 20652,1,7,2833,5504,1,1,161453,359,"0,00" 17 | 20652,1,7,2832,5503,1,1,161452,359,"0,00" 18 | 20652,1,7,2831,5502,1,1,161451,161476,"0,00" 19 | 20652,1,6,2842,418,1,1,161330,359,"4625,00" 20 | 20652,1,2,2847,5511,1,1,161120,359,"0,00" 21 | 20652,1,6,2843,910,1,1,161114,359,"5625,00" 22 | 20652,1,7,2838,5347,1,1,161097,359,"4900,00" 23 | 20652,1,6,2834,5390,1,1,161023,359,"4500,00" 24 | 20652,1,7,2830,5501,1,1,160692,161469,"0,00" 25 | 20652,1,7,2829,5500,1,1,160691,161468,"0,00" 26 | 20652,1,1,2827,5498,1,1,160690,359,"0,00" 27 | 20652,1,7,2826,5497,1,1,160689,359,"0,00" 28 | 20652,1,3,2825,432,1,1,160688,359,"5000,00" 29 | 20652,1,3,2824,330,1,1,160687,359,"5000,00" 30 | 20652,1,3,2823,4943,1,1,160686,359,"5000,00" 31 | 20652,1,3,2822,5135,1,1,160685,359,"5000,00" 32 | 20652,1,3,2821,896,1,1,160684,359,"5000,00" 33 | 20652,1,3,2820,837,1,1,160683,359,"5000,00" 34 | 20652,1,3,2819,5174,1,1,160682,359,"5000,00" 35 | 20652,1,3,2818,2417,1,1,160681,359,"5000,00" 36 | 20652,1,3,2817,5494,1,1,160680,160703,"0,00" 37 | 20652,1,3,2816,2362,1,1,160679,359,"5000,00" 38 | 20652,1,6,2815,837,1,1,160678,359,"4500,00" 39 | 20652,1,3,2814,551,1,1,160677,359,"5000,00" 40 | 20652,1,3,2813,4992,1,1,160676,359,"5000,00" 41 | 20652,1,3,2811,5030,1,1,160675,359,"5000,00" 42 | 20652,1,3,2810,433,1,1,160674,359,"5000,00" 43 | 20652,1,6,2812,2218,1,1,160360,359,"5625,00" 44 | 20652,1,7,2828,5499,1,1,160267,359,"0,00" 45 | 20652,1,6,2809,714,1,1,160075,359,"4500,00" 46 | 20652,1,3,2808,5493,1,1,159797,359,"0,00" 47 | 20652,1,3,2806,5492,1,1,159796,161473,"0,00" 48 | 20652,1,3,2805,5491,1,1,159795,359,"0,00" 49 | 20652,1,3,2804,5490,1,1,159794,359,"0,00" 50 | 20652,1,6,2803,88,1,1,159793,359,"5625,00" 51 | 20652,1,3,2800,5487,1,1,159792,359,"0,00" 52 | 20652,1,3,2799,5486,1,1,159791,359,"0,00" 53 | 20652,1,3,2798,5485,1,1,159790,161475,"0,00" 54 | 20652,1,3,2797,5484,1,1,159789,359,"0,00" 55 | 20652,1,3,2807,5462,1,1,159480,359,"4900,00" 56 | 20652,1,3,2801,5488,1,1,159348,159804,"0,00" 57 | 20652,1,3,2796,5483,1,1,159122,359,"0,00" 58 | 20652,1,3,2795,5482,1,1,159121,359,"0,00" 59 | 20652,1,7,2793,5481,1,1,159120,359,"0,00" 60 | 20652,1,3,2792,5480,1,1,159119,359,"0,00" 61 | 20652,1,6,2791,143,1,1,159118,359,"5625,00" 62 | 20652,1,6,2790,679,1,1,159117,359,"5625,00" 63 | 20652,1,3,2789,5479,1,1,159116,160707,"0,00" 64 | 20652,1,7,2787,5478,1,1,159115,359,"0,00" 65 | 20652,1,6,2788,5168,1,1,158734,359,"4900,00" 66 | 20652,1,7,2786,5477,1,1,158367,359,"0,00" 67 | 20652,1,7,2785,5476,1,1,158366,159127,"0,00" 68 | 20652,1,7,2784,5475,1,1,158365,159131,"0,00" 69 | 20652,1,6,2782,5456,1,1,158364,160694,"36450,00" 70 | 20652,1,6,2781,5347,1,1,158363,161477,"4900,00" 71 | 20652,1,6,2780,2275,1,1,158362,359,"5000,00" 72 | 20652,1,7,2779,5473,1,1,158361,359,"0,00" 73 | 20652,1,6,2778,288,1,1,158360,359,"5625,00" 74 | 20652,1,6,2777,246,1,1,158045,359,"5625,00" 75 | 20652,1,3,2783,5474,1,1,157971,158377,"0,00" 76 | 20652,1,6,2776,151,1,1,157896,359,"5625,00" 77 | 20652,1,7,2775,5472,1,1,157638,158375,"0,00" 78 | 20652,1,7,2774,5255,1,1,157637,359,"4900,00" 79 | 20652,1,7,2773,5470,1,1,157636,359,"0,00" 80 | 20652,1,7,2772,5469,1,1,157091,359,"0,00" 81 | 20652,1,3,2771,5301,1,1,157090,359,"0,00" 82 | 20652,1,3,2794,5301,1,1,157090,159805,"0,00" 83 | 20652,1,6,2770,2346,1,1,157089,359,"4900,00" 84 | 20652,1,6,2769,869,1,1,157088,359,"5625,00" 85 | 20652,1,6,2767,2383,1,1,157087,359,"4900,00" 86 | 20652,1,6,2764,484,1,1,157086,359,"4000,00" 87 | 20652,1,7,2763,5468,1,1,157085,157106,"0,00" 88 | 20652,1,7,2761,5467,1,1,157084,158376,"0,00" 89 | 20652,1,3,2760,5466,1,1,157083,158369,"0,00" 90 | 20652,1,7,2758,5464,1,1,157082,157102,"0,00" 91 | 20652,1,7,2757,5463,1,1,157081,359,"0,00" 92 | 20652,1,6,2756,5462,1,1,157080,159808,"4900,00" 93 | 20652,1,7,2755,5461,1,1,157079,160700,"0,00" 94 | 20652,1,6,2754,5353,1,1,157078,359,"4900,00" 95 | 20652,1,7,2753,5460,1,1,157077,359,"0,00" 96 | 20652,1,7,2752,5458,1,1,157076,359,"0,00" 97 | 20652,1,7,2751,5457,1,1,157075,359,"0,00" 98 | 20652,1,7,2750,5347,1,1,157074,359,"1250,00" 99 | 20652,1,6,2749,5456,1,1,157073,160693,"36450,00" 100 | 20652,1,3,2747,5455,1,1,157072,359,"0,00" 101 | 20652,1,6,2768,336,1,1,156676,359,"5625,00" 102 | -------------------------------------------------------------------------------- /integration_tests/data/amocrm/amocrm_leads_tags.csv: -------------------------------------------------------------------------------- 1 | "id","account_id","leads_id","tag_id","name" 2 | 149826,20652,2747,2821,name 3 | 149827,20652,2747,111493,name 4 | 149828,20652,2747,111497,name 5 | 149829,20652,2747,111543,name 6 | 149830,20652,2747,154299,name 7 | 153410,20652,2749,2821,name 8 | 153411,20652,2749,111493,name 9 | 153412,20652,2749,111497,name 10 | 153413,20652,2749,111543,name 11 | 153414,20652,2749,111547,name 12 | 153415,20652,2749,111549,name 13 | 153416,20652,2749,154299,name 14 | 152108,20652,2750,159727,name 15 | 153234,20652,2751,2821,name 16 | 153235,20652,2751,111493,name 17 | 153236,20652,2751,154299,name 18 | 153237,20652,2751,158343,name 19 | 153186,20652,2752,111493,name 20 | 153187,20652,2752,133709,name 21 | 154475,20652,2753,2821,name 22 | 154476,20652,2753,111493,name 23 | 154477,20652,2753,111543,name 24 | 154478,20652,2753,154299,name 25 | 150228,20652,2754,159727,name 26 | 153379,20652,2755,2821,name 27 | 153380,20652,2755,111493,name 28 | 153381,20652,2755,111497,name 29 | 153382,20652,2755,111543,name 30 | 153383,20652,2755,154299,name 31 | 153384,20652,2755,155669,name 32 | 154216,20652,2756,2821,name 33 | 154217,20652,2756,111493,name 34 | 154218,20652,2756,111497,name 35 | 154219,20652,2756,111543,name 36 | 154220,20652,2756,111547,name 37 | 154221,20652,2756,111549,name 38 | 154439,20652,2757,2821,name 39 | 154440,20652,2757,111493,name 40 | 154441,20652,2757,111497,name 41 | 154442,20652,2757,155669,name 42 | 147507,20652,2758,158343,name 43 | 148178,20652,2760,2821,name 44 | 148179,20652,2760,111493,name 45 | 148180,20652,2760,111497,name 46 | 148181,20652,2760,154299,name 47 | 153064,20652,2761,2821,name 48 | 153065,20652,2761,111493,name 49 | 153066,20652,2761,154299,name 50 | 147639,20652,2763,2821,name 51 | 147640,20652,2763,111493,name 52 | 147641,20652,2763,154299,name 53 | 148452,20652,2764,155433,name 54 | 148241,20652,2767,155433,name 55 | 148239,20652,2768,155433,name 56 | 153310,20652,2769,155433,name 57 | 148237,20652,2770,155433,name 58 | 148868,20652,2771,111497,name 59 | 148869,20652,2771,111543,name 60 | 153349,20652,2772,2821,name 61 | 153350,20652,2772,111493,name 62 | 153351,20652,2772,111497,name 63 | 153352,20652,2772,111543,name 64 | 154137,20652,2773,2821,name 65 | 154138,20652,2773,111493,name 66 | 154139,20652,2773,111497,name 67 | 154140,20652,2773,154299,name 68 | 154141,20652,2773,155669,name 69 | 148789,20652,2774,159727,name 70 | 148542,20652,2775,2821,name 71 | 148543,20652,2775,111493,name 72 | 148544,20652,2775,154299,name 73 | 148236,20652,2776,155433,name 74 | 148235,20652,2777,155433,name 75 | 149254,20652,2778,155433,name 76 | 154211,20652,2779,2821,name 77 | 154212,20652,2779,111493,name 78 | 154213,20652,2779,111497,name 79 | 154214,20652,2779,111543,name 80 | 154215,20652,2779,154299,name 81 | 153815,20652,2780,155433,name 82 | 154474,20652,2781,111549,name 83 | 153404,20652,2782,111497,name 84 | 153405,20652,2782,111543,name 85 | 153406,20652,2782,111549,name 86 | 148607,20652,2783,111493,name 87 | 148608,20652,2783,160387,name 88 | 149224,20652,2784,2821,name 89 | 149225,20652,2784,111493,name 90 | 149226,20652,2784,154299,name 91 | 149130,20652,2785,2821,name 92 | 149131,20652,2785,111493,name 93 | 149132,20652,2785,154299,name 94 | 154578,20652,2786,2821,name 95 | 154579,20652,2786,111493,name 96 | 154580,20652,2786,111497,name 97 | 154581,20652,2786,111543,name 98 | 154582,20652,2786,154299,name 99 | 154392,20652,2787,2821,name 100 | 154393,20652,2787,111493,name 101 | 154394,20652,2787,111543,name 102 | 154395,20652,2787,154299,name 103 | 150227,20652,2788,159727,name 104 | 153762,20652,2789,2821,name 105 | 153763,20652,2789,111493,name 106 | 153764,20652,2789,154299,name 107 | 153765,20652,2789,158343,name 108 | 152550,20652,2790,155433,name 109 | 149630,20652,2791,2821,name 110 | 149631,20652,2791,27703,name 111 | 149632,20652,2791,111493,name 112 | 149633,20652,2791,154299,name 113 | 149634,20652,2791,154805,name 114 | 149635,20652,2791,154809,name 115 | 152187,20652,2792,2821,name 116 | 152188,20652,2792,111493,name 117 | 152189,20652,2792,154299,name 118 | 154362,20652,2793,2821,name 119 | 154363,20652,2793,111493,name 120 | 154364,20652,2793,154299,name 121 | 149808,20652,2794,111493,name 122 | 149809,20652,2794,111497,name 123 | 149810,20652,2794,111543,name 124 | 149811,20652,2794,158343,name 125 | 149605,20652,2795,2821,name 126 | 149606,20652,2795,111493,name 127 | 149607,20652,2795,154299,name 128 | 150244,20652,2796,2821,name 129 | 150245,20652,2796,111493,name 130 | 150246,20652,2796,154299,name 131 | 153497,20652,2797,2821,name 132 | 153498,20652,2797,111493,name 133 | 153499,20652,2797,154299,name 134 | 154347,20652,2798,2821,name 135 | 154348,20652,2798,111493,name 136 | 154349,20652,2798,154299,name 137 | 153552,20652,2799,2821,name 138 | 153553,20652,2799,111493,name 139 | 153554,20652,2799,154299,name 140 | 152190,20652,2800,2821,name 141 | 152191,20652,2800,111493,name 142 | 152192,20652,2800,154299,name 143 | 149781,20652,2801,2821,name 144 | 149782,20652,2801,111493,name 145 | 153258,20652,2803,155433,name 146 | 152193,20652,2804,2821,name 147 | 152194,20652,2804,111493,name 148 | 152195,20652,2804,111497,name 149 | 152196,20652,2804,154299,name 150 | 153616,20652,2805,2821,name 151 | 153617,20652,2805,111493,name 152 | 153618,20652,2805,154299,name 153 | 154163,20652,2806,2821,name 154 | 154164,20652,2806,111493,name 155 | 154165,20652,2806,111497,name 156 | 154166,20652,2806,154299,name 157 | 154167,20652,2806,155669,name 158 | 154222,20652,2807,159727,name 159 | 153523,20652,2808,2821,name 160 | 153524,20652,2808,111493,name 161 | 153525,20652,2808,111497,name 162 | 153526,20652,2808,154299,name 163 | 153516,20652,2809,155433,name 164 | 154288,20652,2810,111497,name 165 | 154437,20652,2811,111497,name 166 | 154438,20652,2811,155669,name 167 | 153515,20652,2812,155433,name 168 | 154311,20652,2813,111497,name 169 | 154277,20652,2814,111497,name 170 | 154449,20652,2815,155433,name 171 | 153506,20652,2816,111497,name 172 | 153555,20652,2817,2821,name 173 | 153556,20652,2817,111493,name 174 | 153557,20652,2817,154299,name 175 | 154350,20652,2818,111497,name 176 | 154258,20652,2819,111497,name 177 | 154335,20652,2820,111497,name 178 | 153780,20652,2821,111497,name 179 | 154289,20652,2822,111497,name 180 | 154300,20652,2823,111497,name 181 | 154309,20652,2824,111497,name 182 | 153833,20652,2825,111497,name 183 | 154056,20652,2826,2821,name 184 | 154057,20652,2826,111493,name 185 | 154058,20652,2826,111497,name 186 | 154059,20652,2826,154299,name 187 | 154389,20652,2828,2821,name 188 | 154390,20652,2828,111493,name 189 | 154391,20652,2828,154299,name 190 | 154060,20652,2829,2821,name 191 | 154061,20652,2829,111493,name 192 | 154062,20652,2829,154299,name 193 | 154063,20652,2830,2821,name 194 | 154064,20652,2830,111493,name 195 | 154065,20652,2830,154299,name 196 | 154487,20652,2831,2821,name 197 | 154488,20652,2831,111493,name 198 | 154489,20652,2831,154299,name 199 | 154066,20652,2832,2821,name 200 | 154067,20652,2832,111493,name 201 | 154068,20652,2832,111497,name 202 | -------------------------------------------------------------------------------- /integration_tests/data/amocrm/amocrm_users.csv: -------------------------------------------------------------------------------- 1 | "id","account_id","user_id","login","name","phone","group_name","email","is_admin","is_active","is_free","mail_access","catalog_access","role_id","role_name","group_id" 2 | 1,20652,0,login,name,phone,group_name,email,0,0,0,0,0,0,,0 3 | 2,20652,6142552,login,name,phone,group_name,email,1,1,0,1,1,0,,0 4 | 3,20652,6155194,login,name,phone,group_name,email,1,1,0,1,1,0,,0 5 | 6,20652,6463807,login,name,phone,group_name,email,0,1,0,1,1,0,,0 6 | 7,20652,6787654,login,name,phone,group_name,email,0,1,0,1,1,0,,0 7 | -------------------------------------------------------------------------------- /integration_tests/data/bitrix24/bitrix24_companies.csv: -------------------------------------------------------------------------------- 1 | "id","account_id","company_id","company_type","title","address_legal","banking_details","industry","employees","revenue","comments","phone","email","web","im","is_deleted" 2 | 3,19646,0,company_type,title,,,,,0,,,,,,0 3 | 187,19646,370,company_type,title,,,,,0,,,,,,0 4 | 193,19646,382,company_type,title,,,,,0,,,,,,0 5 | 319,19646,632,company_type,title,,,,,0,,,,,,0 6 | 337,19646,668,company_type,title,,,,,0,,,,,,0 7 | 338,19646,670,company_type,title,,,,,0,,,,,,0 8 | 339,19646,672,company_type,title,,,,,0,,,,,,0 9 | 340,19646,674,company_type,title,,,,,0,,,,,,0 10 | 341,19646,676,company_type,title,,,,,0,,,,,,0 11 | 342,19646,678,company_type,title,,,,,0,,,,,,0 12 | 343,19646,680,company_type,title,,,,,0,,,,,,0 13 | 344,19646,682,company_type,title,,,,,0,,,,,,0 14 | 345,19646,684,company_type,title,,,,,0,,,,,,0 15 | 346,19646,686,company_type,title,,,,,0,,,,,,0 16 | 347,19646,688,company_type,title,,,,,0,,,,,,0 17 | -------------------------------------------------------------------------------- /integration_tests/data/bitrix24/bitrix24_deals_facts.csv: -------------------------------------------------------------------------------- 1 | "account_id","clientids_id","traffic_id","users_id","deals_id","contacts_id","companies_id","locations_id","createdate_id","begindate_id","enddate_id","deal_total" 2 | 19646,1,350114,2,9082,5785,3,1,97266,97267,97268,"1258,00" 3 | 19646,1,350114,2,9081,5784,3,1,97265,93673,97267,"4870,00" 4 | 19646,1,350114,2,9080,5783,3,1,97264,93673,97267,"6990,00" 5 | 19646,1,350114,2,9079,5782,347,1,96747,93672,93673,"6972,00" 6 | 19646,1,350114,2,9078,5754,346,1,93670,93672,93672,"3680,00" 7 | 19646,1,350114,2,9077,5780,3,1,93669,93672,93673,"3590,00" 8 | 19646,1,350114,2,9076,5779,3,1,93668,93671,93672,"5392,00" 9 | 19646,1,350114,2,9075,5778,3,1,93667,93671,93672,"4700,00" 10 | 19646,1,350114,2,9074,5776,345,1,91852,91853,91853,"1940,00" 11 | 19646,1,350114,2,9073,5775,3,1,89320,87167,89321,"6470,00" 12 | 19646,1,350114,2,9072,5774,3,1,89319,87167,89321,"7340,00" 13 | 19646,1,350114,2,9071,5781,3,1,88278,86418,93672,"8090,00" 14 | 19646,1,350114,2,9070,1547,3,1,88277,86418,87167,"4560,00" 15 | 19646,1,350114,2,9069,5773,344,1,87166,86418,86418,"4020,00" 16 | 19646,1,350114,2,9068,5772,3,1,87165,86417,86418,"5750,00" 17 | 19646,1,350114,2,9067,5770,3,1,87164,86417,86418,"1,00" 18 | 19646,1,350114,2,9066,5769,3,1,87163,86417,86418,"1,00" 19 | 19646,1,350114,2,9065,5768,3,1,87163,86417,86418,"1,00" 20 | 19646,1,350114,2,9064,5767,3,1,87162,86417,86418,"1,00" 21 | 19646,1,350114,2,9063,5766,3,1,87161,86417,86418,"1,00" 22 | 19646,1,350114,2,9062,5765,3,1,87160,86417,86418,"1,00" 23 | 19646,1,350114,2,9061,5764,3,1,86416,86417,86418,"1507,00" 24 | 19646,1,350114,2,9060,5771,3,1,86415,86417,91853,"23942,00" 25 | 19646,1,350114,2,9059,5763,3,1,86414,85433,86417,"25060,00" 26 | 19646,1,350114,2,9058,5762,3,1,86413,85433,86417,"1,00" 27 | 19646,1,350114,2,9057,5761,3,1,86413,85433,86417,"1,00" 28 | 19646,1,350114,2,9056,5760,3,1,86413,85433,86417,"1,00" 29 | 19646,1,350114,2,9055,5759,3,1,86412,85433,86417,"1,00" 30 | 19646,1,350114,2,9054,825,343,1,86411,85433,85433,"2385,00" 31 | 19646,1,350114,2,9053,5758,3,1,86410,85433,85433,"8738,00" 32 | 19646,1,350114,2,9052,1475,3,1,86409,85433,87167,"3380,00" 33 | 19646,1,350114,2,9051,5757,3,1,85431,85432,86417,"1570,00" 34 | 19646,1,350114,2,9050,3,193,1,85430,85432,85433,"6020,00" 35 | 19646,1,350114,2,9049,5756,3,1,85429,85432,85432,"2700,00" 36 | 19646,1,350114,2,9048,5755,3,1,85428,85432,85433,"1600,00" 37 | 19646,1,350114,2,9047,5753,3,1,84300,82970,82970,"15610,00" 38 | 19646,1,350114,2,9046,5752,3,1,84299,82970,82970,"4970,00" 39 | 19646,1,350114,2,9045,33,3,1,83648,82969,82970,"7220,00" 40 | 19646,1,350114,2,9044,5751,3,1,83647,82969,85433,"3617,00" 41 | 19646,1,350114,2,9043,910,342,1,83646,82969,85433,"6764,00" 42 | 19646,1,350114,2,9042,5750,3,1,82968,82969,82970,"2439,00" 43 | 19646,1,350114,2,9041,165,3,1,82221,81847,82222,"2130,00" 44 | 19646,1,350114,2,9040,165,341,1,82220,81847,82222,"6580,00" 45 | 19646,1,350114,2,9039,5749,3,1,82219,81847,82222,"4028,00" 46 | 19646,1,350114,2,9038,1560,319,1,81846,81243,81847,"19912,00" 47 | 19646,1,350114,2,9037,4875,340,1,81845,81243,85433,"4195,00" 48 | 19646,1,350114,2,9036,5748,3,1,81844,81243,81847,"2660,00" 49 | 19646,1,350114,2,9035,5754,3,1,81843,81243,81847,"2845,00" 50 | 19646,1,350114,2,9034,3036,3,1,81842,81243,81847,"4310,00" 51 | 19646,1,350114,2,9033,5746,3,1,81841,81243,82970,"1500,00" 52 | 19646,1,350114,2,9032,984,3,1,81241,81242,81243,"3630,00" 53 | 19646,1,350114,2,9031,5744,339,1,79549,79206,79550,"16240,00" 54 | 19646,1,350114,2,9030,52,3,1,79548,79206,79550,"42080,00" 55 | 19646,1,350114,2,9029,5743,3,1,79547,79206,79206,"10791,00" 56 | 19646,1,350114,2,9028,4674,3,1,79204,79205,79206,"18753,00" 57 | 19646,1,350114,2,9027,1621,3,1,79203,79205,79205,"9368,00" 58 | 19646,1,350114,2,9026,2245,3,1,79008,79009,79010,"4492,00" 59 | 19646,1,350114,2,9025,5742,3,1,77898,76043,77899,"6930,00" 60 | 19646,1,350114,2,9024,5741,3,1,77196,76042,76043,"3680,00" 61 | 19646,1,350114,2,9023,1096,3,1,77195,76042,76043,"8980,00" 62 | 19646,1,350114,2,9022,2799,3,1,77194,76042,82970,"2600,00" 63 | 19646,1,350114,2,9021,774,3,1,77193,76042,81243,"1602,00" 64 | 19646,1,350114,2,9020,5740,3,1,77192,76042,76043,"1,00" 65 | 19646,1,350114,2,9019,1334,338,1,77191,76042,76042,"595,00" 66 | 19646,1,350114,2,9018,5739,3,1,77190,76042,76043,"2740,00" 67 | 19646,1,350114,2,9017,5738,3,1,77189,76042,79205,"2355,00" 68 | 19646,1,350114,2,9016,5737,3,1,76041,76042,79205,"38867,00" 69 | 19646,1,350114,2,9015,1334,338,1,76040,75322,76042,"2246,00" 70 | 19646,1,350114,2,9014,5736,3,1,76039,75322,76042,"10,00" 71 | 19646,1,350114,2,9013,5736,3,1,76039,75322,76042,"10,00" 72 | 19646,1,350114,2,9012,5736,3,1,76039,75322,76042,"10,00" 73 | 19646,1,350114,2,9011,5736,337,1,76038,75322,76042,"5450,00" 74 | 19646,1,350114,2,9010,5735,3,1,76037,75322,76042,"1,00" 75 | 19646,1,350114,2,9009,5734,3,1,76036,75322,76042,"1,00" 76 | 19646,1,350114,2,9008,5733,3,1,76036,75322,76042,"1,00" 77 | 19646,1,350114,2,9007,5732,3,1,76036,75322,76042,"1,00" 78 | 19646,1,350114,2,9006,5731,3,1,76035,75322,76042,"1,00" 79 | 19646,1,350114,2,9005,5730,3,1,76035,75322,76042,"1,00" 80 | 19646,1,350114,2,9004,5729,3,1,76034,75322,76042,"1,00" 81 | 19646,1,350114,2,9003,5728,3,1,76033,75322,76042,"1,00" 82 | 19646,1,350114,2,9002,5727,3,1,76032,75322,76042,"1,00" 83 | 19646,1,350114,2,9001,5726,3,1,76031,75322,76042,"1,00" 84 | 19646,1,350114,2,9000,5725,3,1,76030,75322,76042,"1,00" 85 | 19646,1,350114,2,8999,5724,3,1,76029,75322,76042,"1,00" 86 | 19646,1,350114,2,8998,5723,3,1,76028,75322,76042,"1,00" 87 | 19646,1,350114,2,8997,5722,3,1,76027,75322,76042,"1,00" 88 | 19646,1,350114,2,8996,5721,3,1,76026,75322,76042,"1,00" 89 | 19646,1,350114,2,8995,5720,3,1,76026,75322,76042,"1,00" 90 | 19646,1,350114,2,8994,5720,3,1,76025,75322,76042,"1,00" 91 | 19646,1,350114,2,8993,5719,3,1,76024,75322,76042,"1,00" 92 | 19646,1,350114,2,8992,5718,3,1,76023,75322,76042,"1,00" 93 | 19646,1,350114,2,8991,5717,3,1,76023,75322,76042,"1,00" 94 | 19646,1,350114,2,8990,5716,3,1,76022,75322,76042,"1,00" 95 | 19646,1,350114,2,8989,5715,3,1,75321,74371,75322,"8850,00" 96 | 19646,1,350114,2,8988,5715,3,1,75320,74371,74371,"10,00" 97 | 19646,1,350114,2,8987,3958,3,1,74370,73493,76042,"7290,00" 98 | 19646,1,350114,2,8986,5714,187,1,73492,72557,73493,"2630,00" 99 | 19646,1,350114,2,8985,5713,3,1,73491,72557,73493,"2360,00" 100 | 19646,1,350114,2,8984,5712,3,1,73490,72557,73493,"2700,00" 101 | 19646,1,350114,2,8983,5711,3,1,72556,71745,71745,"1590,00" 102 | -------------------------------------------------------------------------------- /integration_tests/data/bitrix24/bitrix24_leads.csv: -------------------------------------------------------------------------------- 1 | "id","account_id","lead_id","title","name","second_name","last_name","company_title","source_id","source_name","source_description","status_id","status_name","status_description","post","comments","phone","email","web","im","is_return_customer","is_deleted" 2 | 929,19646,7806,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 3 | 930,19646,7808,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 4 | 931,19646,7810,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 5 | 932,19646,7812,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 6 | 933,19646,7814,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 7 | 934,19646,7816,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 8 | 935,19646,7818,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 9 | 936,19646,7822,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 10 | 937,19646,7824,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 11 | 938,19646,7826,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 12 | 939,19646,7828,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 13 | 940,19646,7830,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 14 | 941,19646,7832,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 15 | 942,19646,7834,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 16 | 943,19646,7836,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 17 | 944,19646,7838,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 18 | 945,19646,7840,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 19 | 946,19646,7842,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 20 | 947,19646,7844,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 21 | 948,19646,7846,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 22 | 949,19646,7848,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 23 | 950,19646,7850,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 24 | 951,19646,7852,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 25 | 952,19646,7854,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 26 | 953,19646,7856,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 27 | 954,19646,7858,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 28 | 955,19646,7860,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 29 | 956,19646,7862,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 30 | 957,19646,7864,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 31 | 958,19646,7866,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 32 | 959,19646,7868,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 33 | 960,19646,7870,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 34 | 961,19646,7872,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 35 | 962,19646,7874,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 36 | 963,19646,7876,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 37 | 964,19646,7878,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 38 | 965,19646,7880,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 39 | 966,19646,7882,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 40 | 967,19646,7884,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 41 | 968,19646,7886,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 42 | 969,19646,7888,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 43 | 970,19646,7890,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 44 | 971,19646,7892,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 45 | 972,19646,7894,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 46 | 973,19646,7896,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 47 | 974,19646,7898,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 48 | 975,19646,7900,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 49 | 976,19646,7902,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 50 | 977,19646,7904,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 51 | 978,19646,7906,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 52 | 979,19646,7908,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 53 | 980,19646,7910,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 54 | 981,19646,7912,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 55 | 982,19646,7914,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 56 | 983,19646,7916,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 57 | 984,19646,7918,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 58 | 985,19646,7920,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 59 | 986,19646,7922,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 60 | 987,19646,7924,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 61 | 988,19646,7926,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 62 | 989,19646,7928,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 63 | 990,19646,7930,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 64 | 991,19646,7932,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 65 | 992,19646,7934,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 66 | 993,19646,7936,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 67 | 994,19646,7938,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 68 | 995,19646,7940,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 69 | 996,19646,7942,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 70 | 997,19646,7944,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 71 | 998,19646,7946,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 72 | 999,19646,7948,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 73 | 1000,19646,7950,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 74 | 1001,19646,7952,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 75 | 1002,19646,7954,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 76 | 1003,19646,7956,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 77 | 1004,19646,7958,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 78 | 1005,19646,7960,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 79 | 1006,19646,7962,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 80 | 1007,19646,7963,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 81 | 1008,19646,7965,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 82 | 1009,19646,7966,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 83 | 1010,19646,7968,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 84 | 1011,19646,7970,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 85 | 1012,19646,7972,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 86 | 1013,19646,7974,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 87 | 1014,19646,7976,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 88 | 1015,19646,7978,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 89 | 1016,19646,7980,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 90 | 1017,19646,7982,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 91 | 1018,19646,7984,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 92 | 1019,19646,7986,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 93 | 1020,19646,7988,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 94 | 1021,19646,7990,title,name,,,,,,,NEW,status_name,,,comm,phone,,,,0,0 95 | -------------------------------------------------------------------------------- /integration_tests/data/bitrix24/bitrix24_leads_facts.csv: -------------------------------------------------------------------------------- 1 | "account_id","clientids_id","traffic_id","users_id","leads_id","contacts_id","companies_id","locations_id","deals_id","created_id","closed_id","lead_total" 2 | 19646,1,350114,2,1021,3,3,1,3,90642,359,"0,00" 3 | 19646,1,350114,5,1020,3,3,1,3,90641,359,"0,00" 4 | 19646,1,350114,2,1019,3,3,1,3,90640,359,"0,00" 5 | 19646,1,350114,2,1017,3,3,1,3,89332,359,"0,00" 6 | 19646,1,350114,2,1018,3,3,1,3,89332,359,"0,00" 7 | 19646,1,350114,2,1016,3,3,1,3,89331,359,"0,00" 8 | 19646,1,350114,2,1015,3,3,1,3,89330,359,"0,00" 9 | 19646,1,350114,2,1014,3,3,1,3,89329,359,"0,00" 10 | 19646,1,350114,2,1013,3,3,1,3,89328,359,"0,00" 11 | 19646,1,350114,2,1012,3,3,1,3,89327,359,"0,00" 12 | 19646,1,350114,5,1011,3,3,1,3,89326,359,"0,00" 13 | 19646,1,350114,3,1010,3,3,1,3,89325,359,"0,00" 14 | 19646,1,350114,3,1009,3,3,1,3,89324,359,"0,00" 15 | 19646,1,350114,2,1008,3,3,1,3,89323,359,"0,00" 16 | 19646,1,350114,2,1007,3,3,1,3,89322,359,"0,00" 17 | 19646,1,350114,2,1006,3,3,1,3,88284,359,"0,00" 18 | 19646,1,350114,2,1005,3,3,1,3,88283,359,"0,00" 19 | 19646,1,350114,2,1004,3,3,1,3,88282,359,"0,00" 20 | 19646,1,350114,2,1003,3,3,1,3,88281,359,"0,00" 21 | 19646,1,350114,3,1002,3,3,1,3,88280,359,"0,00" 22 | 19646,1,350114,2,1001,3,3,1,3,88279,359,"0,00" 23 | 19646,1,350114,2,1000,3,3,1,3,87172,359,"0,00" 24 | 19646,1,350114,2,999,3,3,1,3,87171,359,"0,00" 25 | 19646,1,350114,2,997,3,3,1,3,87170,359,"0,00" 26 | 19646,1,350114,2,998,3,3,1,3,87170,359,"0,00" 27 | 19646,1,350114,5,996,3,3,1,3,87169,359,"0,00" 28 | 19646,1,350114,2,995,3,3,1,3,87168,359,"0,00" 29 | 19646,1,350114,2,994,3,3,1,3,86422,359,"0,00" 30 | 19646,1,350114,3,993,3,3,1,3,86421,359,"0,00" 31 | 19646,1,350114,2,992,3,3,1,3,86420,359,"0,00" 32 | 19646,1,350114,5,991,3,3,1,3,86419,359,"0,00" 33 | 19646,1,350114,3,990,3,3,1,3,85441,359,"0,00" 34 | 19646,1,350114,5,989,3,3,1,3,85440,359,"0,00" 35 | 19646,1,350114,3,988,3,3,1,3,85439,359,"0,00" 36 | 19646,1,350114,2,987,3,3,1,3,85438,359,"0,00" 37 | 19646,1,350114,2,986,3,3,1,3,85437,359,"0,00" 38 | 19646,1,350114,2,985,3,3,1,3,85436,359,"0,00" 39 | 19646,1,3885129,2,984,3,3,1,3,85435,359,"0,00" 40 | 19646,1,350114,2,983,3,3,1,3,85434,359,"0,00" 41 | 19646,1,350114,2,982,3,3,1,3,84305,359,"0,00" 42 | 19646,1,350114,3,981,3,3,1,3,84304,359,"0,00" 43 | 19646,1,350114,2,980,3,3,1,3,84303,359,"0,00" 44 | 19646,1,442643,2,979,3,3,1,3,84302,359,"0,00" 45 | 19646,1,442643,2,978,3,3,1,3,84301,359,"0,00" 46 | 19646,1,3067191,2,977,3,3,1,3,83651,359,"0,00" 47 | 19646,1,350114,2,976,3,3,1,3,83650,359,"0,00" 48 | 19646,1,350114,2,975,3,3,1,3,83649,359,"0,00" 49 | 19646,1,350114,2,974,3,3,1,3,82974,359,"0,00" 50 | 19646,1,350114,2,973,3,3,1,3,82973,359,"0,00" 51 | 19646,1,350114,5,972,3,3,1,3,82972,359,"0,00" 52 | 19646,1,350114,3,971,3,3,1,3,82971,359,"0,00" 53 | 19646,1,3858597,3,970,3,3,1,3,82234,359,"0,00" 54 | 19646,1,350114,3,969,3,3,1,3,82233,359,"0,00" 55 | 19646,1,350114,3,968,3,3,1,3,82232,359,"0,00" 56 | 19646,1,350114,3,967,3,3,1,3,82231,359,"0,00" 57 | 19646,1,350114,3,966,3,3,1,3,82230,359,"0,00" 58 | 19646,1,3858595,2,965,3,3,1,3,82229,359,"0,00" 59 | 19646,1,350114,3,964,3,3,1,3,82228,359,"0,00" 60 | 19646,1,3858596,3,963,3,3,1,3,82227,359,"0,00" 61 | 19646,1,350114,3,962,3,3,1,3,82226,359,"0,00" 62 | 19646,1,350114,2,961,3,3,1,3,82225,359,"0,00" 63 | 19646,1,350114,3,960,3,3,1,3,82224,359,"0,00" 64 | 19646,1,350114,3,959,3,3,1,3,82223,359,"0,00" 65 | 19646,1,350114,2,958,3,3,1,3,81851,359,"0,00" 66 | 19646,1,350114,3,957,3,3,1,3,81850,359,"0,00" 67 | 19646,1,350114,5,956,3,3,1,3,81849,359,"0,00" 68 | 19646,1,350114,3,955,3,3,1,3,81848,359,"0,00" 69 | 19646,1,350114,2,954,3,3,1,3,81253,359,"0,00" 70 | 19646,1,350114,2,953,3,3,1,3,81252,359,"0,00" 71 | 19646,1,350114,5,952,3,3,1,3,81251,359,"0,00" 72 | 19646,1,350114,3,951,3,3,1,3,81250,359,"0,00" 73 | 19646,1,350114,2,950,3,3,1,3,81249,359,"0,00" 74 | 19646,1,350114,2,949,3,3,1,3,81248,359,"0,00" 75 | 19646,1,350114,5,948,3,3,1,3,81247,359,"0,00" 76 | 19646,1,350114,3,947,3,3,1,3,81246,359,"0,00" 77 | 19646,1,350114,2,946,3,3,1,3,81245,359,"0,00" 78 | 19646,1,350114,5,945,3,3,1,3,81244,359,"0,00" 79 | 19646,1,350114,2,944,3,3,1,3,80575,359,"0,00" 80 | 19646,1,350114,2,943,3,3,1,3,80574,359,"0,00" 81 | 19646,1,350114,2,942,3,3,1,3,80573,359,"0,00" 82 | 19646,1,350114,2,941,3,3,1,3,80572,359,"0,00" 83 | 19646,1,350114,2,940,3,3,1,3,80571,359,"0,00" 84 | 19646,1,350114,2,939,3,3,1,3,80570,359,"0,00" 85 | 19646,1,350114,2,938,3,3,1,3,80569,359,"0,00" 86 | 19646,1,350114,3,937,3,3,1,3,80568,359,"0,00" 87 | 19646,1,350114,2,936,3,3,1,3,80567,359,"0,00" 88 | 19646,1,350114,2,935,3,3,1,3,79557,359,"0,00" 89 | 19646,1,350114,2,934,3,3,1,3,79556,359,"0,00" 90 | 19646,1,350114,2,933,3,3,1,3,79555,359,"0,00" 91 | 19646,1,350114,2,932,3,3,1,3,79554,359,"0,00" 92 | 19646,1,350114,2,931,3,3,1,3,79553,359,"0,00" 93 | 19646,1,3802906,5,930,3,3,1,3,79552,359,"0,00" 94 | 19646,1,350114,3,929,3,3,1,3,79551,359,"0,00" 95 | -------------------------------------------------------------------------------- /integration_tests/data/bitrix24/bitrix24_products.csv: -------------------------------------------------------------------------------- 1 | "id","account_id","product_id","name","original_name","description","measure","tax_rate","tax_included" 2 | 25033,19646,333904,name,original_name,,??,0,0 3 | 25032,19646,333902,name,original_name,,??,0,0 4 | 25031,19646,333900,name,original_name,,??,0,0 5 | 25030,19646,333898,name,original_name,,??,0,0 6 | 25029,19646,333896,name,original_name,,??,0,0 7 | 25028,19646,333894,name,original_name,,??,0,0 8 | 25025,19646,333888,name,original_name,,??,0,0 9 | 25024,19646,333886,name,original_name,,??,0,0 10 | 25023,19646,333880,name,original_name,,??,0,0 11 | 25022,19646,333878,name,original_name,,??,0,0 12 | 25021,19646,333876,name,original_name,,??,0,0 13 | 25020,19646,333874,name,original_name,,??,0,0 14 | 25019,19646,333872,name,original_name,,??,0,0 15 | 25018,19646,333870,name,original_name,,??,0,0 16 | 25017,19646,333868,name,original_name,,??,0,0 17 | 25016,19646,333866,name,original_name,,??,0,0 18 | 25015,19646,333858,name,original_name,,??,0,0 19 | 25014,19646,333856,name,original_name,,??,0,0 20 | 25013,19646,333854,name,original_name,,??,0,0 21 | 25012,19646,333846,name,original_name,,??,0,0 22 | 25011,19646,333844,name,original_name,,??,0,0 23 | 25010,19646,333842,name,original_name,,??,0,0 24 | 25009,19646,333828,name,original_name,,??,0,0 25 | 25008,19646,333826,name,original_name,,??,0,0 26 | 25007,19646,333824,name,original_name,,??,0,0 27 | 25006,19646,333804,name,original_name,,??,0,0 28 | 25005,19646,333802,name,original_name,,??,0,0 29 | 25004,19646,333794,name,original_name,,??,0,0 30 | 25003,19646,333792,name,original_name,,??,0,0 31 | 25002,19646,333790,name,original_name,,??,0,0 32 | 25001,19646,333788,name,original_name,,??,0,0 33 | 25000,19646,333768,name,original_name,,??,0,0 34 | 24999,19646,333766,name,original_name,,??,0,0 35 | 24996,19646,333732,name,original_name,,??,0,0 36 | 24995,19646,333730,name,original_name,,??,0,0 37 | 24994,19646,333728,name,original_name,,??,0,0 38 | 24991,19646,333722,name,original_name,,??,0,0 39 | 24990,19646,333720,name,original_name,,??,0,0 40 | 24980,19646,333690,name,original_name,,??,0,0 41 | 24979,19646,333688,name,original_name,,??,0,0 42 | 24975,19646,333668,name,original_name,,??,0,0 43 | 24974,19646,333666,name,original_name,,??,0,0 44 | 24971,19646,333660,name,original_name,,??,0,0 45 | 24970,19646,333658,name,original_name,,??,0,0 46 | 24969,19646,333656,name,original_name,,??,0,0 47 | 24965,19646,333624,name,original_name,,??,0,0 48 | 24964,19646,333622,name,original_name,,??,0,0 49 | 24963,19646,333620,name,original_name,,??,0,0 50 | 24962,19646,333618,name,original_name,,??,0,0 51 | 24961,19646,333616,name,original_name,,??,0,0 52 | 24960,19646,333614,name,original_name,,??,0,0 53 | 24957,19646,333604,name,original_name,,??,0,0 54 | 24956,19646,333602,name,original_name,,??,0,0 55 | 24955,19646,333600,name,original_name,,??,0,0 56 | 24954,19646,333598,name,original_name,,??,0,0 57 | 24953,19646,333596,name,original_name,,??,0,0 58 | 24952,19646,333594,name,original_name,,??,0,0 59 | 24951,19646,333592,name,original_name,,??,0,0 60 | 24950,19646,333590,name,original_name,,??,0,0 61 | 24949,19646,333584,name,original_name,,??,0,0 62 | 24948,19646,333582,name,original_name,,??,0,0 63 | 24947,19646,333580,name,original_name,,??,0,0 64 | 24944,19646,333574,name,original_name,,??,0,0 65 | 24943,19646,333572,name,original_name,,??,0,0 66 | 24942,19646,333570,name,original_name,,??,0,0 67 | 24941,19646,333568,name,original_name,,??,0,0 68 | 24940,19646,333556,name,original_name,,??,0,0 69 | 24939,19646,333554,name,original_name,,??,0,0 70 | 24938,19646,333552,name,original_name,,??,0,0 71 | 24937,19646,333550,name,original_name,,??,0,0 72 | 24934,19646,333544,name,original_name,,??,0,0 73 | 24933,19646,333542,name,original_name,,??,0,0 74 | 24930,19646,333536,name,original_name,,??,0,0 75 | 24929,19646,333534,name,original_name,,??,0,0 76 | 24928,19646,333512,name,original_name,,??,0,0 77 | 24927,19646,333510,name,original_name,,??,0,0 78 | 24926,19646,333508,name,original_name,,??,0,0 79 | 24925,19646,333506,name,original_name,,??,0,0 80 | 24915,19646,333486,name,original_name,,??,0,0 81 | 24914,19646,333484,name,original_name,,??,0,0 82 | 24913,19646,333482,name,original_name,,??,0,0 83 | 24912,19646,333480,name,original_name,,??,0,0 84 | 24911,19646,333478,name,original_name,,??,0,0 85 | 24910,19646,333476,name,original_name,,??,0,0 86 | 24908,19646,333472,name,original_name,,??,0,0 87 | 24907,19646,333470,name,original_name,,??,0,0 88 | 24906,19646,333468,name,original_name,,??,0,0 89 | 24905,19646,333466,name,original_name,,??,0,0 90 | 24904,19646,333464,name,original_name,,??,0,0 91 | 24903,19646,333462,name,original_name,,??,0,0 92 | 24902,19646,333460,name,original_name,,??,0,0 93 | 24901,19646,333448,name,original_name,,??,0,0 94 | 24900,19646,333446,name,original_name,,??,0,0 95 | 24899,19646,333444,name,original_name,,??,0,0 96 | 24898,19646,333442,name,original_name,,??,0,0 97 | 24897,19646,333440,name,original_name,,??,0,0 98 | 24896,19646,333438,name,original_name,,??,0,0 99 | 24895,19646,333436,name,original_name,,??,0,0 100 | 24894,19646,333434,name,original_name,,??,0,0 101 | 24893,19646,333432,name,original_name,,??,0,0 102 | -------------------------------------------------------------------------------- /integration_tests/data/bitrix24/bitrix24_users.csv: -------------------------------------------------------------------------------- 1 | "id","account_id","user_id","email","name","last_name","second_name","work_company","work_position","work_phone" 2 | 2,19646,7,email,name,last_name,second_name,,,work_phone 3 | 3,19646,460,email,name,last_name,second_name,,,work_phone 4 | 5,19646,1152,email,name,last_name,second_name,,,work_phone 5 | -------------------------------------------------------------------------------- /integration_tests/data/currencies/currency_items.csv: -------------------------------------------------------------------------------- 1 | "id","account_id","name","alphabetic_code","numeric_code" 2 | "1","38,148",,,"0" 3 | "2","38,148","Австралийский доллар","AUD","36" 4 | "3","38,148","Армянский драм","AMD","51" 5 | "4","38,148","Канадский доллар","CAD","124" 6 | "5","38,148","Китайский юань","CNY","156" 7 | "6","38,148","Чешская крона","CZK","203" 8 | "7","38,148","Датская крона","DKK","208" 9 | "8","38,148","Гонконгский доллар","HKD","344" 10 | "9","38,148","Венгерский форинт","HUF","348" 11 | "10","38,148","Индийская рупия","INR","356" 12 | "11","38,148","Японская иена","JPY","392" 13 | "12","38,148","Казахстанский тенге","KZT","398" 14 | "13","38,148","Вон Республики Корея","KRW","410" 15 | "14","38,148","Киргизский сом","KGS","417" 16 | "15","38,148","Молдавский лей","MDL","498" 17 | "16","38,148","Норвежская крона","NOK","578" 18 | "17","38,148","Сингапурский доллар","SGD","702" 19 | "18","38,148","Южноафриканский рэнд","ZAR","710" 20 | "19","38,148","Шведская крона","SEK","752" 21 | "20","38,148","Швейцарский франк","CHF","756" 22 | "21","38,148","Фунт стерлингов Соединенного королевства","GBP","826" 23 | "22","38,148","Доллар США","USD","840" 24 | "23","38,148","Узбекский сум","UZS","860" 25 | "24","38,148","Белорусский рубль","BYN","933" 26 | "25","38,148","Новый туркменский манат","TMT","934" 27 | "26","38,148","Азербайджанский манат","AZN","944" 28 | "27","38,148","Румынский лей","RON","946" 29 | "28","38,148","Турецкая лира","TRY","949" 30 | "29","38,148","СДР (специальные права заимствования)","XDR","960" 31 | "30","38,148","Таджикский сомони","TJS","972" 32 | "31","38,148","Болгарский лев","BGN","975" 33 | "32","38,148","Евро","EUR","978" 34 | "33","38,148","Украинская гривна","UAH","980" 35 | "34","38,148","Польский злотый","PLN","985" 36 | "35","38,148","Бразильский реал","BRL","986" 37 | -------------------------------------------------------------------------------- /integration_tests/data/direct/direct_adgroups.csv: -------------------------------------------------------------------------------- 1 | "id","account_id","adgroup_id","name","tracking_params","status","serving_status","adgroup_type","adgroup_subtype" 2 | 2765,18378,"4317442085",name,,ACCEPTED,ELIGIBLE,CPM_BANNER_AD_GROUP,USER_PROFILE 3 | 2766,18378,"4317482211",name,,ACCEPTED,ELIGIBLE,CPM_BANNER_AD_GROUP,USER_PROFILE 4 | 2767,18378,"4317663931",name,,ACCEPTED,ELIGIBLE,TEXT_AD_GROUP,NONE 5 | 2782,18378,"4320280667",name,,ACCEPTED,ELIGIBLE,CPM_BANNER_AD_GROUP,USER_PROFILE 6 | 2783,18378,"4320296475",name,,ACCEPTED,ELIGIBLE,CPM_BANNER_AD_GROUP,USER_PROFILE 7 | 2784,18378,"4320302568",name,,ACCEPTED,ELIGIBLE,CPM_BANNER_AD_GROUP,USER_PROFILE 8 | 2785,18378,"4320310756",name,,ACCEPTED,ELIGIBLE,CPM_BANNER_AD_GROUP,USER_PROFILE 9 | 2790,18378,"4326279749",name,,ACCEPTED,ELIGIBLE,CPM_BANNER_AD_GROUP,KEYWORDS 10 | 2792,18378,"4326332456",name,,ACCEPTED,ELIGIBLE,CPM_BANNER_AD_GROUP,KEYWORDS 11 | 3015,18378,"4333380897",name,,ACCEPTED,ELIGIBLE,CPM_BANNER_AD_GROUP,KEYWORDS 12 | -------------------------------------------------------------------------------- /integration_tests/data/direct/direct_campaigns.csv: -------------------------------------------------------------------------------- 1 | "id","account_id","campaign_id","name","campaign_type","status","state","status_payment","status_clarification","currency","daily_budget_amount","daily_budget_mode","start_date","end_date","is_actual" 2 | 218,18378,55336088,name,CPM_BANNER_CAMPAIGN,ACCEPTED,ON,ALLOWED,status_clarification,RUB,600,STANDARD,,,1 3 | 219,18378,55343205,name,TEXT_CAMPAIGN,ACCEPTED,ON,ALLOWED,status_clarification,RUB,1000,STANDARD,,,1 4 | 223,18378,55572598,name,CPM_BANNER_CAMPAIGN,ACCEPTED,ON,ALLOWED,status_clarification,RUB,1000,STANDARD,,,1 5 | -------------------------------------------------------------------------------- /integration_tests/data/direct/direct_regions.csv: -------------------------------------------------------------------------------- 1 | "id","account_id","adgroups_id","region_id","name","region_type","is_negative" 2 | 6581,18378,2765,213,Москва,City,0 3 | 6582,18378,2765,10716,Балашиха,City,0 4 | 6583,18378,2765,214,Долгопрудный,City,0 5 | 6584,18378,2765,10725,Домодедово,City,0 6 | 6585,18378,2765,20571,Жуковский,City,0 7 | 6586,18378,2765,10731,Истра,City,0 8 | 6587,18378,2765,20728,Королёв,City,0 9 | 6588,18378,2765,10735,Красногорск,City,0 10 | 6589,18378,2765,10719,Видное,City,0 11 | 6590,18378,2765,21641,Лобня,City,0 12 | 6591,18378,2765,10738,Люберцы,City,0 13 | 6592,18378,2765,10740,Мытищи,City,0 14 | 6593,18378,2765,10747,Подольск,City,0 15 | 6594,18378,2765,10750,Раменское,City,0 16 | 6595,18378,2765,10758,Химки,City,0 17 | 6596,18378,2765,10765,Щелково,City,0 18 | 6597,18378,2766,213,Москва,City,0 19 | 6598,18378,2766,10716,Балашиха,City,0 20 | 6599,18378,2766,214,Долгопрудный,City,0 21 | 6600,18378,2766,10725,Домодедово,City,0 22 | 6601,18378,2766,20571,Жуковский,City,0 23 | 6602,18378,2766,10731,Истра,City,0 24 | 6603,18378,2766,20728,Королёв,City,0 25 | 6604,18378,2766,10735,Красногорск,City,0 26 | 6605,18378,2766,10719,Видное,City,0 27 | 6606,18378,2766,21641,Лобня,City,0 28 | 6607,18378,2766,10738,Люберцы,City,0 29 | 6608,18378,2766,10740,Мытищи,City,0 30 | 6609,18378,2766,10747,Подольск,City,0 31 | 6610,18378,2766,10750,Раменское,City,0 32 | 6611,18378,2766,10758,Химки,City,0 33 | 6612,18378,2766,10765,Щелково,City,0 34 | 6613,18378,2767,1,Москва и область,Administrative area,0 35 | 6838,18378,2782,213,Москва,City,0 36 | 6839,18378,2782,10716,Балашиха,City,0 37 | 6840,18378,2782,214,Долгопрудный,City,0 38 | 6841,18378,2782,10725,Домодедово,City,0 39 | 6842,18378,2782,20571,Жуковский,City,0 40 | 6843,18378,2782,10731,Истра,City,0 41 | 6844,18378,2782,20728,Королёв,City,0 42 | 6845,18378,2782,10735,Красногорск,City,0 43 | 6846,18378,2782,10719,Видное,City,0 44 | 6847,18378,2782,21641,Лобня,City,0 45 | 6848,18378,2782,10738,Люберцы,City,0 46 | 6849,18378,2782,10740,Мытищи,City,0 47 | 6850,18378,2782,10747,Подольск,City,0 48 | 6851,18378,2782,10750,Раменское,City,0 49 | 6852,18378,2782,10758,Химки,City,0 50 | 6853,18378,2782,10765,Щелково,City,0 51 | 6854,18378,2783,213,Москва,City,0 52 | 6855,18378,2783,10716,Балашиха,City,0 53 | 6856,18378,2783,214,Долгопрудный,City,0 54 | 6857,18378,2783,10725,Домодедово,City,0 55 | 6858,18378,2783,20571,Жуковский,City,0 56 | 6859,18378,2783,10731,Истра,City,0 57 | 6860,18378,2783,20728,Королёв,City,0 58 | 6861,18378,2783,10735,Красногорск,City,0 59 | 6862,18378,2783,10719,Видное,City,0 60 | 6863,18378,2783,21641,Лобня,City,0 61 | 6864,18378,2783,10738,Люберцы,City,0 62 | 6865,18378,2783,10740,Мытищи,City,0 63 | 6866,18378,2783,10747,Подольск,City,0 64 | 6867,18378,2783,10750,Раменское,City,0 65 | 6868,18378,2783,10758,Химки,City,0 66 | 6869,18378,2783,10765,Щелково,City,0 67 | 6870,18378,2784,213,Москва,City,0 68 | 6871,18378,2784,10716,Балашиха,City,0 69 | 6872,18378,2784,214,Долгопрудный,City,0 70 | 6873,18378,2784,10725,Домодедово,City,0 71 | 6874,18378,2784,20571,Жуковский,City,0 72 | 6875,18378,2784,10731,Истра,City,0 73 | 6876,18378,2784,20728,Королёв,City,0 74 | 6877,18378,2784,10735,Красногорск,City,0 75 | 6878,18378,2784,10719,Видное,City,0 76 | 6879,18378,2784,21641,Лобня,City,0 77 | 6880,18378,2784,10738,Люберцы,City,0 78 | 6881,18378,2784,10740,Мытищи,City,0 79 | 6882,18378,2784,10747,Подольск,City,0 80 | 6883,18378,2784,10750,Раменское,City,0 81 | 6884,18378,2784,10758,Химки,City,0 82 | 6885,18378,2784,10765,Щелково,City,0 83 | 6886,18378,2785,213,Москва,City,0 84 | 6887,18378,2785,10716,Балашиха,City,0 85 | 6888,18378,2785,214,Долгопрудный,City,0 86 | 6889,18378,2785,10725,Домодедово,City,0 87 | 6890,18378,2785,20571,Жуковский,City,0 88 | 6891,18378,2785,10731,Истра,City,0 89 | 6892,18378,2785,20728,Королёв,City,0 90 | 6893,18378,2785,10735,Красногорск,City,0 91 | 6894,18378,2785,10719,Видное,City,0 92 | 6895,18378,2785,21641,Лобня,City,0 93 | 6896,18378,2785,10738,Люберцы,City,0 94 | 6897,18378,2785,10740,Мытищи,City,0 95 | 6898,18378,2785,10747,Подольск,City,0 96 | 6899,18378,2785,10750,Раменское,City,0 97 | 6900,18378,2785,10758,Химки,City,0 98 | 6901,18378,2785,10765,Щелково,City,0 99 | 6906,18378,2790,213,Москва,City,0 100 | 6907,18378,2790,10716,Балашиха,City,0 101 | 6908,18378,2790,214,Долгопрудный,City,0 102 | 6909,18378,2790,10725,Домодедово,City,0 103 | 6910,18378,2790,20571,Жуковский,City,0 104 | 6911,18378,2790,10731,Истра,City,0 105 | 6912,18378,2790,20728,Королёв,City,0 106 | 6913,18378,2790,10735,Красногорск,City,0 107 | 6914,18378,2790,10719,Видное,City,0 108 | 6915,18378,2790,21641,Лобня,City,0 109 | 6916,18378,2790,10738,Люберцы,City,0 110 | 6917,18378,2790,10740,Мытищи,City,0 111 | 6918,18378,2790,10747,Подольск,City,0 112 | 6919,18378,2790,10750,Раменское,City,0 113 | 6920,18378,2790,10758,Химки,City,0 114 | 6921,18378,2790,10765,Щелково,City,0 115 | 6938,18378,2792,213,Москва,City,0 116 | 6939,18378,2792,10716,Балашиха,City,0 117 | 6940,18378,2792,214,Долгопрудный,City,0 118 | 6941,18378,2792,10725,Домодедово,City,0 119 | 6942,18378,2792,20571,Жуковский,City,0 120 | 6943,18378,2792,10731,Истра,City,0 121 | 6944,18378,2792,20728,Королёв,City,0 122 | 6945,18378,2792,10735,Красногорск,City,0 123 | 6946,18378,2792,10719,Видное,City,0 124 | 6947,18378,2792,21641,Лобня,City,0 125 | 6948,18378,2792,10738,Люберцы,City,0 126 | 6949,18378,2792,10740,Мытищи,City,0 127 | 6950,18378,2792,10747,Подольск,City,0 128 | 6951,18378,2792,10750,Раменское,City,0 129 | 6952,18378,2792,10758,Химки,City,0 130 | 6953,18378,2792,10765,Щелково,City,0 131 | 8078,18378,3015,213,Москва,City,0 132 | 8079,18378,3015,10716,Балашиха,City,0 133 | 8080,18378,3015,214,Долгопрудный,City,0 134 | 8081,18378,3015,10725,Домодедово,City,0 135 | 8082,18378,3015,20571,Жуковский,City,0 136 | 8083,18378,3015,10731,Истра,City,0 137 | 8084,18378,3015,20728,Королёв,City,0 138 | 8085,18378,3015,10735,Красногорск,City,0 139 | 8086,18378,3015,10719,Видное,City,0 140 | 8087,18378,3015,21641,Лобня,City,0 141 | 8088,18378,3015,10738,Люберцы,City,0 142 | 8089,18378,3015,10740,Мытищи,City,0 143 | 8090,18378,3015,10747,Подольск,City,0 144 | 8091,18378,3015,10750,Раменское,City,0 145 | 8092,18378,3015,10758,Химки,City,0 146 | 8093,18378,3015,10765,Щелково,City,0 147 | -------------------------------------------------------------------------------- /integration_tests/data/direct/direct_sitelinks.csv: -------------------------------------------------------------------------------- 1 | "id","account_id","ads_id","sitelink_id","title","href","description" 2 | 1,18378,15682,1,title,href,description 3 | 2,18378,15591,2,title,href,description 4 | 3,18378,15608,3,title,href,description 5 | -------------------------------------------------------------------------------- /integration_tests/data/facebook/facebook_ads.csv: -------------------------------------------------------------------------------- 1 | "id","account_id","ad_id","name","configured_status","effective_status" 2 | 1290,18441,"23846478519710408",name,configured_status,effective_status 3 | 1300,18441,"23846537414390408",name,configured_status,effective_status 4 | 1458,18441,"23846791130070408",name,configured_status,effective_status 5 | 1473,18441,"23846840016360408",name,configured_status,effective_status 6 | 1474,18441,"23846840017820408",name,configured_status,effective_status 7 | 1486,18441,"23847055652940408",name,configured_status,effective_status 8 | 1489,18441,"23847079511790408",name,configured_status,effective_status 9 | 1492,18441,"23847103904660408",name,configured_status,effective_status 10 | -------------------------------------------------------------------------------- /integration_tests/data/facebook/facebook_adsets.csv: -------------------------------------------------------------------------------- 1 | "id","account_id","adset_id","name","billing_event","configured_status","effective_status","is_autobid","optimization_goal","rtb_flag","bid_strategy","destination_type" 2 | 936,18441,"23846477239820408",name,billing_event,configured_status,effective_status,,OFFSITE_CONVERSIONS,,bid_strategy,UNDEFINED 3 | 937,18441,"23846478519700408",name,billing_event,configured_status,effective_status,,OFFSITE_CONVERSIONS,,bid_strategy,UNDEFINED 4 | 947,18441,"23846537414400408",name,billing_event,configured_status,effective_status,,OFFSITE_CONVERSIONS,,bid_strategy,UNDEFINED 5 | 948,18441,"23846537439670408",name,billing_event,configured_status,effective_status,,OFFSITE_CONVERSIONS,,bid_strategy,UNDEFINED 6 | 1099,18441,"23846791129910408",name,billing_event,configured_status,effective_status,,????????,,bid_strategy,WEBSITE 7 | 1115,18441,"23847055652950408",name,billing_event,configured_status,effective_status,,OFFSITE_CONVERSIONS,,bid_strategy,UNDEFINED 8 | 1118,18441,"23847079511800408",name,billing_event,configured_status,effective_status,,OFFSITE_CONVERSIONS,,bid_strategy,UNDEFINED 9 | 1121,18441,"23847103904670408",name,billing_event,configured_status,effective_status,,OFFSITE_CONVERSIONS,,bid_strategy,UNDEFINED 10 | -------------------------------------------------------------------------------- /integration_tests/data/facebook/facebook_campaigns.csv: -------------------------------------------------------------------------------- 1 | "id","account_id","campaign_id","name","buying_type","configured_status","effective_status","objective","special_ad_category","bid_strategy" 2 | 183,18441,"23846477239740408",name,buying_type,configured_status,effective_status,objective,special_ad_category, 3 | 184,18441,"23846478519720408",name,buying_type,configured_status,effective_status,objective,special_ad_category, 4 | 264,18441,"23846791129830408",name,buying_type,configured_status,effective_status,objective,special_ad_category, 5 | 272,18441,"23847079420400408",name,buying_type,configured_status,effective_status,objective,special_ad_category, 6 | -------------------------------------------------------------------------------- /integration_tests/data/facebook/facebook_creatives.csv: -------------------------------------------------------------------------------- 1 | "id","account_id","creative_id","body","call_to_action_type","image_crops","image_url","link_url","name","object_id","object_story_id","object_story_spec","object_url","thumbnail_url","title","url_tags","instagram_permalink_url","object_type","status","template_url" 2 | 1373,18441,"23846478526110408",body,call_to_action_type,,,,name,,,object_story_spec,,thumbnail_url,title,url_tags,instagram_permalink_url,object_type,status, 3 | 1393,18441,"23846537420750408",body,call_to_action_type,,,,name,,,object_story_spec,,thumbnail_url,title,url_tags,instagram_permalink_url,object_type,status, 4 | 1570,18441,"23846791153360408",body,call_to_action_type,,,,name,,,object_story_spec,,thumbnail_url,title,url_tags,instagram_permalink_url,object_type,status, 5 | 1586,18441,"23846840017630408",body,call_to_action_type,,,,name,,,object_story_spec,,thumbnail_url,title,url_tags,instagram_permalink_url,object_type,status, 6 | 1587,18441,"23846840018690408",body,call_to_action_type,,,,name,,,object_story_spec,,thumbnail_url,title,url_tags,instagram_permalink_url,object_type,status, 7 | 1605,18441,"23847055970740408",body,call_to_action_type,,,,name,,,object_story_spec,,thumbnail_url,title,url_tags,instagram_permalink_url,object_type,status, 8 | 1609,18441,"23847104757500408",body,call_to_action_type,,,,name,,,object_story_spec,,thumbnail_url,title,url_tags,instagram_permalink_url,object_type,status, 9 | 1612,18441,"23847104762070408",body,call_to_action_type,,,,name,,,object_story_spec,,thumbnail_url,title,url_tags,instagram_permalink_url,object_type,status, 10 | -------------------------------------------------------------------------------- /integration_tests/data/ga/analytics_costs_facts.csv: -------------------------------------------------------------------------------- 1 | "account_id","dates_id","sites_id","traffic_id","impressions_context","impressions_search","impressions","clicks_context","clicks_search","clicks","cost_context","cost_search","cost" 2 | 18783,160886,19,4789510,0,2,2,0,0,0,0.00,0.00,0.00 3 | 18783,160886,19,4786048,0,2,2,0,0,0,0.00,0.00,0.00 4 | 18783,160886,21,4712092,0,2,2,0,1,1,0.00,12.46,12.46 5 | 18783,160886,21,4625405,0,5,5,0,0,0,0.00,0.00,0.00 6 | 18783,160886,19,4625343,0,1,1,0,0,0,0.00,0.00,0.00 7 | 18783,160886,19,4625335,0,1,1,0,0,0,0.00,0.00,0.00 8 | 18783,160886,21,4625324,15,0,15,0,0,0,0.00,0.00,0.00 9 | 18783,160886,19,4625321,10,0,10,0,0,0,0.00,0.00,0.00 10 | 18783,160886,1,795636,0,1,1,0,0,0,0.00,0.00,0.00 11 | 18783,160886,1,795632,0,3,3,0,0,0,0.00,0.00,0.00 12 | 18783,160886,1,795628,0,4,4,0,1,1,0.00,4.65,4.65 13 | 18783,160886,1,795627,0,7,7,0,0,0,0.00,0.00,0.00 14 | 18783,160886,21,772910,0,1,1,0,0,0,0.00,0.00,0.00 15 | 18783,160886,21,772894,0,1,1,0,0,0,0.00,0.00,0.00 16 | 18783,160886,19,772633,0,1,1,0,0,0,0.00,0.00,0.00 17 | 18783,160886,19,772620,0,1,1,0,0,0,0.00,0.00,0.00 18 | 18783,160886,21,772537,41,0,41,0,0,0,0.00,0.00,0.00 19 | 18783,160886,21,772535,6,0,6,0,0,0,0.00,0.00,0.00 20 | 18783,160886,21,772534,5,0,5,0,0,0,0.00,0.00,0.00 21 | 18783,160886,21,772532,1,0,1,0,0,0,0.00,0.00,0.00 22 | 18783,160886,19,772531,7,0,7,0,0,0,0.00,0.00,0.00 23 | 18783,160886,19,457448,0,1,1,0,0,0,0.00,0.00,0.00 24 | 18783,160886,19,452399,0,1,1,0,0,0,0.00,0.00,0.00 25 | 18783,159968,21,4826783,0,1,1,0,0,0,0.00,0.00,0.00 26 | 18783,159968,21,4826782,0,1,1,0,0,0,0.00,0.00,0.00 27 | 18783,159968,19,4826781,0,2,2,0,1,1,0.00,33.96,33.96 28 | 18783,159968,19,4802709,0,2,2,0,2,2,0.00,54.24,54.24 29 | 18783,159968,21,4798855,0,1,1,0,0,0,0.00,0.00,0.00 30 | 18783,159968,19,4795660,0,1,1,0,1,1,0.00,35.53,35.53 31 | 18783,159968,19,4789510,0,9,9,0,4,4,0.00,53.28,53.28 32 | 18783,159968,19,4789509,0,1,1,0,2,2,0.00,34.84,34.84 33 | 18783,159968,21,4786053,0,1,1,0,0,0,0.00,0.00,0.00 34 | 18783,159968,19,4786050,0,1,1,0,0,0,0.00,0.00,0.00 35 | 18783,159968,19,4786049,0,1,1,0,0,0,0.00,0.00,0.00 36 | 18783,159968,19,4786048,0,1,1,0,0,0,0.00,0.00,0.00 37 | 18783,159968,19,4786045,0,1,1,0,0,0,0.00,0.00,0.00 38 | 18783,159968,19,4782496,0,1,1,0,0,0,0.00,0.00,0.00 39 | 18783,159968,21,4774560,0,2,2,0,0,0,0.00,0.00,0.00 40 | 18783,159968,19,4774555,0,3,3,0,0,0,0.00,0.00,0.00 41 | 18783,159968,21,4755998,0,1,1,0,0,0,0.00,0.00,0.00 42 | 18783,159968,19,4742521,0,1,1,0,0,0,0.00,0.00,0.00 43 | 18783,159968,21,4738910,0,2,2,0,0,0,0.00,0.00,0.00 44 | 18783,159968,21,4647849,0,1,1,0,0,0,0.00,0.00,0.00 45 | 18783,159968,19,4637435,0,1,1,0,0,0,0.00,0.00,0.00 46 | 18783,159968,21,4635473,0,1,1,0,0,0,0.00,0.00,0.00 47 | 18783,159968,19,4630739,0,1,1,0,0,0,0.00,0.00,0.00 48 | 18783,159968,19,4630735,0,1,1,0,0,0,0.00,0.00,0.00 49 | 18783,159968,19,4630734,0,1,1,0,0,0,0.00,0.00,0.00 50 | 18783,159968,21,4625415,0,1,1,0,0,0,0.00,0.00,0.00 51 | 18783,159968,21,4625414,0,1,1,0,0,0,0.00,0.00,0.00 52 | 18783,159968,21,4625409,0,1,1,0,1,1,0.00,24.74,24.74 53 | 18783,159968,21,4625405,0,4,4,0,0,0,0.00,0.00,0.00 54 | 18783,159968,19,4625343,0,3,3,0,0,0,0.00,0.00,0.00 55 | 18783,159968,19,4625342,0,3,3,0,0,0,0.00,0.00,0.00 56 | 18783,159968,19,4625338,0,6,6,0,0,0,0.00,0.00,0.00 57 | 18783,159968,19,4625337,0,1,1,0,0,0,0.00,0.00,0.00 58 | 18783,159968,19,4625335,0,1,1,0,0,0,0.00,0.00,0.00 59 | 18783,159968,19,4625334,0,3,3,0,0,0,0.00,0.00,0.00 60 | 18783,159968,19,4625333,0,2,2,0,0,0,0.00,0.00,0.00 61 | 18783,159968,19,4625331,0,3,3,0,0,0,0.00,0.00,0.00 62 | 18783,159968,21,4625324,597,0,597,3,0,3,26.06,0.00,26.06 63 | 18783,159968,19,4625321,352,0,352,5,0,5,48.41,0.00,48.41 64 | 18783,159968,21,3871299,0,1,1,0,0,0,0.00,0.00,0.00 65 | 18783,159968,21,1901964,0,2,2,0,0,0,0.00,0.00,0.00 66 | 18783,159968,21,902766,0,1,1,0,0,0,0.00,0.00,0.00 67 | 18783,159968,21,821206,0,1,1,0,0,0,0.00,0.00,0.00 68 | 18783,159968,19,812009,0,1,1,0,0,0,0.00,0.00,0.00 69 | 18783,159968,21,798324,0,10,10,0,2,2,0.00,64.12,64.12 70 | 18783,159968,1,795636,0,66,66,0,2,2,0.00,27.90,27.90 71 | 18783,159968,1,795635,0,5,5,0,0,0,0.00,0.00,0.00 72 | 18783,159968,1,795634,0,203,203,0,1,1,0.00,9.83,9.83 73 | 18783,159968,1,795633,0,30,30,0,0,0,0.00,0.00,0.00 74 | 18783,159968,1,795632,0,852,852,0,12,12,0.00,120.71,120.71 75 | 18783,159968,1,795631,0,26,26,0,0,0,0.00,0.00,0.00 76 | 18783,159968,1,795630,0,24,24,0,0,0,0.00,0.00,0.00 77 | 18783,159968,1,795629,0,105,105,0,3,3,0.00,22.22,22.22 78 | 18783,159968,1,795628,0,88,88,0,5,5,0.00,37.59,37.59 79 | 18783,159968,1,795627,0,522,522,0,6,6,0.00,59.97,59.97 80 | 18783,159968,19,774019,0,1,1,0,0,0,0.00,0.00,0.00 81 | 18783,159968,19,773630,0,1,1,0,0,0,0.00,0.00,0.00 82 | 18783,159968,19,773602,0,1,1,0,0,0,0.00,0.00,0.00 83 | 18783,159968,21,773464,0,1,1,0,1,1,0.00,32.33,32.33 84 | 18783,159968,21,773426,0,1,1,0,0,0,0.00,0.00,0.00 85 | 18783,159968,19,773356,0,1,1,0,0,0,0.00,0.00,0.00 86 | 18783,159968,19,773350,0,1,1,0,0,0,0.00,0.00,0.00 87 | 18783,159968,19,773320,0,1,1,0,0,0,0.00,0.00,0.00 88 | 18783,159968,19,773317,0,2,2,0,0,0,0.00,0.00,0.00 89 | 18783,159968,19,773311,0,1,1,0,0,0,0.00,0.00,0.00 90 | 18783,159968,19,773264,0,2,2,0,0,0,0.00,0.00,0.00 91 | 18783,159968,21,773055,0,1,1,0,2,2,0.00,61.04,61.04 92 | 18783,159968,21,772990,0,1,1,0,1,1,0.00,23.03,23.03 93 | 18783,159968,21,772984,0,2,2,0,1,1,0.00,17.91,17.91 94 | 18783,159968,21,772983,0,1,1,0,0,0,0.00,0.00,0.00 95 | 18783,159968,21,772979,0,1,1,0,0,0,0.00,0.00,0.00 96 | 18783,159968,21,772978,0,3,3,0,0,0,0.00,0.00,0.00 97 | 18783,159968,21,772968,0,1,1,0,0,0,0.00,0.00,0.00 98 | 18783,159968,21,772964,0,1,1,0,0,0,0.00,0.00,0.00 99 | 18783,159968,21,772959,0,1,1,0,0,0,0.00,0.00,0.00 100 | 18783,159968,21,772958,0,1,1,0,0,0,0.00,0.00,0.00 101 | 18783,159968,21,772956,0,1,1,0,0,0,0.00,0.00,0.00 102 | -------------------------------------------------------------------------------- /integration_tests/data/ga/analytics_devices.csv: -------------------------------------------------------------------------------- 1 | "id","account_id","category","browser","browser_version","os","os_version" 2 | 1,18783,desktop,,,, 3 | 2,18783,mobile,,,, 4 | 3,18783,tablet,,,, 5 | 685,26557,mobile,Safari,"14.0.3",iOS,"14.4.2" 6 | 864,26557,desktop,Chrome,"90.0.4430.72",Windows,"10" 7 | 921,26557,desktop,Firefox,"88.0",Windows,"10" 8 | 996,26557,desktop,Chrome,"90.0.4430.93",Windows,"10" 9 | 1017,26557,mobile,Chrome,"90.0.4430.91",Android,"10" 10 | 1034,26557,mobile,Chrome,"90.0.4430.91",Android,"9" 11 | 1061,26557,desktop,YaBrowser,"21.3.3.230",Windows,"7" 12 | 1063,26557,mobile,Chrome,"87.0.4280.163",iOS,"14.5" 13 | 1069,26557,mobile,Chrome,"90.0.4430.91",Android,"8.0.0" 14 | 1099,26557,desktop,Edge,"90.0.818.56",Windows,"10" 15 | 1113,26557,desktop,Opera,"76.0.4017.107",Windows,"7" 16 | 1116,26557,mobile,Android Webview,"90.0.4430.91",Android,"11" 17 | 1120,26557,tablet,Safari,"12.1.2",iOS,"12.5.2" 18 | -------------------------------------------------------------------------------- /integration_tests/data/ga/analytics_events.csv: -------------------------------------------------------------------------------- 1 | "id","account_id","category","action","label" 2 | 1,26557,Max Scroll,increase,label 3 | 2,26557,Max Scroll,increase,label 4 | 3,26557,Max Scroll,increase,label 5 | 4,26557,Max Scroll,increase,label 6 | 5,26557,Max Scroll,increase,label 7 | 7,26557,Max Scroll,increase,label 8 | 9,26557,Max Scroll,increase,label 9 | 10,26557,Max Scroll,increase,label 10 | 11,26557,Max Scroll,increase,label 11 | 12,26557,Max Scroll,increase,label 12 | 13,26557,Max Scroll,increase,label 13 | 14,26557,Max Scroll,increase,label 14 | 17,26557,Max Scroll,increase,label 15 | 19,26557,Max Scroll,increase,label 16 | 22,26557,Max Scroll,increase,label 17 | 23,26557,Max Scroll,increase,label 18 | 24,26557,Max Scroll,increase,label 19 | 25,26557,Max Scroll,increase,label 20 | 27,26557,Max Scroll,increase,label 21 | 28,26557,Max Scroll,increase,label 22 | 30,26557,Max Scroll,increase,label 23 | 33,26557,Max Scroll,increase,label 24 | 35,26557,Max Scroll,increase,label 25 | 36,26557,Max Scroll,increase,label 26 | 38,26557,Max Scroll,increase,label 27 | 39,26557,Max Scroll,increase,label 28 | 42,26557,Max Scroll,increase,label 29 | 43,26557,Max Scroll,increase,label 30 | 44,26557,Max Scroll,increase,label 31 | 45,26557,Max Scroll,increase,label 32 | 47,26557,Max Scroll,increase,label 33 | 53,26557,Max Scroll,increase,label 34 | 54,26557,Max Scroll,increase,label 35 | 55,26557,Max Scroll,increase,label 36 | 57,26557,Max Scroll,increase,label 37 | 58,26557,Max Scroll,increase,label 38 | 63,26557,Max Scroll,increase,label 39 | 64,26557,Max Scroll,increase,label 40 | 65,26557,Max Scroll,increase,label 41 | 66,26557,Max Scroll,increase,label 42 | 75,26557,Max Scroll,increase,label 43 | 76,26557,Max Scroll,increase,label 44 | 85,26557,Outbound Link,click,label 45 | 91,26557,Outbound Link,click,label 46 | 92,26557,Outbound Link,click,label 47 | 112,26557,Page Visibility,track,label 48 | 202,26557,Outbound Link,click,label 49 | 242,26557,Outbound Link,click,label 50 | -------------------------------------------------------------------------------- /integration_tests/data/ga/analytics_events_facts.csv: -------------------------------------------------------------------------------- 1 | "id","account_id","dates_id","clientids_id","traffic_id","events_id","total_events","unique_events","event_value","locations_id","devices_id","sites_id" 2 | 135166,26557,41550,14057,1094,112,2,1,23,64,1069,1 3 | 135165,26557,41550,14057,1094,55,1,1,50,64,1069,1 4 | 135164,26557,41550,14057,1094,7,1,1,25,64,1069,1 5 | 135163,26557,41550,14057,1094,5,1,1,23,64,1069,1 6 | 135162,26557,41549,14057,1094,242,1,1,0,64,1069,1 7 | 135161,26557,41549,14057,1094,12,1,1,30,64,1069,1 8 | 134199,26557,41548,618,75,33,1,1,51,112,996,1 9 | 135160,26557,41547,14022,106,63,1,1,21,96,685,1 10 | 135159,26557,41546,14022,106,42,1,1,20,96,685,1 11 | 135158,26557,41545,14022,106,22,1,1,20,96,685,1 12 | 135157,26557,41544,14022,106,2,1,1,20,96,685,1 13 | 134098,26557,41542,13358,15,112,1,1,431,77,996,1 14 | 135156,26557,41541,14088,312,75,1,1,28,129,1017,1 15 | 135155,26557,41541,14088,312,47,1,1,40,129,1017,1 16 | 135154,26557,41540,14088,312,7,1,1,25,129,1017,1 17 | 134097,26557,41539,13358,15,13,1,1,31,77,996,1 18 | 135153,26557,41538,9004,56,45,1,1,20,37,996,1 19 | 135152,26557,41538,9004,56,25,1,1,43,37,996,1 20 | 134031,26557,41537,13932,43,112,2,1,50,110,996,1 21 | 134030,26557,41537,13932,43,5,1,1,23,110,996,1 22 | 134029,26557,41536,13932,43,65,1,1,26,110,996,1 23 | 134028,26557,41536,13932,43,39,1,1,30,110,996,1 24 | 134027,26557,41536,13932,43,9,1,1,27,110,996,1 25 | 134026,26557,41535,13932,43,66,1,1,39,110,996,1 26 | 134025,26557,41535,13932,43,27,1,1,20,110,996,1 27 | 134024,26557,41534,13932,43,7,1,1,25,110,996,1 28 | 135151,26557,41533,13987,199,36,1,1,54,157,1017,1 29 | 135150,26557,41532,14068,59,112,1,1,42,77,996,1 30 | 135149,26557,41531,14068,59,2,1,1,20,77,996,1 31 | 135148,26557,41529,14060,100,112,1,1,202,30,1034,1 32 | 135147,26557,41528,14060,100,22,1,1,20,30,1034,1 33 | 134128,26557,41528,13207,19,112,1,0,48,57,921,1 34 | 135146,26557,41527,14060,100,2,1,1,20,30,1034,1 35 | 134971,26557,41525,14135,81,35,1,1,53,130,996,1 36 | 135139,26557,41524,14010,51,112,2,1,14,77,996,1 37 | 135138,26557,41524,14010,51,30,1,1,48,77,996,1 38 | 135054,26557,41524,14038,74,14,1,1,32,157,996,1 39 | 134970,26557,41524,14135,81,85,1,1,0,130,996,1 40 | 135145,26557,41523,14020,225,112,1,0,5,72,1061,1 41 | 135144,26557,41521,14020,225,112,2,0,167,72,1061,1 42 | 135143,26557,41521,14020,225,3,1,1,21,72,1061,1 43 | 134127,26557,41520,13207,19,112,1,0,1109,57,921,1 44 | 135142,26557,41519,14020,225,112,1,1,56,72,1061,1 45 | 135141,26557,41519,14020,225,24,1,1,20,72,1061,1 46 | 135140,26557,41519,14020,225,4,1,1,22,72,1061,1 47 | 134126,26557,41517,13207,19,55,1,1,22,57,921,1 48 | 135113,26557,41516,10245,120,112,1,0,46,157,1113,1 49 | 135112,26557,41516,10245,120,92,1,1,0,157,1113,1 50 | 135127,26557,41515,14001,93,112,1,1,9,128,996,1 51 | 135137,26557,41514,14089,883,112,1,1,128,77,1116,1 52 | 135136,26557,41514,14089,883,57,1,1,22,77,1116,1 53 | 135135,26557,41514,14089,883,35,1,1,23,77,1116,1 54 | 135134,26557,41513,14089,883,12,1,1,30,77,1116,1 55 | 135111,26557,41513,10245,120,112,1,0,10,157,1113,1 56 | 135133,26557,41512,14063,56,10,1,1,28,480,1120,1 57 | 135132,26557,41512,14063,56,1,1,1,6,480,1120,1 58 | 135131,26557,41511,14063,56,76,1,1,22,480,1120,1 59 | 135130,26557,41511,14063,56,54,1,1,29,480,1120,1 60 | 135129,26557,41511,14063,56,25,1,1,22,480,1120,1 61 | 135128,26557,41511,14063,56,3,1,1,21,480,1120,1 62 | 135110,26557,41510,10245,120,112,1,0,23,157,1113,1 63 | 134125,26557,41510,13207,19,33,1,1,23,57,921,1 64 | 134124,26557,41509,13207,19,112,1,1,16,57,921,1 65 | 134123,26557,41509,13207,19,92,1,1,0,57,921,1 66 | 134122,26557,41509,13207,19,10,1,1,28,57,921,1 67 | 135102,26557,41507,14040,93,112,1,0,228,27,996,1 68 | 135101,26557,41507,14040,93,53,1,0,29,27,996,1 69 | 135100,26557,41506,14040,93,24,1,0,21,27,996,1 70 | 135099,26557,41506,14040,93,3,1,0,21,27,996,1 71 | 135117,26557,41505,13984,103,112,1,1,787,11,864,1 72 | 135109,26557,41505,10245,120,112,3,0,196,157,1113,1 73 | 135108,26557,41505,10245,120,91,1,1,0,157,1113,1 74 | 135107,26557,41505,10245,120,64,1,1,21,157,1113,1 75 | 135126,26557,41504,14085,75,44,1,1,22,11,1063,1 76 | 135098,26557,41504,14040,93,112,4,0,78,27,996,1 77 | 135097,26557,41504,14040,93,11,1,1,29,27,996,1 78 | 135116,26557,41503,13984,103,58,1,1,20,11,864,1 79 | 135106,26557,41503,10245,120,112,1,1,600,157,1113,1 80 | 135096,26557,41503,14040,93,112,1,0,65,27,996,1 81 | 135125,26557,41502,14085,75,22,1,1,20,11,1063,1 82 | 135115,26557,41502,13984,103,38,1,1,21,11,864,1 83 | 135095,26557,41502,14040,93,112,1,0,9,27,996,1 84 | 135094,26557,41502,14040,93,53,1,1,25,27,996,1 85 | 135093,26557,41502,14040,93,19,1,1,37,27,996,1 86 | 135105,26557,41501,10245,120,43,1,1,20,157,1113,1 87 | 135124,26557,41500,14085,75,2,1,1,20,11,1063,1 88 | 135123,26557,41499,14141,35,112,1,0,66,77,1099,1 89 | 135122,26557,41499,14141,35,1,1,1,37,77,1099,1 90 | 135121,26557,41498,14141,35,112,1,1,77,77,1099,1 91 | 135120,26557,41498,14141,35,45,1,1,22,77,1099,1 92 | 135119,26557,41498,14141,35,23,1,1,21,77,1099,1 93 | 135118,26557,41497,14141,35,2,1,1,20,77,1099,1 94 | 135104,26557,41497,10245,120,23,1,1,21,157,1113,1 95 | 135103,26557,41496,10245,120,2,1,1,20,157,1113,1 96 | 135114,26557,41495,13984,103,17,1,1,35,11,864,1 97 | 135092,26557,41492,14040,93,112,2,0,67,27,996,1 98 | 135091,26557,41492,14040,93,202,1,1,0,27,996,1 99 | 135090,26557,41492,14040,93,23,1,1,20,27,996,1 100 | 135089,26557,41491,14040,93,112,3,0,114,27,996,1 101 | 135088,26557,41491,14040,93,28,1,1,25,27,996,1 102 | -------------------------------------------------------------------------------- /integration_tests/data/ga/analytics_goals.csv: -------------------------------------------------------------------------------- 1 | "id","account_id","goal_id","name","active" 2 | 7,18783,7,name,1 3 | 9,18783,9,name,1 4 | 15,18783,15,name,1 5 | 18,18783,18,name,1 6 | 19,18783,19,name,1 7 | -------------------------------------------------------------------------------- /integration_tests/data/ga/analytics_goals_facts.csv: -------------------------------------------------------------------------------- 1 | "account_id","dates_id","sites_id","clientids_id","devices_id","traffic_id","locations_id","goals_id","completions","goal_value" 2 | 18783,160886,19,1,1,116944,5087,19,1,"0,00" 3 | 18783,160886,21,1,2,494706,1280,19,1,"0,00" 4 | 18783,160886,21,1,2,494706,1280,18,1,"0,00" 5 | 18783,160886,21,1,2,494706,1280,15,1,"0,00" 6 | 18783,160886,19,1,1,116873,1234,19,1,"0,00" 7 | 18783,160886,19,1,1,116873,1234,18,1,"0,00" 8 | 18783,160886,19,1,1,116873,1234,15,1,"0,00" 9 | 18783,160886,19,1,1,116873,1234,7,1,"0,00" 10 | 18783,160886,19,1,2,15645,1234,19,2,"0,00" 11 | 18783,160886,19,1,2,15645,1234,18,1,"0,00" 12 | 18783,160886,19,1,2,15645,1234,15,2,"0,00" 13 | 18783,160886,19,1,1,4824539,1234,19,1,"0,00" 14 | 18783,160886,19,1,1,4826754,1280,19,1,"0,00" 15 | 18783,160886,19,1,1,4826754,1280,9,1,"0,00" 16 | 18783,160886,21,1,1,4792996,1280,19,1,"0,00" 17 | 18783,160886,21,1,1,4792996,1280,18,1,"0,00" 18 | 18783,160886,21,1,1,4792996,1280,15,1,"0,00" 19 | 18783,160886,21,1,2,4786017,1280,19,1,"0,00" 20 | 18783,160886,21,1,2,4786017,1280,18,1,"0,00" 21 | 18783,160886,21,1,2,4786017,1280,15,1,"0,00" 22 | 18783,160886,21,1,2,4782461,1280,19,1,"0,00" 23 | 18783,160886,21,1,2,4782461,1280,15,1,"0,00" 24 | 18783,160886,19,1,2,4826744,1,19,1,"0,00" 25 | 18783,160886,19,1,2,4826744,1,15,1,"0,00" 26 | 18783,160886,21,1,1,803327,1280,19,1,"0,00" 27 | 18783,160886,21,1,1,803327,1280,15,1,"0,00" 28 | 18783,160886,19,1,1,806429,1234,19,1,"0,00" 29 | 18783,160886,19,1,2,4680524,1234,19,1,"0,00" 30 | 18783,160886,19,1,2,4680524,1234,15,1,"0,00" 31 | 18783,160886,19,1,1,809987,1234,19,1,"0,00" 32 | 18783,160886,19,1,2,54369,1203,19,1,"0,00" 33 | 18783,160886,19,1,2,15398,1234,19,1,"0,00" 34 | 18783,160886,19,1,2,15398,1234,18,1,"0,00" 35 | 18783,160886,19,1,2,15398,1234,15,1,"0,00" 36 | 18783,160886,19,1,2,116729,1234,19,1,"0,00" 37 | 18783,160886,19,1,2,116729,1234,15,1,"0,00" 38 | 18783,160886,20,1,2,4826720,1234,18,1,"0,00" 39 | 18783,160886,20,1,2,4826720,1234,15,1,"0,00" 40 | 18783,160886,19,1,2,4826720,1234,19,1,"0,00" 41 | 18783,160886,21,1,2,116708,1280,15,1,"0,00" 42 | 18783,160886,21,1,2,116708,1280,7,1,"0,00" 43 | 18783,160886,21,1,2,535546,1280,19,1,"0,00" 44 | 18783,160886,21,1,2,535546,1280,15,1,"0,00" 45 | 18783,160886,21,1,2,116679,1280,19,1,"0,00" 46 | 18783,160886,21,1,2,116679,1280,18,1,"0,00" 47 | 18783,160886,21,1,2,116679,1280,15,1,"0,00" 48 | 18783,160886,21,1,2,116679,1280,9,1,"0,00" 49 | 18783,160886,19,1,2,116708,1280,19,1,"0,00" 50 | 18783,160886,19,1,2,116708,1280,18,1,"0,00" 51 | 18783,160886,19,1,2,116661,1234,19,1,"0,00" 52 | 18783,160886,19,1,2,116661,1234,18,1,"0,00" 53 | 18783,160886,19,1,2,116661,1234,15,1,"0,00" 54 | 18783,160886,21,1,2,4712035,1280,19,1,"0,00" 55 | 18783,160886,21,1,2,4712035,1280,18,1,"0,00" 56 | 18783,160886,21,1,2,4712035,1280,15,1,"0,00" 57 | 18783,160886,21,1,2,772350,1280,19,1,"0,00" 58 | 18783,160886,21,1,2,772350,1280,18,1,"0,00" 59 | 18783,160886,21,1,2,772350,1280,15,1,"0,00" 60 | 18783,160886,21,1,1,4826688,1280,19,1,"0,00" 61 | 18783,160886,21,1,1,4826688,1280,15,1,"0,00" 62 | 18783,160886,21,1,1,4826688,1280,9,1,"0,00" 63 | 18783,160886,19,1,2,4826697,1234,19,1,"0,00" 64 | 18783,160886,19,1,2,4826697,1234,15,1,"0,00" 65 | 18783,160886,19,1,2,137784,1234,19,1,"0,00" 66 | 18783,160886,19,1,2,137784,1234,15,1,"0,00" 67 | 18783,160886,19,1,2,14753,1234,19,1,"0,00" 68 | 18783,160886,21,1,2,4826777,1280,19,1,"0,00" 69 | 18783,160886,21,1,2,4826777,1280,15,1,"0,00" 70 | 18783,160886,19,1,2,151584,1234,19,1,"0,00" 71 | 18783,160886,19,1,2,116523,1234,19,1,"0,00" 72 | 18783,160886,19,1,2,116523,1234,18,1,"0,00" 73 | 18783,160886,19,1,2,116523,1234,15,1,"0,00" 74 | 18783,160886,19,1,2,116523,1234,7,1,"0,00" 75 | 18783,160886,19,1,1,116523,1234,19,2,"0,00" 76 | 18783,160886,19,1,1,116523,1234,15,1,"0,00" 77 | 18783,160886,19,1,1,116523,1234,9,1,"0,00" 78 | 18783,159968,19,1,3,60592,1234,19,1,"0,00" 79 | 18783,159968,19,1,3,60592,1234,15,1,"0,00" 80 | 18783,159968,19,1,2,60592,1497,19,1,"0,00" 81 | 18783,159968,19,1,2,60592,1497,18,1,"0,00" 82 | 18783,159968,19,1,2,60592,1497,15,1,"0,00" 83 | 18783,159968,19,1,2,60592,1497,7,1,"0,00" 84 | 18783,159968,19,1,1,60592,1,19,1,"0,00" 85 | 18783,159968,19,1,1,60592,1,15,1,"0,00" 86 | 18783,159968,19,1,3,116959,1,19,1,"0,00" 87 | 18783,159968,19,1,3,116959,1,9,1,"0,00" 88 | 18783,159968,19,1,2,116959,1234,9,1,"0,00" 89 | 18783,159968,19,1,2,116952,4240,19,1,"0,00" 90 | 18783,159968,19,1,2,116952,4240,15,1,"0,00" 91 | 18783,159968,19,1,2,116952,4240,9,1,"0,00" 92 | 18783,159968,19,1,2,116952,4446,19,1,"0,00" 93 | 18783,159968,19,1,2,116952,4446,15,1,"0,00" 94 | 18783,159968,19,1,1,116952,1,19,1,"0,00" 95 | 18783,159968,19,1,1,116952,1,15,1,"0,00" 96 | 18783,159968,19,1,1,116952,1,9,1,"0,00" 97 | 18783,159968,20,1,1,4826776,2044,7,1,"0,00" 98 | 18783,159968,20,1,1,4826775,2044,19,1,"0,00" 99 | -------------------------------------------------------------------------------- /integration_tests/data/ga/analytics_mcf_facts.csv: -------------------------------------------------------------------------------- 1 | "id","account_id","dates_id","traffic_id","assisted_count","assisted_value","first_count","first_value","last_count","last_value","total_count","total_value","conversion_type","goal_number" 2 | 965,26557,41555,3,3,114200,1,31900,3,114200,3,114200,Goal,"001" 3 | 966,26557,41555,50,2,82300,5,239900,4,208300,6,290600,Goal,"001" 4 | 967,26557,41555,467,1,50700,1,50700,0,000,1,50700,Goal,"001" 5 | 962,26557,40953,3,1,71300,1,43800,1,43800,2,115100,Goal,"001" 6 | 963,26557,40953,50,0,000,3,237800,4,309100,4,309100,Goal,"001" 7 | 964,26557,40953,467,1,71300,1,71300,0,000,1,71300,Goal,"001" 8 | 960,26557,40639,3,8,549300,6,460900,7,499600,8,549300,Goal,"001" 9 | 961,26557,40639,50,2,88400,4,229300,3,190600,5,279000,Goal,"001" 10 | 948,26557,40385,3,6,324700,4,254100,10,655600,10,655600,Goal,"001" 11 | 949,26557,40385,50,6,401500,9,564700,3,163200,9,564700,Goal,"001" 12 | 942,26557,40098,3,3,302000,1,149100,6,528100,6,528100,Goal,"001" 13 | 943,26557,40098,50,5,379000,13,800200,8,421200,13,800200,Goal,"001" 14 | 935,26557,39652,3,9,611900,8,730600,16,1291200,16,1291200,Goal,"001" 15 | 936,26557,39652,50,8,560600,24,1617700,16,1057100,24,1617700,Goal,"001" 16 | 937,26557,39652,176,0,000,1,49300,1,49300,1,49300,Goal,"001" 17 | 928,26557,39184,3,4,303400,6,303000,7,455000,7,455000,Goal,"001" 18 | 929,26557,39184,50,1,152000,11,714200,10,562200,11,714200,Goal,"001" 19 | 920,26557,38629,3,4,357400,5,408100,4,152200,6,438200,Goal,"001" 20 | 921,26557,38629,50,2,177400,3,175100,4,431000,5,461100,Goal,"001" 21 | 922,26557,38629,326,1,147300,0,000,0,000,1,147300,Goal,"001" 22 | 913,26557,38114,3,2,146200,5,408600,7,487300,7,487300,Goal,"001" 23 | 914,26557,38114,50,2,78700,3,193900,1,115200,3,193900,Goal,"001" 24 | 906,26557,37781,3,3,201400,3,201400,3,201400,3,201400,Goal,"001" 25 | 907,26557,37781,50,0,000,3,222900,3,222900,3,222900,Goal,"001" 26 | 899,26557,37432,3,5,327300,6,322400,8,445800,8,445800,Goal,"001" 27 | 900,26557,37432,50,2,123400,15,909500,13,786100,15,909500,Goal,"001" 28 | 901,26557,37432,177,1,79800,0,000,0,000,1,79800,Goal,"001" 29 | 891,26557,37196,3,8,501600,10,755400,13,856700,13,856700,Goal,"001" 30 | 892,26557,37196,3,1,000,1,000,1,000,1,000,Goal,"002" 31 | 893,26557,37196,50,3,101300,19,926700,16,825400,19,926700,Goal,"001" 32 | 873,26557,36021,3,8,516500,12,742500,16,981500,17,1048500,Goal,"001" 33 | 874,26557,36021,50,5,306000,19,1425000,15,1186000,20,1492000,Goal,"001" 34 | 875,26557,36021,170,1,67000,0,000,0,000,1,67000,Goal,"001" 35 | 882,26557,35423,3,8,541300,9,571600,12,773100,12,773100,Goal,"001" 36 | 883,26557,35423,50,2,123700,10,505200,8,381500,10,505200,Goal,"001" 37 | 884,26557,35423,903,1,77800,2,113300,1,35500,2,113300,Goal,"001" 38 | 864,26557,35421,3,7,420700,13,722100,22,1330900,22,1330900,Goal,"001" 39 | 865,26557,35421,50,8,532200,22,1404700,14,872500,22,1404700,Goal,"001" 40 | 866,26557,35421,176,1,76600,1,76600,0,000,1,76600,Goal,"001" 41 | 855,26557,34797,3,6,367100,8,589700,7,514900,8,589700,Goal,"001" 42 | 856,26557,34797,50,0,000,4,274600,5,349400,5,349400,Goal,"001" 43 | 857,26557,34797,172,0,000,1,136900,1,136900,1,136900,Goal,"001" 44 | 844,26557,34145,3,4,201000,4,235700,9,691100,9,691100,Goal,"001" 45 | 845,26557,34145,3,0,000,1,000,1,000,1,000,Goal,"002" 46 | 846,26557,34145,50,3,276100,7,496500,4,220400,7,496500,Goal,"001" 47 | 847,26557,34145,176,1,115600,1,115600,0,000,1,115600,Goal,"001" 48 | 848,26557,34145,177,1,63700,1,63700,0,000,1,63700,Goal,"001" 49 | 825,26557,33769,3,8,476900,12,740200,16,946900,16,946900,Goal,"001" 50 | 826,26557,33769,50,3,118900,16,923200,13,804300,16,923200,Goal,"001" 51 | 827,26557,33769,177,1,87800,1,87800,0,000,1,87800,Goal,"001" 52 | 806,26557,33480,3,11,644200,9,456300,17,1069800,17,1069800,Goal,"001" 53 | 807,26557,33480,50,7,509200,21,1400600,14,891400,21,1400600,Goal,"001" 54 | 808,26557,33480,325,1,104300,1,104300,0,000,1,104300,Goal,"001" 55 | 798,26557,31700,3,8,528600,5,303700,11,713800,11,713800,Goal,"001" 56 | 799,26557,31700,50,6,410100,22,1131300,16,721200,22,1131300,Goal,"001" 57 | 777,26557,31699,3,7,384500,7,581600,13,868600,13,868600,Goal,"001" 58 | 778,26557,31699,50,6,287000,25,1245900,19,958900,25,1245900,Goal,"001" 59 | 779,26557,31699,170,0,000,1,36100,1,36100,1,36100,Goal,"001" 60 | 790,26557,31023,3,17,1136500,15,849000,25,1711200,26,1741400,Goal,"001" 61 | 791,26557,31023,50,11,892400,28,2029100,17,1136700,28,2029100,Goal,"001" 62 | 792,26557,31023,170,0,000,0,000,1,30200,1,30200,Goal,"001" 63 | 760,26557,30416,3,0,000,1,58300,2,93500,2,93500,Goal,"001" 64 | 761,26557,30416,50,1,35200,3,125100,2,89900,3,125100,Goal,"001" 65 | 768,26557,30057,3,5,364800,4,297300,6,429600,7,461700,Goal,"001" 66 | 769,26557,30057,50,3,164400,7,360100,4,195700,7,360100,Goal,"001" 67 | 770,26557,30057,170,0,000,0,000,1,32100,1,32100,Goal,"001" 68 | 751,26557,30055,3,9,746700,12,718100,19,1201700,19,1201700,Goal,"001" 69 | 752,26557,30055,50,8,549500,16,955800,9,472200,17,1021700,Goal,"001" 70 | 753,26557,30055,171,1,65900,0,000,0,000,1,65900,Goal,"001" 71 | 754,26557,30055,326,1,75500,0,000,0,000,1,75500,Goal,"001" 72 | 742,26557,29761,3,5,358600,4,299800,10,678700,10,678700,Goal,"001" 73 | 743,26557,29761,50,6,378900,25,1429100,19,1050200,25,1429100,Goal,"001" 74 | 744,26557,29761,326,1,57800,0,000,0,000,1,57800,Goal,"001" 75 | 731,26557,29241,3,5,655300,8,853600,12,1020400,12,1020400,Goal,"001" 76 | 732,26557,29241,3,1,000,1,000,1,000,1,000,Goal,"002" 77 | 733,26557,29241,50,5,301700,20,1116000,16,949200,21,1250900,Goal,"001" 78 | 734,26557,29241,177,1,134900,0,000,0,000,1,134900,Goal,"001" 79 | 722,26557,28646,3,4,282100,8,533700,11,744500,12,795700,Goal,"001" 80 | 723,26557,28646,50,4,262000,17,988700,14,777900,18,1039900,Goal,"001" 81 | 714,26557,28080,3,4,311600,4,266500,10,716000,10,716000,Goal,"001" 82 | 715,26557,28080,50,6,449500,21,1312800,15,863300,21,1312800,Goal,"001" 83 | 708,26557,27508,3,2,164600,4,423000,6,545000,6,545000,Goal,"001" 84 | 709,26557,27508,50,2,122000,7,434600,5,312600,7,434600,Goal,"001" 85 | 702,26557,26978,3,2,78500,5,268100,7,404300,7,404300,Goal,"001" 86 | 703,26557,26978,50,2,136200,4,301200,2,165000,4,301200,Goal,"001" 87 | 695,26557,26692,3,4,222300,6,430000,9,610900,9,610900,Goal,"001" 88 | 696,26557,26692,50,3,180900,14,808900,11,628000,14,808900,Goal,"001" 89 | 697,26557,26692,826,0,000,1,48600,1,48600,1,48600,Goal,"001" 90 | 675,26557,25924,3,7,536300,9,533400,11,636100,12,759900,Goal,"001" 91 | 676,26557,25924,50,4,337600,22,1411000,19,1197200,23,1534800,Goal,"001" 92 | 677,26557,25924,326,0,000,0,000,1,111100,1,111100,Goal,"001" 93 | 678,26557,25924,176,0,000,2,117500,2,117500,2,117500,Goal,"001" 94 | 686,26557,25331,3,6,350000,8,535500,12,728200,12,728200,Goal,"001" 95 | 687,26557,25331,50,5,263000,16,978600,12,785900,17,1048900,Goal,"001" 96 | 688,26557,25331,175,1,42800,1,32900,1,32900,2,75700,Goal,"001" 97 | 689,26557,25331,177,1,70300,0,000,0,000,1,70300,Goal,"001" 98 | 664,26557,25329,3,8,511500,8,499800,13,864300,13,864300,Goal,"001" 99 | 665,26557,25329,50,5,364500,22,1240300,17,875800,22,1240300,Goal,"001" 100 | 666,26557,25329,326,1,60400,0,000,0,000,1,60400,Goal,"001" 101 | 653,26557,23335,3,10,748500,5,476600,15,1172400,15,1172400,Goal,"001" 102 | -------------------------------------------------------------------------------- /integration_tests/data/gaw/adwords_adgroups.csv: -------------------------------------------------------------------------------- 1 | "id","account_id","adgroup_id","name","status","labels","tracking_url_template" 2 | 28,18380,"103029191751",name,enabled,--,-- 3 | 29,18380,"103029191911",name,enabled,--,-- 4 | 30,18380,"103029193431",name,enabled,--,-- 5 | 45,18380,"99350939479",name,enabled,--,-- 6 | 47,18380,"99626519665",name,enabled,--,-- 7 | 48,18380,"99626519705",name,enabled,--,-- 8 | 50,18380,"99626519905",name,enabled,--,-- 9 | 51,18380,"99626519945",name,enabled,--,-- 10 | 55,18380,"99626520225",name,enabled,--,-- 11 | 56,18380,"99626520465",name,enabled,--,-- 12 | 59,18380,"99626520865",name,enabled,--,-- 13 | 60,18380,"100058403029",name,enabled,--,-- 14 | 61,18380,"100058403069",name,enabled,--,-- 15 | 62,18380,"100058403269",name,enabled,--,-- 16 | 63,18380,"100058403309",name,enabled,--,-- 17 | 66,18380,"100058404069",name,enabled,--,-- 18 | 70,18380,"100959699112",name,enabled,--,-- 19 | 71,18380,"100959699272",name,enabled,--,-- 20 | 81,18380,"102105136778",name,removed,--,-- 21 | 82,18380,"102105136938",name,enabled,--,-- 22 | 97,18380,"105915196252",name,removed,--,-- 23 | 98,18380,"105915237252",name,enabled,--,-- 24 | 99,18380,"105915237732",name,enabled,--,-- 25 | 100,18380,"105915237772",name,enabled,--,-- 26 | 101,18380,"105915237812",name,enabled,--,-- 27 | 107,18380,"99350938079",name,enabled,--,-- 28 | 114,18380,"99626520905",name,enabled,--,-- 29 | 119,18380,"99704291519",name,enabled,--,-- 30 | 120,18380,"99704291679",name,enabled,--,-- 31 | 121,18380,"99704291719",name,enabled,--,-- 32 | 122,18380,"99704291759",name,enabled,--,-- 33 | 123,18380,"99704291919",name,enabled,--,-- 34 | 124,18380,"99704291959",name,enabled,--,-- 35 | 125,18380,"99704291999",name,enabled,--,-- 36 | 143,18380,"96155088370",name,enabled,--,-- 37 | 145,18380,"96155088610",name,enabled,--,-- 38 | 147,18380,"102622152684",name,enabled,--,-- 39 | 148,18380,"102622152844",name,enabled,--,-- 40 | 149,18380,"102622152884",name,enabled,--,-- 41 | 153,18380,"102622153164",name,enabled,--,-- 42 | 159,18380,"102622153804",name,enabled,--,-- 43 | 161,18380,"102622154084",name,enabled,--,-- 44 | 163,18380,"102622154324",name,enabled,--,-- 45 | 170,18380,"102622154524",name,enabled,--,-- 46 | 359,18380,"101596754552",name,enabled,--,-- 47 | 893,18380,"99605366621",name,enabled,--,-- 48 | 894,18380,"99738380581",name,enabled,--,-- 49 | 895,18380,"99738380621",name,enabled,--,-- 50 | 896,18380,"99738380781",name,paused,--,-- 51 | 898,18380,"101741646423",name,enabled,--,-- 52 | 899,18380,"101741646903",name,enabled,--,-- 53 | 900,18380,"101741646943",name,enabled,--,-- 54 | 901,18380,"102405585519",name,enabled,--,-- 55 | 902,18380,"102405585599",name,enabled,--,-- 56 | 903,18380,"107105068550",name,enabled,--,-- 57 | 904,18380,"107105068750",name,enabled,--,-- 58 | 905,18380,"107105068790",name,enabled,--,-- 59 | 906,18380,"107105068950",name,enabled,--,-- 60 | 907,18380,"107105068990",name,enabled,--,-- 61 | -------------------------------------------------------------------------------- /integration_tests/data/gaw/adwords_campaigns.csv: -------------------------------------------------------------------------------- 1 | "id","account_id","campaign_id","name","status","serving_status","ad_serving_optimization_status","advertising_channel_type","advertising_channel_sub_type","labels","end_date","is_actual","start_date","tracking_url_template","app_id","app_vendor" 2 | 4,18380,"9847409902",name,enabled,eligible,,Search,--,--,,1,,--,, 3 | 5,18380,"9847410160",name,enabled,eligible,,Search,--,--,,1,,--,, 4 | 10,18380,"9849435063",name,enabled,eligible,,Search,--,--,,1,,--,, 5 | 11,18380,"9849435279",name,enabled,eligible,,Search,--,--,,1,,--,, 6 | 13,18380,"9840237560",name,enabled,eligible,,Search,--,--,,1,,--,, 7 | 15,18380,"9925009879",name,enabled,eligible,,Search,--,--,,1,,--,, 8 | 17,18380,"9930043133",name,enabled,eligible,,Search,--,--,,1,,--,, 9 | 18,18380,"9930043139",name,enabled,eligible,,Search,--,--,,1,,--,, 10 | 19,18380,"9931283039",name,enabled,eligible,,Search,--,--,,1,,--,, 11 | 20,18380,"9940874520",name,enabled,eligible,,Search,--,--,,1,,--,, 12 | 21,18380,"9940874583",name,enabled,eligible,,Search,--,--,,1,,--,, 13 | 27,18380,"10007159474",name,enabled,eligible,,Display,--,--,,1,,--,, 14 | 29,18380,"10019455845",name,enabled,eligible,,Display,--,--,,1,,--,, 15 | 90,18380,"10325129161",name,enabled,eligible,,Display,--,--,,1,,--,, 16 | 91,18380,"10343938761",name,enabled,eligible,,Display,--,--,,1,,--,, 17 | 92,18380,"10355530774",name,enabled,eligible,,Search,--,--,,1,,--,, 18 | 93,18380,"10377590394",name,enabled,eligible,,Search,--,--,,1,,--,, 19 | -------------------------------------------------------------------------------- /integration_tests/data/gaw/adwords_keywords.csv: -------------------------------------------------------------------------------- 1 | "id","account_id","keyword_id","final_urls","name","first_page_cpc","status","top_of_page_cpc" 2 | 41,18380,"298671065906",--,name,"166930000",enabled,74920000 3 | 42,18380,"298920248547",--,name,"122100000",enabled,76160000 4 | 54,18380,"303660249291",--,name,"78330000",enabled,36530000 5 | 57,18380,"306132502966",--,name,"51830000",enabled,12480000 6 | 63,18380,"308200242633",--,name,"95610000",enabled,10870000 7 | 68,18380,"312016354246",--,name,"25270000",enabled,15930000 8 | 75,18380,"317058795010",--,name,"87510000",enabled,53410000 9 | 83,18380,"318289001734",--,name,"116570000",enabled,11920000 10 | 91,18380,"319073688224",--,name,"86050000",enabled,37170000 11 | 97,18380,"328022446782",--,name,"130000",enabled,130000 12 | 99,18380,"334257559870",--,name,"22730000",enabled,22730000 13 | 102,18380,"354498273525",--,name,"29030000",enabled,29030000 14 | 105,18380,"366655977484",--,name,--,enabled,0 15 | 109,18380,"371784857717",--,name,"45970000",enabled,13090000 16 | 110,18380,"378997028127",--,name,"8690000",enabled,8690000 17 | 114,18380,"384059855904",--,name,"540000",enabled,540000 18 | 117,18380,"399761871005",--,name,--,enabled,0 19 | 123,18380,"426005634437",--,name,"117110000",enabled,15560000 20 | 126,18380,"441352261646",--,name,"40980000",enabled,9980000 21 | 141,18380,"752723782538",--,name,"76050000",enabled,27610000 22 | 145,18380,"898855753588",--,name,"290000",enabled,290000 23 | 146,18380,"898855753668",--,name,"110000",enabled,110000 24 | 147,18380,"898855754308",--,name,"290000",enabled,290000 25 | 150,18380,"898855758188",--,name,"6350000",enabled,6350000 26 | 151,18380,"898855761828",--,name,"310000",enabled,310000 27 | 172,18380,"29285357507",--,name,"105750000",enabled,105750000 28 | 178,18380,"300916934089",--,name,"43790000",enabled,28300000 29 | 180,18380,"301041066645",--,name,"41580000",enabled,25840000 30 | 182,18380,"301930155325",--,name,--,enabled,295080000 31 | 184,18380,"302500979519",--,name,"38380000",enabled,17600000 32 | 198,18380,"310131272763",--,name,--,enabled,0 33 | 206,18380,"316447394813",--,name,"36740000",enabled,36740000 34 | 217,18380,"336662715548",--,name,"16940000",enabled,16940000 35 | 232,18380,"366655978204",--,name,"17430000",enabled,17430000 36 | 238,18380,"377192926010",--,name,"96700000",enabled,48650000 37 | 245,18380,"394219290179",--,name,"35750000",enabled,18930000 38 | 252,18380,"432604749029",--,name,"35650000",enabled,31230000 39 | 258,18380,"46001344059",--,name,"38450000",enabled,7080000 40 | 260,18380,"505060822792",--,name,"58920000",enabled,13450000 41 | 263,18380,"524254527063",--,name,"3240000",enabled,3240000 42 | 267,18380,"618842784638",--,name,--,enabled,0 43 | 282,18380,"822262604550",--,name,--,enabled,0 44 | 295,18380,"899439784262",--,name,"5420000",enabled,5420000 45 | 296,18380,"899439784462",--,name,"49490000",enabled,21850000 46 | 301,18380,"899439786142",--,name,"78370000",enabled,3120000 47 | 311,18380,"899439845182",--,name,--,enabled,0 48 | 318,18380,"900597408440",--,name,"810000",enabled,810000 49 | 335,18380,"923455169754",--,name,"66470000",enabled,66470000 50 | 355,18380,"298920248627",--,name,"302780000",enabled,138330000 51 | 389,18380,"899439851502",--,name,"79790000",enabled,4270000 52 | 393,18380,"898855754108",--,name,"7600000",enabled,7600000 53 | 1382,18380,"320327177195",--,name,"51510000",enabled,30720000 54 | 1384,18380,"356111317113",--,name,"79070000",enabled,31220000 55 | 1385,18380,"356111318633",--,name,"79700000",enabled,6880000 56 | 1405,18380,"905858461576",--,name,--,enabled,0 57 | 1407,18380,"905858462336",--,name,"79350000",enabled,12680000 58 | 1418,18380,"905858448856",--,name,"27090000",enabled,27090000 59 | 1419,18380,"905858462776",--,name,"31530000",enabled,70000 60 | 1437,18380,"801699407736",--,name,"31840000",enabled,30520000 61 | 1440,18380,"905858449136",--,name,--,enabled,43720000 62 | 1442,18380,"905858449856",--,name,"28260000",enabled,25530000 63 | 1446,18380,"905858461656",--,name,--,enabled,0 64 | 1634,18380,"905858461816",--,name,"25960000",enabled,25960000 65 | 1635,18380,"905858462576",--,name,"48330000",enabled,31470000 66 | 1641,18380,"905858463056",--,name,"20340000",enabled,15170000 67 | 1841,18380,"905858448936",--,name,"78940000",enabled,19320000 68 | 2248,18380,"905858448616",--,name,"78050000",enabled,30650000 69 | 2549,18380,"905858459696",--,name,"22210000",enabled,22210000 70 | 2632,18380,"1088535022552",--,name,--,enabled,375980000 71 | 2635,18380,"303365912366",--,name,--,enabled,63100000 72 | 2636,18380,"303969344559",--,name,--,enabled,209840000 73 | 2637,18380,"307845919578",--,name,--,enabled,181540000 74 | 2638,18380,"313999182226",--,name,--,enabled,37180000 75 | 2639,18380,"323194948695",--,name,--,enabled,108910000 76 | 2640,18380,"326237481529",--,name,--,enabled,70960000 77 | -------------------------------------------------------------------------------- /integration_tests/data/gaw/adwords_location_criterions.csv: -------------------------------------------------------------------------------- 1 | "id","account_id","campaigns_id","criterion_id","location_name","display_type","targeting_status","is_negative" 2 | 7337,18380,13,"20949",Moscow Oblast,Region,ACTIVE,0 3 | 7338,18380,13,"1011969",Moscow,City,ACTIVE,0 4 | 7345,18380,4,"20949",Moscow Oblast,Region,ACTIVE,0 5 | 7346,18380,4,"1011969",Moscow,City,ACTIVE,0 6 | 7347,18380,5,"20949",Moscow Oblast,Region,ACTIVE,0 7 | 7348,18380,5,"1011969",Moscow,City,ACTIVE,0 8 | 7355,18380,10,"20949",Moscow Oblast,Region,ACTIVE,0 9 | 7356,18380,10,"1011969",Moscow,City,ACTIVE,0 10 | 7357,18380,11,"20949",Moscow Oblast,Region,ACTIVE,0 11 | 7358,18380,11,"1011969",Moscow,City,ACTIVE,0 12 | 7359,18380,15,"20949",Moscow Oblast,Region,ACTIVE,0 13 | 7360,18380,15,"1011969",Moscow,City,ACTIVE,0 14 | 7363,18380,17,"20949",Moscow Oblast,Region,ACTIVE,0 15 | 7364,18380,17,"1011969",Moscow,City,ACTIVE,0 16 | 7365,18380,18,"20949",Moscow Oblast,Region,ACTIVE,0 17 | 7366,18380,18,"1011969",Moscow,City,ACTIVE,0 18 | 7369,18380,19,"20949",Moscow Oblast,Region,ACTIVE,0 19 | 7370,18380,19,"1011969",Moscow,City,ACTIVE,0 20 | 7371,18380,20,"20949",Moscow Oblast,Region,ACTIVE,0 21 | 7372,18380,20,"1011969",Moscow,City,ACTIVE,0 22 | 7373,18380,21,"20949",Moscow Oblast,Region,ACTIVE,0 23 | 7374,18380,21,"1011969",Moscow,City,ACTIVE,0 24 | 7375,18380,27,"20949",Moscow Oblast,Region,ACTIVE,0 25 | 7376,18380,27,"1011969",Moscow,City,ACTIVE,0 26 | 7377,18380,29,"20949",Moscow Oblast,Region,ACTIVE,0 27 | 7378,18380,29,"1011969",Moscow,City,ACTIVE,0 28 | 7379,18380,90,"20949",Moscow Oblast,Region,ACTIVE,0 29 | 7380,18380,90,"1011969",Moscow,City,ACTIVE,0 30 | 7381,18380,91,"20949",Moscow Oblast,Region,ACTIVE,0 31 | 7382,18380,91,"1011969",Moscow,City,ACTIVE,0 32 | 7383,18380,92,"20949",Moscow Oblast,Region,ACTIVE,0 33 | 7384,18380,92,"1011969",Moscow,City,ACTIVE,0 34 | 7385,18380,93,"20949",Moscow Oblast,Region,ACTIVE,0 35 | 7386,18380,93,"1011969",Moscow,City,ACTIVE,0 36 | -------------------------------------------------------------------------------- /integration_tests/data/general/general_accounts.csv: -------------------------------------------------------------------------------- 1 | "id","account_id","caption","service","enabled","status","interval_start","interval_end" 2 | 1,18378,caption,Яндекс.Директ,1,успешно,2020-04-01,2021-04-07 3 | 3,18380,caption,Google AdWords,1,успешно,2020-04-01,2021-04-07 4 | 4,18441,caption,Facebook,1,успешно,2020-05-01,2021-04-07 5 | 20,18783,caption,Google Analytics,1,успешно,2020-05-01,2021-04-07 6 | 27,18799,caption,myTarget,1,успешно,2020-05-01,2021-04-07 7 | 35,19646,caption,Битрикс24,0,ошибка,2020-05-01,2021-01-23 8 | 44,20652,caption,amoCRM,1,успешно,2020-08-01,2021-04-07 9 | 57,21600,caption,Яндекс.Метрика,1,успешно,2020-08-01,2021-04-07 10 | 5,26557,caption,Google Analytics,1,успешно,2021-02-24,2021-05-11 11 | "14","38,148","EXCHANGE RATES","Курсы валют","true","успешно","2021-01-13","2022-06-07" 12 | 6,35960,Гугл Адс SD,Google Ads,true,успешно,2021-01-13,2022-10-09 13 | -------------------------------------------------------------------------------- /integration_tests/data/general/general_clientids.csv: -------------------------------------------------------------------------------- 1 | "id","clientid","userid","phone","email" 2 | 1,not available,,, 3 | 618,"941723462.1614174736",,, 4 | 9004,"1616574092.1618156864",,, 5 | 10245,"509978213.1618845162",,, 6 | 13207,"1023930596.1619989345",,, 7 | 13358,"1166374949.1620237464",,, 8 | 13932,"1891033245.1620662478",,, 9 | 13984,"106664058.1620759792",,, 10 | 13987,"1102525482.1620764088",,, 11 | 14001,"1222028320.1620760740",,, 12 | 14010,"1288248763.1620761620",,, 13 | 14020,"1375664619.1620761924",,, 14 | 14022,"1390165518.1620767479",,, 15 | 14038,"1588522619.1620757919",,, 16 | 14040,"1660835431.1620758763",,, 17 | 14057,"1804929410.1620768338",,, 18 | 14060,"1834178396.1620762964",,, 19 | 14063,"1887647609.1620761103",,, 20 | 14068,"199770796.1620763766",,, 21 | 14085,"2118746852.1620760108",,, 22 | 14088,"2130390424.1620765773",,, 23 | 14089,"2130912862.1620761201",,, 24 | 14135,"701046888.1620746637",,, 25 | 14141,"779164763.1620759701",,, 26 | -------------------------------------------------------------------------------- /integration_tests/data/general/general_locations.csv: -------------------------------------------------------------------------------- 1 | "id","country_iso","country","region_iso","region","city","latitude","longitude" 2 | 1,,,,,,, 3 | 21,,,,,Belgorod,, 4 | 31,,,,,Chehov,, 5 | 35,,,,,Chita,, 6 | 68,,,,,Kaliningrad,, 7 | 90,,,,,Krasnodar,, 8 | 102,,,,,Lipetsk,, 9 | 114,,,,,Moscow,, 10 | 131,,,,,Nizhny Novgorod,, 11 | 137,,,,,Novosibirsk,, 12 | 163,,,,,Riga,, 13 | 165,,,,,Rostov-na-Donu,, 14 | 169,,,,,Saint Petersburg,, 15 | 170,,,,,Samara,, 16 | 181,,,,,Sochi,, 17 | 201,,,,,Tyumen,, 18 | 202,,,,,Ufa,, 19 | 211,,,,,Vladivostok,, 20 | 222,,,,,Yaroslavl,, 21 | 223,,,,,Yekaterinburg,, 22 | 224,,,,,Yuzhno-Sakhalinsk,, 23 | 312,,,,,Kemerovo,, 24 | 346,,,,,Magnitogorsk,, 25 | 373,,,,,Novorossiysk,, 26 | 376,,,,,Obninsk,, 27 | 512,,,,,Komsomolsk-at-Amur,, 28 | 952,,,,,Shakhty,, 29 | 4495,,,,,Putian,, 30 | 1160,BY,Belarus,,Vitebsk Region,Viciebsk,, 31 | 1164,DE,Germany,,Hamburg,Hamburg,, 32 | 1203,RU,Russia,,Belgorod Oblast,Belgorod,, 33 | 1224,RU,Russia,,Krasnodar Krai,Krasnodar,, 34 | 1234,RU,Russia,,Moscow,Moscow,, 35 | 1280,RU,Russia,,Saint Petersburg,Saint Petersburg,, 36 | 1291,RU,Russia,,Tatarstan,Kazan,, 37 | 1318,UA,Ukraine,,Kyiv city,Kiev,, 38 | 1451,RU,Russia,,Tula Oblast,Tula,, 39 | 1497,RU,Russia,,North Ossetia–Alania,Vladikavkaz,, 40 | 1543,IN,India,,West Bengal,Kolkata,, 41 | 1851,CA,Canada,,Alberta,Calgary,, 42 | 1985,KZ,Kazakhstan,,Karagandy Province,Karagandy,, 43 | 2035,RU,Russia,,Oryol Oblast,Oryol,, 44 | 2044,RU,Russia,,Stavropol Krai,Pyatigorsk,, 45 | 4240,SA,Saudi Arabia,,Al Madinah Province,Medina,, 46 | 4446,IN,India,,Bihar,Patna,, 47 | 5087,DE,Germany,,Schleswig-Holstein,Lubeck,, 48 | 9035,CL,Chile,,Magallanes y la Antartica Chilena Region,Punta Arenas,, 49 | 9037,US,United States,,Connecticut,Hamden,, 50 | 11,BY,Belarus,,Minsk Region,Minsk,, 51 | 27,KZ,Kazakhstan,,,Nur-Sultan,, 52 | 30,KZ,Kazakhstan,,Almaty Province,Almaty,, 53 | 37,KZ,Kazakhstan,,Pavlodar Province,Pavlodar,, 54 | 57,RU,Russia,,Ivanovo Oblast,Ivanovo,, 55 | 64,RU,Russia,,Kostroma Oblast,Kostroma,, 56 | 72,RU,Russia,,Leningrad Oblast,,, 57 | 77,RU,Russia,,Moscow,Moscow,, 58 | 96,RU,Russia,,Novgorod Oblast,Veliky Novgorod,, 59 | 110,RU,Russia,,Saint Petersburg,Saint Petersburg,, 60 | 112,RU,Russia,,Samara Oblast,Tolyatti,, 61 | 128,RU,Russia,,Volgograd Oblast,Volgograd,, 62 | 129,RU,Russia,,Volgograd Oblast,Volzhskiy,, 63 | 130,RU,Russia,,Voronezh Oblast,Voronezh,, 64 | 157,UA,Ukraine,,Kyiv city,Kyiv,, 65 | 480,RU,Russia,,Nizhny Novgorod Oblast,Dzerzhinsk,, 66 | -------------------------------------------------------------------------------- /integration_tests/data/general/general_sites.csv: -------------------------------------------------------------------------------- 1 | "id","domain","description" 2 | 1,domain, 3 | 2,domain, 4 | 3,domain, 5 | 19,domain, 6 | 20,domain, 7 | 21,domain, 8 | 5,domain, 9 | -------------------------------------------------------------------------------- /integration_tests/data/metrika/metrika_devices.csv: -------------------------------------------------------------------------------- 1 | "id","account_id","category","browser","os","os_version" 2 | 34,21600,desktop,,, 3 | 35,21600,mobile,,, 4 | 36,21600,tablet,,, 5 | -------------------------------------------------------------------------------- /integration_tests/data/metrika/metrika_sessions_facts.csv: -------------------------------------------------------------------------------- 1 | "account_id","clientids_id","dates_id","traffic_id","locations_id","devices_id","sessions","bounces","pageviews","duration" 2 | 21600,1,159250,15645,165,35,1,0,11,"40,00" 3 | 21600,1,159250,726276,1,35,1,0,3,"101,00" 4 | 21600,1,159250,4821954,211,34,1,0,6,"137,00" 5 | 21600,1,159250,4821952,1,34,1,0,1,"22,00" 6 | 21600,1,159250,823634,169,34,1,0,1,"15,00" 7 | 21600,1,159250,4821936,1,35,1,1,1,"0,00" 8 | 21600,1,159250,724226,346,35,1,0,8,"303,00" 9 | 21600,1,159250,4807898,1,35,1,0,1,"21,00" 10 | 21600,1,159250,4813125,163,35,1,0,2,"96,00" 11 | 21600,1,159250,724131,201,34,1,0,2,"26,00" 12 | 21600,1,159250,753533,114,35,1,0,1,"21,00" 13 | 21600,1,159250,724075,114,35,1,0,3,"288,00" 14 | 21600,1,159250,724075,1,34,1,0,2,"62,00" 15 | 21600,1,159250,54369,114,35,1,0,1,"16,00" 16 | 21600,1,159250,4807893,169,35,1,0,1,"17,00" 17 | 21600,1,159250,724060,223,35,1,0,3,"306,00" 18 | 21600,1,159250,723970,1,34,1,0,3,"203,00" 19 | 21600,1,159250,4821930,312,34,1,0,3,"152,00" 20 | 21600,1,159250,723551,137,34,1,1,1,"0,00" 21 | 21600,1,159250,723458,1,34,1,0,1,"0,00" 22 | 21600,1,159250,723451,114,34,1,0,3,"35,00" 23 | 21600,1,159250,723423,952,34,1,0,1,"15,00" 24 | 21600,1,159250,4813116,211,34,1,0,1,"20,00" 25 | 21600,1,159250,4821349,4495,35,1,1,1,"0,00" 26 | 21600,1,159250,4807879,1,35,1,0,2,"31,00" 27 | 21600,1,159250,723403,114,34,1,0,1,"25,00" 28 | 21600,1,159250,737394,114,35,1,0,1,"15,00" 29 | 21600,1,159250,54306,114,35,1,0,1,"14,00" 30 | 21600,1,159250,723334,131,35,1,1,1,"0,00" 31 | 21600,1,159250,4807874,114,35,1,0,1,"26,00" 32 | 21600,1,159250,4807874,31,34,1,0,1,"26,00" 33 | 21600,1,159250,723321,114,35,1,1,1,"0,00" 34 | 21600,1,159250,4807873,1,34,1,0,1,"17,00" 35 | 21600,1,159250,723319,169,35,1,0,1,"15,00" 36 | 21600,1,159250,723319,1,35,1,0,2,"422,00" 37 | 21600,1,159250,723319,137,34,1,0,2,"82,00" 38 | 21600,1,159250,723319,114,34,1,0,1,"31,00" 39 | 21600,1,159250,15397,1,34,1,0,2,"88,00" 40 | 21600,1,159250,4807860,1,35,1,0,4,"93,00" 41 | 21600,1,159250,4813106,512,34,1,0,2,"34,00" 42 | 21600,1,159250,719641,376,34,1,0,2,"25,00" 43 | 21600,1,159250,4807851,1,35,1,1,1,"0,00" 44 | 21600,1,159250,4707791,373,35,1,0,2,"343,00" 45 | 21600,1,159250,4663100,1,35,1,1,1,"0,00" 46 | 21600,1,159250,4793666,376,35,1,0,1,"16,00" 47 | 21600,1,159250,4793666,1,35,1,0,1,"25,00" 48 | 21600,1,159250,4793666,222,34,1,0,1,"18,00" 49 | 21600,1,159250,4793666,21,34,1,0,1,"18,00" 50 | 21600,1,159250,719545,181,36,1,0,1,"28,00" 51 | 21600,1,159250,4550751,169,34,1,0,1,"23,00" 52 | 21600,1,159250,719476,90,35,1,0,1,"15,00" 53 | 21600,1,159250,719424,181,36,1,0,1,"15,00" 54 | 21600,1,159250,731267,170,34,1,0,1,"16,00" 55 | 21600,1,159250,719397,1,34,1,1,1,"0,00" 56 | 21600,1,159250,719370,169,35,1,0,1,"19,00" 57 | 21600,1,159250,719370,1,35,1,0,1,"19,00" 58 | 21600,1,159250,719209,114,34,1,0,3,"85,00" 59 | 21600,1,159250,718684,114,35,1,0,1,"14,00" 60 | 21600,1,159250,718674,114,35,1,0,1,"15,00" 61 | 21600,1,159250,751542,114,35,1,0,1,"71,00" 62 | 21600,1,159250,14831,114,35,1,0,1,"22,00" 63 | 21600,1,159250,741951,114,34,1,0,2,"161,00" 64 | 21600,1,159250,730257,1,35,1,0,2,"100,00" 65 | 21600,1,159250,730257,114,34,1,0,2,"53,00" 66 | 21600,1,159250,718496,202,34,1,0,3,"21,00" 67 | 21600,1,159250,718496,114,34,1,0,1,"122,00" 68 | 21600,1,159250,718488,169,35,1,0,5,"34,00" 69 | 21600,1,159250,718443,114,34,1,0,1,"203,00" 70 | 21600,1,159250,718386,114,35,1,0,1,"16,00" 71 | 21600,1,159250,718386,114,34,1,0,2,"79,00" 72 | 21600,1,159250,718369,114,35,1,0,1,"15,00" 73 | 21600,1,159250,326417,114,34,1,0,2,"58,00" 74 | 21600,1,159250,16545,137,35,1,1,1,"2,00" 75 | 21600,1,159250,14757,1,35,1,0,1,"14,00" 76 | 21600,1,159250,14757,1,34,1,0,2,"62,00" 77 | 21600,1,159250,730157,114,35,1,0,1,"15,00" 78 | 21600,1,159250,718333,114,34,1,0,1,"79,00" 79 | 21600,1,159250,730152,114,35,1,0,1,"26,00" 80 | 21600,1,159250,718322,114,35,1,0,1,"14,00" 81 | 21600,1,159250,718322,1,35,1,0,2,"82,00" 82 | 21600,1,159250,718295,35,34,1,0,3,"162,00" 83 | 21600,1,159250,718256,114,34,1,0,2,"58,00" 84 | 21600,1,159250,730117,1,35,1,0,1,"13,00" 85 | 21600,1,159250,14753,114,35,1,0,2,"143,00" 86 | 21600,1,159250,14753,102,35,1,1,1,"0,00" 87 | 21600,1,159250,14753,1,35,1,0,1,"15,00" 88 | 21600,1,159250,4807828,137,35,1,0,3,"58,00" 89 | 21600,1,159250,718174,1,34,1,0,7,"94,00" 90 | 21600,1,159250,4821925,224,34,1,0,1,"16,00" 91 | 21600,1,159250,2604418,1,35,1,0,1,"15,00" 92 | 21600,1,159250,4775251,68,35,1,0,1,"19,00" 93 | 21600,1,159250,4775244,165,34,1,0,19,"22,00" 94 | 21600,1,159250,724097,114,35,2,0,3,"219,00" 95 | 21600,1,159250,724067,169,34,2,0,7,"122,00" 96 | 21600,1,159250,723319,114,35,2,1,3,"64,00" 97 | 21600,1,159250,723319,1,34,2,2,2,"0,00" 98 | 21600,1,159250,719209,1,35,2,1,2,"15,00" 99 | 21600,1,159250,718609,114,36,2,0,2,"29,00" 100 | 21600,1,159250,718450,1,35,2,0,4,"210,00" 101 | 21600,1,159250,718261,114,35,2,0,3,"182,00" 102 | -------------------------------------------------------------------------------- /integration_tests/data/mytarget/mytarget_banners.csv: -------------------------------------------------------------------------------- 1 | "id","account_id","banner_id","title","text_content","other_content","system_status","status","moderation_status","moderation_reason","phone","url","urls" 2 | 40,18799,71046587,title,text_content,other_content,,deleted,banned,moderation_reason,phone,url,urls 3 | -------------------------------------------------------------------------------- /integration_tests/data/mytarget/mytarget_banners_facts.csv: -------------------------------------------------------------------------------- 1 | "account_id","dates_id","campaigns_id","banners_id","traffic_id","sites_id","impressions","clicks","cost" 2 | 18799,160886,23,40,4761887,19,0,0,"0,00" 3 | 18799,159968,23,40,4761887,19,0,0,"0,00" 4 | 18799,159250,23,40,4761887,19,0,0,"0,00" 5 | 18799,158590,23,40,4761887,19,0,0,"0,00" 6 | 18799,157829,23,40,4761887,19,0,0,"0,00" 7 | 18799,157354,23,40,4761887,19,0,0,"0,00" 8 | 18799,156402,23,40,4761887,19,0,0,"0,00" 9 | 18799,155175,23,40,4761887,19,0,0,"0,00" 10 | 18799,154051,23,40,4761887,19,0,0,"0,00" 11 | 18799,153095,23,40,4761887,19,0,0,"0,00" 12 | 18799,152056,23,40,4761887,19,0,0,"0,00" 13 | 18799,151211,23,40,4761887,19,0,0,"0,00" 14 | 18799,150463,23,40,4761887,19,0,0,"0,00" 15 | 18799,149513,23,40,4761887,19,0,0,"0,00" 16 | 18799,148508,23,40,4761887,19,0,0,"0,00" 17 | 18799,147638,23,40,4761887,19,0,0,"0,00" 18 | 18799,146603,23,40,4761887,19,0,0,"0,00" 19 | 18799,145784,23,40,4761887,19,0,0,"0,00" 20 | 18799,145019,23,40,4761887,19,0,0,"0,00" 21 | 18799,144285,23,40,4761887,19,0,0,"0,00" 22 | -------------------------------------------------------------------------------- /integration_tests/data/mytarget/mytarget_campaigns.csv: -------------------------------------------------------------------------------- 1 | "id","account_id","campaign_id","name","system_status","status","autobidding","mixing","age_restrictions","group_members","extended_age","enable_utm","utm" 2 | 23,18799,30699310,name,,deleted,second_price_mean,recommended,,,,0, 3 | -------------------------------------------------------------------------------- /integration_tests/data/mytarget/mytarget_campaigns_facts.csv: -------------------------------------------------------------------------------- 1 | "account_id","dates_id","campaigns_id","impressions","clicks","cost" 2 | 18799,160886,23,0,0,"0,01" 3 | 18799,159968,23,0,0,"0,02" 4 | 18799,159250,23,0,0,"0,03" 5 | 18799,158590,23,0,0,"0,00" 6 | 18799,157829,23,0,0,"0,00" 7 | 18799,157354,23,0,0,"0,00" 8 | 18799,156402,23,0,0,"0,00" 9 | 18799,155175,23,0,0,"0,00" 10 | 18799,154051,23,0,0,"0,00" 11 | 18799,153095,23,0,0,"0,00" 12 | 18799,152056,23,0,0,"0,00" 13 | 18799,151211,23,0,0,"0,00" 14 | 18799,150463,23,0,0,"0,00" 15 | 18799,149513,23,0,0,"0,00" 16 | 18799,148508,23,0,0,"0,00" 17 | 18799,147638,23,0,0,"0,00" 18 | 18799,146603,23,0,0,"0,00" 19 | 18799,145784,23,0,0,"0,00" 20 | 18799,145019,23,0,0,"0,00" 21 | 18799,144285,23,0,0,"0,00" 22 | -------------------------------------------------------------------------------- /integration_tests/dbt_project.yml: -------------------------------------------------------------------------------- 1 | name: 'mybi_dbt_core_integration_tests' 2 | version: '1.0.0' 3 | config-version: 2 4 | 5 | profile: 'mybi_dbt_core' 6 | 7 | model-paths: ["models"] 8 | test-paths: ["tests"] 9 | seed-paths: ["data"] 10 | macro-paths: ["macros"] 11 | snapshot-paths: ["snapshots"] 12 | 13 | target-path: "target" 14 | clean-targets: 15 | - "target" 16 | - "dbt_packages" 17 | 18 | quoting: 19 | database: True 20 | schema: True 21 | identifier: True 22 | 23 | vars: 24 | 25 | mybi_dbt_core: 26 | limit_data_days: 3650 27 | 28 | dbt_source_database: null 29 | dbt_source_schema: null 30 | 31 | account_id_metrika: "21600" 32 | account_id_gaw: "18380" 33 | account_id_direct: "18378" 34 | account_id_facebook: "18441" 35 | account_id_mytarget: "18799" 36 | account_id_bitrix24: "19646" 37 | account_id_amocrm: "20652" 38 | account_id_ga: "18783, 26557" 39 | account_id_ads: "35960" 40 | 41 | caption_metrika: 'yandex_metrika' 42 | caption_direct: 'yandex_direct' 43 | caption_adwords: 'google_adwords' 44 | caption_facebook: 'facebook' 45 | caption_mytarget: 'mytarget' 46 | caption_bitrix24: 'bitrix24' 47 | caption_amocrm: 'amocrm' 48 | caption_ga: 'google_analytics' 49 | 50 | seeds: 51 | # +quote_columns: true 52 | 53 | mybi_dbt_core_integration_tests: 54 | 55 | ads: 56 | +tags: ["ads"] 57 | ads_campaigns: 58 | +column_types: 59 | campaign_id: BIGINT 60 | ads_adgroups: 61 | +column_types: 62 | adgroup_id: BIGINT 63 | ads_ads: 64 | +column_types: 65 | ad_id: BIGINT 66 | ads_keywords: 67 | +column_types: 68 | keyword_id: BIGINT 69 | general: 70 | +tags: ["general"] 71 | amocrm: 72 | +tags: ["amocrm"] 73 | bitrix24: 74 | +tags: ["bitrix24"] 75 | direct: 76 | +tags: ["direct"] 77 | direct_adgroups: 78 | +column_types: 79 | adgroup_id: BIGINT 80 | direct_ads: 81 | +column_types: 82 | ad_id: BIGINT 83 | facebook: 84 | +tags: ["facebook"] 85 | facebook_ads: 86 | +column_types: 87 | ad_id: BIGINT 88 | facebook_adsets: 89 | +column_types: 90 | adset_id: BIGINT 91 | facebook_campaigns: 92 | +column_types: 93 | campaign_id: BIGINT 94 | facebook_creatives: 95 | +column_types: 96 | creative_id: BIGINT 97 | gaw: 98 | +tags: ["gaw"] 99 | adwords_adgroups: 100 | +column_types: 101 | adgroup_id: BIGINT 102 | adwords_ads: 103 | +column_types: 104 | ad_id: BIGINT 105 | adwords_campaigns: 106 | +column_types: 107 | campaign_id: BIGINT 108 | adwords_keywords: 109 | +column_types: 110 | keyword_id: BIGINT 111 | metrika: 112 | +tags: ["metrika"] 113 | mytarget: 114 | +tags: ["mytarget"] 115 | ga: 116 | +tags: ["ga"] 117 | -------------------------------------------------------------------------------- /integration_tests/packages.yml: -------------------------------------------------------------------------------- 1 | packages: 2 | - local: ../ 3 | -------------------------------------------------------------------------------- /integration_tests/profiles.yml: -------------------------------------------------------------------------------- 1 | config: 2 | send_anonymous_usage_stats: False 3 | use_colors: True 4 | partial_parse: True 5 | 6 | mybi_dbt_core: 7 | target: "{{ env_var('DBT_TARGET', 'clickhouse') }}" 8 | 9 | outputs: 10 | 11 | clickhouse: 12 | type: clickhouse 13 | host: clickhouse 14 | port: 8123 15 | schema: default 16 | threads: 4 17 | 18 | postgres: 19 | type: postgres 20 | host: postgres 21 | port: 5432 22 | user: postgres 23 | pass: postgres 24 | dbname: postgres 25 | schema: public 26 | threads: 4 27 | -------------------------------------------------------------------------------- /macros/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kzzzr/mybi-dbt-core/1bfb6b02352e676ccbf203f643a050c9c2da8dd6/macros/.gitkeep -------------------------------------------------------------------------------- /macros/clean_up.sql: -------------------------------------------------------------------------------- 1 | -- Delete objects from database after CI tests 2 | {% macro clean_up() %} 3 | 4 | {%- if target.name in ['ci'] -%} 5 | 6 | {% set schema = target.schema ~ '_' ~ env_var('GITHUB_PR_NUMBER') | trim %} 7 | {% do adapter.drop_schema(api.Relation.create(database=target.database, schema=schema)) %} 8 | 9 | {%- endif -%} 10 | 11 | {% endmacro %} -------------------------------------------------------------------------------- /macros/custom_schema_management.sql: -------------------------------------------------------------------------------- 1 | 2 | {# 3 | Renders a schema name given a custom schema name. If the custom 4 | schema name is none, then the resulting schema is just the "schema" 5 | value in the specified target. If a schema override is specified, then 6 | the resulting schema is the default schema concatenated with the 7 | custom schema. 8 | 9 | This macro can be overriden in projects to define different semantics 10 | for rendering a schema name. 11 | 12 | Arguments: 13 | custom_schema_name: The custom schema name specified for a model, or none 14 | node: The node the schema is being generated for 15 | 16 | #} 17 | {% macro generate_schema_name(custom_schema_name, node) -%} 18 | {{ mybi_dbt_core.generate_schema_name_for_env(custom_schema_name, node) }} 19 | {%- endmacro %} 20 | 21 | 22 | {# 23 | Renders a schema name given a custom schema name. In production, this macro 24 | will render out the overriden schema name for a model. Otherwise, the default 25 | schema specified in the active target is used. 26 | 27 | Arguments: 28 | custom_schema_name: The custom schema name specified for a model, or none 29 | node: The node the schema is being generated for 30 | 31 | #} 32 | {% macro generate_schema_name_for_env(custom_schema_name, node) -%} 33 | 34 | {%- set default_schema = target.schema -%} 35 | {%- if target.name == 'prod' and custom_schema_name is not none -%} 36 | 37 | {{ custom_schema_name | trim }} 38 | 39 | {%- else -%} 40 | 41 | {{ default_schema }} 42 | 43 | {%- endif -%} 44 | 45 | {%- endmacro %} 46 | 47 | 48 | -- handle schema for audit models 49 | {% macro get_audit_schema() %} 50 | 51 | {{ return('meta') }} 52 | 53 | {% endmacro %} 54 | -------------------------------------------------------------------------------- /macros/schema_tests.sql: -------------------------------------------------------------------------------- 1 | -- NON_EMPTY 2 | {% macro test_not_empty(model, column_name) %} 3 | {{ return(adapter.dispatch('test_not_empty', 'mybi_dbt_core') (model, column_name)) }} 4 | {% endmacro %} 5 | 6 | {% macro default__test_not_empty(model, column_name) %} 7 | 8 | select 9 | count(1) as row_count 10 | from {{ model }} 11 | having count(1) = 0 12 | 13 | {% endmacro %} 14 | -------------------------------------------------------------------------------- /macros/source_filter_rows.sql: -------------------------------------------------------------------------------- 1 | -- macro to limit rows for specific accounts, dev/test environments 2 | {% macro source_filter_rows( 3 | account_id=none, 4 | limit_data_for_dev=false, 5 | timestamp_column='dt', 6 | history_depth_days=0 7 | ) -%} 8 | 9 | {#- prepare expression to filter on according account_id -#} 10 | {% if account_id -%} 11 | {%- set filter_account_id = 'account_id in (' ~ account_id ~ ')' -%} 12 | {% else -%} 13 | {%- set filter_account_id = 'TRUE' -%} 14 | {%- endif -%} 15 | 16 | {#- prepare expression to limit rows depending on target.name and flags provided -#} 17 | {%- if target.name in ['prod'] and history_depth_days > 0 -%} 18 | {%- set watermark = mybi_dbt_core.watermark(history_depth_days) -%} 19 | {%- set history_depth_expression = timestamp_column ~ ' >= ' ~ watermark -%} 20 | {%- elif target.name not in ['prod'] and limit_data_for_dev == true -%} 21 | {%- set watermark = mybi_dbt_core.watermark(var('limit_data_days')) -%} 22 | {%- set history_depth_expression = timestamp_column ~ ' >= ' ~ watermark -%} 23 | {%- else -%} 24 | {%- set history_depth_expression = 'TRUE' -%} 25 | {%- endif -%} 26 | 27 | {#- prepare final filter expression -#} 28 | WHERE TRUE 29 | AND {{ filter_account_id }} 30 | AND {{ history_depth_expression }} 31 | 32 | {%- endmacro -%} 33 | 34 | 35 | {% macro watermark(history_depth_days) %} 36 | {{ return(adapter.dispatch('watermark', 'mybi_dbt_core') (history_depth_days)) }} 37 | {% endmacro %} 38 | 39 | {% macro default__watermark(history_depth_days) %} 40 | {%- set watermark = '(now() - interval \'' ~ history_depth_days ~ '\' day)' -%} 41 | {{ return(watermark) }} 42 | {% endmacro %} 43 | -------------------------------------------------------------------------------- /models/staging/ads/ads.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | 3 | models: 4 | - name: stg_ads_adgroups 5 | tests: &ads_defaults 6 | - not_empty: 7 | severity: warn 8 | - not_null: 9 | column_name: id 10 | - unique: 11 | column_name: id 12 | 13 | - name: stg_ads_ads 14 | tests: *ads_defaults 15 | 16 | - name: stg_ads_campaigns 17 | tests: *ads_defaults 18 | 19 | - name: stg_ads_keywords 20 | tests: *ads_defaults 21 | 22 | - name: stg_ads_location_criterions 23 | tests: 24 | - not_empty: 25 | severity: warn 26 | - not_null: 27 | column_name: id 28 | - unique: 29 | column_name: id 30 | - relationships: 31 | to: ref('stg_ads_campaigns') 32 | column_name: campaigns_id 33 | field: id 34 | 35 | - name: stg_ads_campaigns_facts 36 | tests: 37 | - not_empty: 38 | severity: warn 39 | - not_null: 40 | column_name: id 41 | - unique: 42 | column_name: id 43 | - not_null: 44 | column_name: account_id 45 | - not_null: 46 | column_name: campaigns_id 47 | - not_null: 48 | column_name: dates_id 49 | - relationships: 50 | to: ref('stg_general_accounts') 51 | column_name: account_id 52 | field: account_id 53 | - relationships: 54 | to: ref('stg_general_dates') 55 | column_name: dates_id 56 | field: id 57 | - relationships: 58 | to: ref('stg_ads_campaigns') 59 | column_name: campaigns_id 60 | field: id 61 | 62 | - name: stg_ads_adgroups_facts 63 | tests: 64 | - not_empty: 65 | severity: warn 66 | - not_null: 67 | column_name: id 68 | - unique: 69 | column_name: id 70 | - not_null: 71 | column_name: account_id 72 | - not_null: 73 | column_name: campaigns_id 74 | - not_null: 75 | column_name: adgroups_id 76 | - not_null: 77 | column_name: dates_id 78 | - relationships: 79 | to: ref('stg_general_accounts') 80 | column_name: account_id 81 | field: account_id 82 | - relationships: 83 | to: ref('stg_general_dates') 84 | column_name: dates_id 85 | field: id 86 | - relationships: 87 | to: ref('stg_ads_campaigns') 88 | column_name: campaigns_id 89 | field: id 90 | - relationships: 91 | to: ref('stg_ads_adgroups') 92 | column_name: adgroups_id 93 | field: id 94 | 95 | - name: stg_ads_ads_facts 96 | tests: 97 | - not_empty: 98 | severity: warn 99 | - not_null: 100 | column_name: id 101 | - unique: 102 | column_name: id 103 | - not_null: 104 | column_name: account_id 105 | - not_null: 106 | column_name: campaigns_id 107 | - not_null: 108 | column_name: adgroups_id 109 | - not_null: 110 | column_name: ads_id 111 | - not_null: 112 | column_name: dates_id 113 | - not_null: 114 | column_name: traffic_id 115 | - not_null: 116 | column_name: sites_id 117 | - relationships: 118 | to: ref('stg_general_accounts') 119 | column_name: account_id 120 | field: account_id 121 | - relationships: 122 | to: ref('stg_general_dates') 123 | column_name: dates_id 124 | field: id 125 | - relationships: 126 | to: ref('stg_general_traffic') 127 | column_name: traffic_id 128 | field: id 129 | - relationships: 130 | to: ref('stg_general_sites') 131 | column_name: sites_id 132 | field: id 133 | - relationships: 134 | to: ref('stg_ads_campaigns') 135 | column_name: campaigns_id 136 | field: id 137 | - relationships: 138 | to: ref('stg_ads_adgroups') 139 | column_name: adgroups_id 140 | field: id 141 | - relationships: 142 | to: ref('stg_ads_ads') 143 | column_name: ads_id 144 | field: id 145 | 146 | - name: stg_ads_keywords_facts 147 | tests: 148 | - not_empty: 149 | severity: warn 150 | - not_null: 151 | column_name: id 152 | - unique: 153 | column_name: id 154 | - not_null: 155 | column_name: account_id 156 | - not_null: 157 | column_name: campaigns_id 158 | - not_null: 159 | column_name: adgroups_id 160 | - not_null: 161 | column_name: keywords_id 162 | - not_null: 163 | column_name: dates_id 164 | - not_null: 165 | column_name: traffic_id 166 | - not_null: 167 | column_name: sites_id 168 | - relationships: 169 | to: ref('stg_general_accounts') 170 | column_name: account_id 171 | field: account_id 172 | - relationships: 173 | to: ref('stg_general_dates') 174 | column_name: dates_id 175 | field: id 176 | - relationships: 177 | to: ref('stg_general_traffic') 178 | column_name: traffic_id 179 | field: id 180 | - relationships: 181 | to: ref('stg_general_sites') 182 | column_name: sites_id 183 | field: id 184 | - relationships: 185 | to: ref('stg_ads_campaigns') 186 | column_name: campaigns_id 187 | field: id 188 | - relationships: 189 | to: ref('stg_ads_adgroups') 190 | column_name: adgroups_id 191 | field: id 192 | - relationships: 193 | to: ref('stg_ads_keywords') 194 | column_name: keywords_id 195 | field: id 196 | -------------------------------------------------------------------------------- /models/staging/ads/stg_ads_adgroups.sql: -------------------------------------------------------------------------------- 1 | select 2 | 3 | id 4 | , account_id 5 | , adgroup_id 6 | , name 7 | , status 8 | , tracking_url_template 9 | , url_custom_parameters 10 | 11 | from {{ source('ads', 'adgroups') }} 12 | 13 | {{ source_filter_rows( 14 | account_id=var('account_id_ads') 15 | ) }} -------------------------------------------------------------------------------- /models/staging/ads/stg_ads_adgroups_facts.sql: -------------------------------------------------------------------------------- 1 | select 2 | 3 | f.id as id 4 | , f.account_id as account_id 5 | , f.campaigns_id as campaigns_id 6 | , f.adgroups_id as adgroups_id 7 | , f.dates_id as dates_id 8 | , f.ad_network as ad_network 9 | , f.device as device 10 | , f.impressions as impressions 11 | , f.clicks as clicks 12 | , f.cost as cost 13 | , f.conversions as conversions 14 | , f.conversion_value as conversion_value 15 | , f.all_conversions as all_conversions 16 | , f.all_conversion_value as all_conversion_value 17 | , f.created_date as created_date 18 | , f.modified_date as modified_date 19 | , gd.dt as dt 20 | , gd.ts as ts 21 | 22 | from {{ source('ads', 'adgroups_facts') }} as f 23 | inner join {{ ref('stg_general_dates') }} as gd 24 | on gd.id = f.dates_id 25 | 26 | {{ source_filter_rows( 27 | account_id=var('account_id_ads') 28 | ) }} -------------------------------------------------------------------------------- /models/staging/ads/stg_ads_ads.sql: -------------------------------------------------------------------------------- 1 | select 2 | 3 | id 4 | , account_id 5 | , ad_id 6 | , display_url 7 | , final_urls 8 | , tracking_url_template 9 | , url_custom_parameters 10 | , "type" 11 | , headline 12 | , headline_part_one 13 | , headline_part_two 14 | , description 15 | , description_part_one 16 | , description_part_two 17 | , path_one 18 | , path_two 19 | , status 20 | , approval_status 21 | , phone_number 22 | , final_mobile_urls 23 | 24 | from {{ source('ads', 'ads') }} 25 | 26 | {{ source_filter_rows( 27 | account_id=var('account_id_ads') 28 | ) }} -------------------------------------------------------------------------------- /models/staging/ads/stg_ads_ads_facts.sql: -------------------------------------------------------------------------------- 1 | select 2 | 3 | f.id as id 4 | , f.account_id as account_id 5 | , f.campaigns_id as campaigns_id 6 | , f.adgroups_id as adgroups_id 7 | , f.ads_id as ads_id 8 | , f.dates_id as dates_id 9 | , f.traffic_id as traffic_id 10 | , f.sites_id as sites_id 11 | , f.ad_network as ad_network 12 | , f.device as device 13 | , f.impressions as impressions 14 | , f.clicks as clicks 15 | , f.cost as cost 16 | , f.conversions as conversions 17 | , f.conversion_value as conversion_value 18 | , f.all_conversions as all_conversions 19 | , f.all_conversion_value as all_conversion_value 20 | , f.created_date as created_date 21 | , f.modified_date as modified_date 22 | , gd.dt as dt 23 | , gd.ts as ts 24 | 25 | from {{ source('ads', 'ads_facts') }} as f 26 | inner join {{ ref('stg_general_dates') }} as gd 27 | on gd.id = f.dates_id 28 | 29 | 30 | {{ source_filter_rows( 31 | account_id=var('account_id_ads') 32 | ) }} -------------------------------------------------------------------------------- /models/staging/ads/stg_ads_campaigns.sql: -------------------------------------------------------------------------------- 1 | select 2 | 3 | id 4 | , account_id 5 | , campaign_id 6 | , name 7 | , status 8 | , serving_status 9 | , ad_serving_optimization_status 10 | , advertising_channel_type 11 | , advertising_channel_sub_type 12 | , tracking_url_template 13 | , app_id 14 | , app_vendor 15 | , url_custom_parameters 16 | 17 | from {{ source('ads', 'campaigns') }} 18 | 19 | {{ source_filter_rows( 20 | account_id=var('account_id_ads') 21 | ) }} -------------------------------------------------------------------------------- /models/staging/ads/stg_ads_campaigns_facts.sql: -------------------------------------------------------------------------------- 1 | select 2 | 3 | f.id as id 4 | , f.account_id as account_id 5 | , f.campaigns_id as campaigns_id 6 | , f.budgets_id as budgets_id 7 | , f.dates_id as dates_id 8 | , f.ad_network as ad_network 9 | , f.device as device 10 | , f.impressions as impressions 11 | , f.clicks as clicks 12 | , f.cost as cost 13 | , f.conversions as conversions 14 | , f.conversion_value as conversion_value 15 | , f.all_conversions as all_conversions 16 | , f.all_conversion_value as all_conversion_value 17 | , f.created_date as created_date 18 | , f.modified_date as modified_date 19 | , gd.dt as dt 20 | , gd.ts as ts 21 | 22 | from {{ source('ads', 'campaigns_facts') }} as f 23 | inner join {{ ref('stg_general_dates') }} as gd 24 | on gd.id = f.dates_id 25 | 26 | {{ source_filter_rows( 27 | account_id=var('account_id_ads') 28 | ) }} -------------------------------------------------------------------------------- /models/staging/ads/stg_ads_keywords.sql: -------------------------------------------------------------------------------- 1 | select 2 | 3 | id 4 | , account_id 5 | , keyword_id 6 | , name 7 | , final_urls 8 | , status 9 | , first_page_cpc 10 | , top_of_page_cpc 11 | , final_mobile_urls 12 | , tracking_url_template 13 | , url_custom_parameters 14 | 15 | from {{ source('ads', 'keywords') }} 16 | 17 | {{ source_filter_rows( 18 | account_id=var('account_id_ads') 19 | ) }} -------------------------------------------------------------------------------- /models/staging/ads/stg_ads_keywords_facts.sql: -------------------------------------------------------------------------------- 1 | select 2 | 3 | f.id as id 4 | , f.account_id as account_id 5 | , f.campaigns_id as campaigns_id 6 | , f.adgroups_id as adgroups_id 7 | , f.keywords_id as keywords_id 8 | , f.dates_id as dates_id 9 | , f.traffic_id as traffic_id 10 | , f.sites_id as sites_id 11 | , f.ad_network as ad_network 12 | , f.device as device 13 | , f.impressions as impressions 14 | , f.clicks as clicks 15 | , f.cost as cost 16 | , f.conversions as conversions 17 | , f.conversion_value as conversion_value 18 | , f.all_conversions as all_conversions 19 | , f.all_conversion_value as all_conversion_value 20 | , f.created_date as created_date 21 | , f.modified_date as modified_date 22 | , gd.dt as dt 23 | , gd.ts as ts 24 | 25 | from {{ source('ads', 'keywords_facts') }} as f 26 | inner join {{ ref('stg_general_dates') }} as gd 27 | on gd.id = f.dates_id 28 | 29 | {{ source_filter_rows( 30 | account_id=var('account_id_ads') 31 | ) }} -------------------------------------------------------------------------------- /models/staging/ads/stg_ads_location_criterions.sql: -------------------------------------------------------------------------------- 1 | select 2 | 3 | id 4 | , account_id 5 | , campaigns_id 6 | , criterion_id 7 | , location_name 8 | , display_type 9 | , targeting_status 10 | , is_negative 11 | , canonical_name 12 | , country_code 13 | 14 | from {{ source('ads', 'location_criterions') }} 15 | 16 | {{ source_filter_rows( 17 | account_id=var('account_id_ads') 18 | ) }} -------------------------------------------------------------------------------- /models/staging/amocrm/amocrm.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | 3 | models: 4 | - name: stg_amo_companies 5 | tests: &amo_defaults 6 | - not_empty: 7 | severity: warn 8 | - not_null: 9 | column_name: id 10 | - unique: 11 | column_name: id 12 | 13 | - name: stg_amo_contacts 14 | tests: *amo_defaults 15 | 16 | - name: stg_amo_leads 17 | tests: *amo_defaults 18 | 19 | - name: stg_amo_users 20 | tests: *amo_defaults 21 | 22 | - name: stg_amo_leads_attributes 23 | tests: 24 | - not_empty: 25 | severity: warn 26 | - not_null: 27 | column_name: id 28 | - unique: 29 | column_name: id 30 | - relationships: 31 | to: ref('stg_amo_leads') 32 | column_name: leads_id 33 | field: id 34 | 35 | - name: stg_amo_leads_tags 36 | tests: 37 | - not_empty: 38 | severity: warn 39 | - not_null: 40 | column_name: id 41 | - unique: 42 | column_name: id 43 | - relationships: 44 | to: ref('stg_amo_leads') 45 | column_name: leads_id 46 | field: id 47 | 48 | - name: stg_amo_leads_facts 49 | tests: 50 | - not_empty: 51 | severity: warn 52 | - unique: 53 | column_name: leads_id 54 | - not_null: 55 | column_name: account_id 56 | - not_null: 57 | column_name: clientids_id 58 | - not_null: 59 | column_name: users_id 60 | - not_null: 61 | column_name: leads_id 62 | - not_null: 63 | column_name: contacts_id 64 | - not_null: 65 | column_name: companies_id 66 | - relationships: 67 | to: ref('stg_general_accounts') 68 | column_name: account_id 69 | field: account_id 70 | - relationships: 71 | to: ref('stg_general_clientids') 72 | column_name: clientids_id 73 | field: id 74 | - relationships: 75 | to: ref('stg_amo_users') 76 | column_name: users_id 77 | field: id 78 | - relationships: 79 | to: ref('stg_amo_leads') 80 | column_name: leads_id 81 | field: id 82 | - relationships: 83 | to: ref('stg_amo_contacts') 84 | column_name: contacts_id 85 | field: id 86 | - relationships: 87 | to: ref('stg_amo_companies') 88 | column_name: companies_id 89 | field: id 90 | -------------------------------------------------------------------------------- /models/staging/amocrm/stg_amo_companies.sql: -------------------------------------------------------------------------------- 1 | select 2 | 3 | id 4 | , account_id 5 | , company_id 6 | , name 7 | , phone 8 | , email 9 | , site 10 | , is_deleted 11 | 12 | from {{ source('amocrm', 'companies') }} 13 | 14 | {{ source_filter_rows( 15 | account_id=var('account_id_amocrm') 16 | ) }} -------------------------------------------------------------------------------- /models/staging/amocrm/stg_amo_contacts.sql: -------------------------------------------------------------------------------- 1 | select 2 | 3 | id 4 | , account_id 5 | , contact_id 6 | , name 7 | , company 8 | , post 9 | , phone 10 | , email 11 | , request_id 12 | , is_deleted 13 | 14 | from {{ source('amocrm', 'contacts') }} 15 | 16 | {{ source_filter_rows( 17 | account_id=var('account_id_amocrm') 18 | ) }} -------------------------------------------------------------------------------- /models/staging/amocrm/stg_amo_leads.sql: -------------------------------------------------------------------------------- 1 | select 2 | 3 | id 4 | , account_id 5 | , lead_id 6 | , name 7 | , pipeline 8 | , pipeline_id 9 | , status 10 | , status_id 11 | , status_order 12 | , request_id 13 | , loss_reason 14 | , loss_reason_id 15 | , is_deleted 16 | -- , is_actual 17 | -- , start_date 18 | -- , end_date 19 | 20 | from {{ source('amocrm', 'leads') }} 21 | 22 | {{ source_filter_rows( 23 | account_id=var('account_id_amocrm') 24 | ) }} -------------------------------------------------------------------------------- /models/staging/amocrm/stg_amo_leads_attributes.sql: -------------------------------------------------------------------------------- 1 | select 2 | 3 | id 4 | , account_id 5 | , leads_id 6 | , attribute_id 7 | , name 8 | , value 9 | -- , is_actual 10 | -- , start_date 11 | -- , end_date 12 | 13 | from {{ source('amocrm', 'leads_attributes') }} 14 | 15 | {{ source_filter_rows( 16 | account_id=var('account_id_amocrm') 17 | ) }} -------------------------------------------------------------------------------- /models/staging/amocrm/stg_amo_leads_facts.sql: -------------------------------------------------------------------------------- 1 | select 2 | 3 | f.account_id as account_id 4 | , f.clientids_id as clientids_id 5 | , f.users_id as users_id 6 | , f.leads_id as leads_id 7 | , f.contacts_id as contacts_id 8 | , f.companies_id as companies_id 9 | , f.unsorteds_id as unsorteds_id 10 | , created.dt as created_dt 11 | , closed.dt as closed_dt 12 | , f.price as price 13 | 14 | from {{ source('amocrm', 'leads_facts') }} as f 15 | inner join {{ ref('stg_general_dates') }} as created 16 | on created.id = f.created_id 17 | inner join {{ ref('stg_general_dates') }} as closed 18 | on closed.id = f.closed_id 19 | 20 | {{ source_filter_rows( 21 | account_id=var('account_id_amocrm') 22 | ) }} -------------------------------------------------------------------------------- /models/staging/amocrm/stg_amo_leads_tags.sql: -------------------------------------------------------------------------------- 1 | select 2 | 3 | id 4 | , account_id 5 | , leads_id 6 | , tag_id 7 | , name 8 | 9 | from {{ source('amocrm', 'leads_tags') }} 10 | 11 | {{ source_filter_rows( 12 | account_id=var('account_id_amocrm') 13 | ) }} -------------------------------------------------------------------------------- /models/staging/amocrm/stg_amo_users.sql: -------------------------------------------------------------------------------- 1 | select 2 | 3 | id 4 | , account_id 5 | , user_id 6 | , login 7 | , name 8 | , phone 9 | , group_name 10 | , email 11 | , is_admin 12 | , is_active 13 | , is_free 14 | , mail_access 15 | , catalog_access 16 | , role_id 17 | , role_name 18 | , group_id 19 | 20 | from {{ source('amocrm', 'users') }} 21 | 22 | {{ source_filter_rows( 23 | account_id=var('account_id_amocrm') 24 | ) }} -------------------------------------------------------------------------------- /models/staging/bitrix24/bitrix24.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | 3 | models: 4 | - name: stg_b24_users 5 | tests: &b24_defaults 6 | - not_empty: 7 | severity: warn 8 | - not_null: 9 | column_name: id 10 | - unique: 11 | column_name: id 12 | 13 | - name: stg_b24_deals 14 | tests: *b24_defaults 15 | 16 | - name: stg_b24_contacts 17 | tests: *b24_defaults 18 | 19 | - name: stg_b24_companies 20 | tests: *b24_defaults 21 | 22 | - name: stg_b24_products 23 | tests: *b24_defaults 24 | 25 | - name: stg_b24_leads 26 | tests: *b24_defaults 27 | 28 | - name: stg_b24_leads_facts 29 | tests: 30 | - not_empty: 31 | severity: warn 32 | - unique: 33 | column_name: leads_id 34 | - not_null: 35 | column_name: account_id 36 | - not_null: 37 | column_name: clientids_id 38 | - not_null: 39 | column_name: traffic_id 40 | - not_null: 41 | column_name: users_id 42 | - not_null: 43 | column_name: leads_id 44 | - not_null: 45 | column_name: contacts_id 46 | - not_null: 47 | column_name: companies_id 48 | - not_null: 49 | column_name: locations_id 50 | - not_null: 51 | column_name: deals_id 52 | - relationships: 53 | to: ref('stg_general_accounts') 54 | column_name: account_id 55 | field: account_id 56 | - relationships: 57 | to: ref('stg_general_clientids') 58 | column_name: clientids_id 59 | field: id 60 | - relationships: 61 | to: ref('stg_general_traffic') 62 | column_name: traffic_id 63 | field: id 64 | - relationships: 65 | to: ref('stg_general_locations') 66 | column_name: locations_id 67 | field: id 68 | - relationships: 69 | to: ref('stg_b24_users') 70 | column_name: users_id 71 | field: id 72 | - relationships: 73 | to: ref('stg_b24_leads') 74 | column_name: leads_id 75 | field: id 76 | - relationships: 77 | to: ref('stg_b24_contacts') 78 | column_name: contacts_id 79 | field: id 80 | - relationships: 81 | to: ref('stg_b24_companies') 82 | column_name: companies_id 83 | field: id 84 | - relationships: 85 | to: ref('stg_b24_deals') 86 | column_name: deals_id 87 | field: id 88 | 89 | - name: stg_b24_deals_facts 90 | tests: 91 | - not_empty: 92 | severity: warn 93 | - unique: 94 | column_name: deals_id 95 | - not_null: 96 | column_name: account_id 97 | - not_null: 98 | column_name: clientids_id 99 | - not_null: 100 | column_name: traffic_id 101 | - not_null: 102 | column_name: users_id 103 | - not_null: 104 | column_name: deals_id 105 | - not_null: 106 | column_name: contacts_id 107 | - not_null: 108 | column_name: companies_id 109 | - not_null: 110 | column_name: locations_id 111 | - relationships: 112 | to: ref('stg_general_accounts') 113 | column_name: account_id 114 | field: account_id 115 | - relationships: 116 | to: ref('stg_general_clientids') 117 | column_name: clientids_id 118 | field: id 119 | - relationships: 120 | to: ref('stg_general_traffic') 121 | column_name: traffic_id 122 | field: id 123 | - relationships: 124 | to: ref('stg_b24_users') 125 | column_name: users_id 126 | field: id 127 | - relationships: 128 | to: ref('stg_b24_deals') 129 | column_name: deals_id 130 | field: id 131 | - relationships: 132 | to: ref('stg_b24_contacts') 133 | column_name: contacts_id 134 | field: id 135 | - relationships: 136 | to: ref('stg_b24_companies') 137 | column_name: companies_id 138 | field: id 139 | - relationships: 140 | to: ref('stg_general_locations') 141 | column_name: locations_id 142 | field: id 143 | 144 | - name: stg_b24_products_facts 145 | tests: 146 | - not_empty: 147 | severity: warn 148 | - unique: 149 | column_name: products_id 150 | - not_null: 151 | column_name: account_id 152 | - not_null: 153 | column_name: clientids_id 154 | - not_null: 155 | column_name: traffic_id 156 | - not_null: 157 | column_name: users_id 158 | - not_null: 159 | column_name: deals_id 160 | - not_null: 161 | column_name: contacts_id 162 | - not_null: 163 | column_name: companies_id 164 | - not_null: 165 | column_name: locations_id 166 | - not_null: 167 | column_name: products_id 168 | - relationships: 169 | to: ref('stg_general_accounts') 170 | column_name: account_id 171 | field: account_id 172 | - relationships: 173 | to: ref('stg_general_clientids') 174 | column_name: clientids_id 175 | field: id 176 | - relationships: 177 | to: ref('stg_general_traffic') 178 | column_name: traffic_id 179 | field: id 180 | - relationships: 181 | to: ref('stg_b24_users') 182 | column_name: users_id 183 | field: id 184 | - relationships: 185 | to: ref('stg_b24_deals') 186 | column_name: deals_id 187 | field: id 188 | - relationships: 189 | to: ref('stg_b24_contacts') 190 | column_name: contacts_id 191 | field: id 192 | - relationships: 193 | to: ref('stg_b24_companies') 194 | column_name: companies_id 195 | field: id 196 | - relationships: 197 | to: ref('stg_general_locations') 198 | column_name: locations_id 199 | field: id 200 | - relationships: 201 | to: ref('stg_b24_products') 202 | column_name: products_id 203 | field: id 204 | -------------------------------------------------------------------------------- /models/staging/bitrix24/stg_b24_companies.sql: -------------------------------------------------------------------------------- 1 | select 2 | 3 | id 4 | , account_id 5 | , company_id 6 | , company_type 7 | , title 8 | , address_legal 9 | , banking_details 10 | , industry 11 | , employees 12 | , revenue 13 | , comments 14 | , phone 15 | , email 16 | , web 17 | , im 18 | , is_deleted 19 | 20 | from {{ source('bitrix24', 'companies') }} 21 | 22 | {{ source_filter_rows( 23 | account_id=var('account_id_bitrix24') 24 | ) }} -------------------------------------------------------------------------------- /models/staging/bitrix24/stg_b24_contacts.sql: -------------------------------------------------------------------------------- 1 | select 2 | 3 | id 4 | , account_id 5 | , contact_id 6 | , name 7 | , second_name 8 | , last_name 9 | , contact_type 10 | , birthdate 11 | , post 12 | , comments 13 | , phone 14 | , email 15 | , web 16 | , im 17 | , is_deleted 18 | 19 | from {{ source('bitrix24', 'contacts') }} 20 | 21 | {{ source_filter_rows( 22 | account_id=var('account_id_bitrix24') 23 | ) }} -------------------------------------------------------------------------------- /models/staging/bitrix24/stg_b24_deals.sql: -------------------------------------------------------------------------------- 1 | select 2 | 3 | id 4 | , account_id 5 | , deal_id 6 | , title 7 | , deal_type 8 | , category_id 9 | , category 10 | , stage_id 11 | , stage 12 | , probability 13 | , currency 14 | , comments 15 | , additional_info 16 | , source_id 17 | , source_name 18 | , source_description 19 | , closed 20 | , is_return_customer 21 | , is_deleted 22 | 23 | from {{ source('bitrix24', 'deals') }} 24 | 25 | {{ source_filter_rows( 26 | account_id=var('account_id_bitrix24') 27 | ) }} -------------------------------------------------------------------------------- /models/staging/bitrix24/stg_b24_deals_facts.sql: -------------------------------------------------------------------------------- 1 | select 2 | 3 | f.account_id as account_id 4 | , f.clientids_id as clientids_id 5 | , f.traffic_id as traffic_id 6 | , f.users_id as users_id 7 | , f.deals_id as deals_id 8 | , f.contacts_id as contacts_id 9 | , f.companies_id as companies_id 10 | , f.locations_id as locations_id 11 | , created.dt as created_dt 12 | , began.dt as begin_dt 13 | , ended.dt as end_dt 14 | , f.deal_total as deal_total 15 | 16 | from {{ source('bitrix24', 'deals_facts') }} as f 17 | inner join {{ ref('stg_general_dates') }} as created 18 | on created.id = f.createdate_id 19 | inner join {{ ref('stg_general_dates') }} as began 20 | on began.id = f.begindate_id 21 | inner join {{ ref('stg_general_dates') }} as ended 22 | on ended.id = f.enddate_id 23 | 24 | {{ source_filter_rows( 25 | account_id=var('account_id_bitrix24') 26 | ) }} -------------------------------------------------------------------------------- /models/staging/bitrix24/stg_b24_leads.sql: -------------------------------------------------------------------------------- 1 | select 2 | 3 | id 4 | , account_id 5 | , lead_id 6 | , title 7 | , name 8 | , second_name 9 | , last_name 10 | , company_title 11 | , source_id 12 | , source_name 13 | , source_description 14 | , status_id 15 | , status_name 16 | , status_description 17 | , post 18 | , comments 19 | , phone 20 | , email 21 | , web 22 | , im 23 | , is_return_customer 24 | , is_deleted 25 | 26 | from {{ source('bitrix24', 'leads') }} 27 | 28 | {{ source_filter_rows( 29 | account_id=var('account_id_bitrix24') 30 | ) }} -------------------------------------------------------------------------------- /models/staging/bitrix24/stg_b24_leads_facts.sql: -------------------------------------------------------------------------------- 1 | select 2 | 3 | f.account_id as account_id 4 | , f.clientids_id as clientids_id 5 | , f.traffic_id as traffic_id 6 | , f.users_id as users_id 7 | , f.leads_id as leads_id 8 | , f.contacts_id as contacts_id 9 | , f.companies_id as companies_id 10 | , f.locations_id as locations_id 11 | , f.deals_id as deals_id 12 | , created.dt as created_dt 13 | , closed.dt as closed_dt 14 | , f.lead_total as lead_total 15 | 16 | from {{ source('bitrix24', 'leads_facts') }} as f 17 | inner join {{ ref('stg_general_dates') }} as created 18 | on created.id = f.created_id 19 | inner join {{ ref('stg_general_dates') }} as closed 20 | on closed.id = f.closed_id 21 | 22 | {{ source_filter_rows( 23 | account_id=var('account_id_bitrix24') 24 | ) }} -------------------------------------------------------------------------------- /models/staging/bitrix24/stg_b24_products.sql: -------------------------------------------------------------------------------- 1 | select 2 | 3 | id 4 | , account_id 5 | , product_id 6 | , name 7 | , original_name 8 | , description 9 | , measure 10 | , tax_rate 11 | , tax_included 12 | 13 | from {{ source('bitrix24', 'products') }} 14 | 15 | {{ source_filter_rows( 16 | account_id=var('account_id_bitrix24') 17 | ) }} -------------------------------------------------------------------------------- /models/staging/bitrix24/stg_b24_products_facts.sql: -------------------------------------------------------------------------------- 1 | select 2 | 3 | f.account_id as account_id 4 | , f.clientids_id as clientids_id 5 | , f.traffic_id as traffic_id 6 | , f.users_id as users_id 7 | , f.deals_id as deals_id 8 | , f.contacts_id as contacts_id 9 | , f.companies_id as companies_id 10 | , f.locations_id as locations_id 11 | , began.dt as begin_dt 12 | , ended.dt as end_dt 13 | , f.products_id as products_id 14 | , f.quantity as quantity 15 | , f.product_total as product_total 16 | , f.discount as discount 17 | 18 | from {{ source('bitrix24', 'products_facts') }} as f 19 | inner join {{ ref('stg_general_dates') }} as began 20 | on began.id = f.begindate_id 21 | inner join {{ ref('stg_general_dates') }} as ended 22 | on ended.id = f.enddate_id 23 | 24 | {{ source_filter_rows( 25 | account_id=var('account_id_bitrix24') 26 | ) }} -------------------------------------------------------------------------------- /models/staging/bitrix24/stg_b24_users.sql: -------------------------------------------------------------------------------- 1 | select 2 | 3 | id 4 | , account_id 5 | , user_id 6 | , email 7 | , name 8 | , last_name 9 | , second_name 10 | , work_company 11 | , work_position 12 | , work_phone 13 | 14 | from {{ source('bitrix24', 'users') }} 15 | 16 | {{ source_filter_rows( 17 | account_id=var('account_id_bitrix24') 18 | ) }} -------------------------------------------------------------------------------- /models/staging/currencies/currency.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | 3 | models: 4 | - name: stg_currency_items 5 | tests: 6 | - not_empty: 7 | severity: warn 8 | - not_null: 9 | column_name: id 10 | - unique: 11 | column_name: id 12 | - not_null: 13 | column_name: account_id 14 | - relationships: 15 | to: ref('stg_general_accounts') 16 | column_name: account_id 17 | field: account_id 18 | 19 | - name: stg_currency_items_facts 20 | tests: 21 | - not_empty: 22 | severity: warn 23 | - not_null: 24 | column_name: id 25 | - unique: 26 | column_name: id 27 | - not_null: 28 | column_name: account_id 29 | - not_null: 30 | column_name: items_id 31 | - not_null: 32 | column_name: dates_id 33 | - not_null: 34 | column_name: rate 35 | - relationships: 36 | to: ref('stg_general_accounts') 37 | column_name: account_id 38 | field: account_id 39 | - relationships: 40 | to: ref('stg_general_dates') 41 | column_name: dates_id 42 | field: id 43 | - relationships: 44 | to: ref('stg_currency_items') 45 | column_name: items_id 46 | field: id 47 | -------------------------------------------------------------------------------- /models/staging/currencies/stg_currency_items.sql: -------------------------------------------------------------------------------- 1 | select 2 | 3 | id 4 | , account_id 5 | , name 6 | , alphabetic_code 7 | , numeric_code 8 | 9 | from {{ source('currency', 'items') }} 10 | 11 | {{ source_filter_rows( 12 | account_id=var('account_id_currency') 13 | ) }} -------------------------------------------------------------------------------- /models/staging/currencies/stg_currency_items_facts.sql: -------------------------------------------------------------------------------- 1 | select 2 | 3 | f.id as id 4 | , f.account_id as account_id 5 | , f.items_id as items_id 6 | , f.dates_id as dates_id 7 | , f.rate as rate 8 | , f.minor_unit as minor_unit 9 | , gd.dt as dt 10 | , gd.ts as ts 11 | 12 | from {{ source('currency', 'items_facts') }} as f 13 | inner join {{ ref('stg_general_dates') }} as gd 14 | on gd.id = f.dates_id 15 | 16 | {{ source_filter_rows( 17 | account_id=var('account_id_currency') 18 | ) }} -------------------------------------------------------------------------------- /models/staging/direct/direct.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | 3 | models: 4 | - name: stg_yd_campaigns 5 | tests: &direct_defaults 6 | - not_empty: 7 | severity: warn 8 | - not_null: 9 | column_name: id 10 | - unique: 11 | column_name: id 12 | 13 | - name: stg_yd_adgroups 14 | tests: *direct_defaults 15 | 16 | - name: stg_yd_ads 17 | tests: *direct_defaults 18 | 19 | - name: stg_yd_sitelinks 20 | tests: 21 | - not_empty: 22 | severity: warn 23 | - not_null: 24 | column_name: id 25 | - unique: 26 | column_name: id 27 | - relationships: 28 | to: ref('stg_yd_ads') 29 | column_name: ads_id 30 | field: id 31 | 32 | - name: stg_yd_regions 33 | tests: 34 | - not_empty: 35 | severity: warn 36 | - not_null: 37 | column_name: id 38 | - unique: 39 | column_name: id 40 | - relationships: 41 | to: ref('stg_yd_adgroups') 42 | column_name: adgroups_id 43 | field: id 44 | 45 | - name: stg_yd_ads_facts 46 | tests: 47 | - not_empty: 48 | severity: warn 49 | - not_null: 50 | column_name: id 51 | - unique: 52 | column_name: id 53 | - not_null: 54 | column_name: account_id 55 | - not_null: 56 | column_name: campaigns_id 57 | - not_null: 58 | column_name: adgroups_id 59 | - not_null: 60 | column_name: ads_id 61 | - not_null: 62 | column_name: dates_id 63 | - not_null: 64 | column_name: traffic_id 65 | - not_null: 66 | column_name: sites_id 67 | - relationships: 68 | to: ref('stg_general_accounts') 69 | column_name: account_id 70 | field: account_id 71 | - relationships: 72 | to: ref('stg_general_dates') 73 | column_name: dates_id 74 | field: id 75 | - relationships: 76 | to: ref('stg_general_traffic') 77 | column_name: traffic_id 78 | field: id 79 | - relationships: 80 | to: ref('stg_general_sites') 81 | column_name: sites_id 82 | field: id 83 | - relationships: 84 | to: ref('stg_yd_campaigns') 85 | column_name: campaigns_id 86 | field: id 87 | - relationships: 88 | to: ref('stg_yd_adgroups') 89 | column_name: adgroups_id 90 | field: id 91 | - relationships: 92 | to: ref('stg_yd_ads') 93 | column_name: ads_id 94 | field: id 95 | -------------------------------------------------------------------------------- /models/staging/direct/stg_yd_adgroups.sql: -------------------------------------------------------------------------------- 1 | select 2 | 3 | id 4 | , account_id 5 | , adgroup_id 6 | , name 7 | , tracking_params 8 | , status 9 | , serving_status 10 | , adgroup_type 11 | , adgroup_subtype 12 | 13 | from {{ source('direct', 'adgroups') }} 14 | 15 | {{ source_filter_rows( 16 | account_id=var('account_id_direct') 17 | ) }} -------------------------------------------------------------------------------- /models/staging/direct/stg_yd_ads.sql: -------------------------------------------------------------------------------- 1 | select 2 | 3 | id 4 | , account_id 5 | , ad_id 6 | , status 7 | , state 8 | , clarification 9 | , age_label 10 | , ad_type 11 | , ad_subtype 12 | , title 13 | , title_two 14 | , text_content 15 | , url 16 | , mobile 17 | , display_domain 18 | , display_url_path 19 | 20 | from {{ source('direct', 'ads') }} 21 | 22 | {{ source_filter_rows( 23 | account_id=var('account_id_direct') 24 | ) }} -------------------------------------------------------------------------------- /models/staging/direct/stg_yd_ads_facts.sql: -------------------------------------------------------------------------------- 1 | select 2 | 3 | {{ dbt_utils.surrogate_key(["account_id", 4 | "campaigns_id", 5 | "adgroups_id", 6 | "ads_id", 7 | "dates_id", 8 | "sites_id", 9 | "traffic_id", 10 | "device"]) 11 | }} as id 12 | , f.account_id as account_id 13 | , f.campaigns_id as campaigns_id 14 | , f.adgroups_id as adgroups_id 15 | , f.ads_id as ads_id 16 | , f.dates_id as dates_id 17 | , f.sites_id as sites_id 18 | , f.traffic_id as traffic_id 19 | , f.device as device 20 | , f.impressions_context as impressions_context 21 | , f.impressions_search as impressions_search 22 | , f.impressions as impressions 23 | , f.clicks_context as clicks_context 24 | , f.clicks_search as clicks_search 25 | , f.clicks as clicks 26 | , f.cost_context as cost_context 27 | , f.cost_search as cost_search 28 | , f.cost as cost 29 | , f.average_position as average_position 30 | , f.average_position_clicks as average_position_clicks 31 | , f.bounces as bounces 32 | , gd.dt as dt 33 | , gd.ts as ts 34 | 35 | from {{ source('direct', 'ads_facts') }} as f 36 | inner join {{ ref('stg_general_dates') }} as gd 37 | on gd.id = f.dates_id 38 | 39 | {{ source_filter_rows( 40 | account_id=var('account_id_direct'), 41 | limit_data_for_dev=true 42 | ) }} -------------------------------------------------------------------------------- /models/staging/direct/stg_yd_campaigns.sql: -------------------------------------------------------------------------------- 1 | select 2 | 3 | id 4 | , account_id 5 | , campaign_id 6 | , name 7 | , campaign_type 8 | , status 9 | , state 10 | , status_payment 11 | , status_clarification 12 | , currency 13 | , daily_budget_amount 14 | , daily_budget_mode 15 | -- , is_actual 16 | -- , start_date 17 | -- , end_date 18 | 19 | from {{ source('direct', 'campaigns') }} 20 | 21 | {{ source_filter_rows( 22 | account_id=var('account_id_direct') 23 | ) }} -------------------------------------------------------------------------------- /models/staging/direct/stg_yd_regions.sql: -------------------------------------------------------------------------------- 1 | select 2 | 3 | id 4 | , account_id 5 | , adgroups_id 6 | , region_id 7 | , name 8 | , region_type 9 | , is_negative 10 | 11 | from {{ source('direct', 'regions') }} 12 | 13 | {{ source_filter_rows( 14 | account_id=var('account_id_direct') 15 | ) }} -------------------------------------------------------------------------------- /models/staging/direct/stg_yd_sitelinks.sql: -------------------------------------------------------------------------------- 1 | select 2 | 3 | id 4 | , account_id 5 | , ads_id 6 | , sitelink_id 7 | , title 8 | , href 9 | , description 10 | 11 | from {{ source('direct', 'sitelinks') }} 12 | 13 | {{ source_filter_rows( 14 | account_id=var('account_id_direct') 15 | ) }} -------------------------------------------------------------------------------- /models/staging/facebook/facebook.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | 3 | models: 4 | - name: stg_fb_campaigns 5 | tests: &facebook_defaults 6 | - not_empty: 7 | severity: warn 8 | - not_null: 9 | column_name: id 10 | - unique: 11 | column_name: id 12 | 13 | - name: stg_fb_adsets 14 | tests: *facebook_defaults 15 | 16 | - name: stg_fb_ads 17 | tests: *facebook_defaults 18 | 19 | - name: stg_fb_creatives 20 | tests: *facebook_defaults 21 | 22 | - name: stg_fb_ads_facts 23 | tests: 24 | - not_empty: 25 | severity: warn 26 | - not_null: 27 | column_name: id 28 | - unique: 29 | column_name: id 30 | - not_null: 31 | column_name: account_id 32 | - not_null: 33 | column_name: dates_id 34 | - not_null: 35 | column_name: traffic_id 36 | - not_null: 37 | column_name: sites_id 38 | - not_null: 39 | column_name: campaigns_id 40 | - not_null: 41 | column_name: adsets_id 42 | - not_null: 43 | column_name: ads_id 44 | - not_null: 45 | column_name: creatives_id 46 | - relationships: 47 | to: ref('stg_general_accounts') 48 | column_name: account_id 49 | field: account_id 50 | - relationships: 51 | to: ref('stg_general_dates') 52 | column_name: dates_id 53 | field: id 54 | - relationships: 55 | to: ref('stg_general_traffic') 56 | column_name: traffic_id 57 | field: id 58 | - relationships: 59 | to: ref('stg_general_sites') 60 | column_name: sites_id 61 | field: id 62 | - relationships: 63 | to: ref('stg_fb_campaigns') 64 | column_name: campaigns_id 65 | field: id 66 | - relationships: 67 | to: ref('stg_fb_adsets') 68 | column_name: adsets_id 69 | field: id 70 | - relationships: 71 | to: ref('stg_fb_ads') 72 | column_name: ads_id 73 | field: id 74 | - relationships: 75 | to: ref('stg_fb_creatives') 76 | column_name: creatives_id 77 | field: id -------------------------------------------------------------------------------- /models/staging/facebook/stg_fb_ads.sql: -------------------------------------------------------------------------------- 1 | select 2 | 3 | id 4 | , account_id 5 | , ad_id 6 | , name 7 | , configured_status 8 | , effective_status 9 | 10 | from {{ source('facebook', 'ads') }} 11 | 12 | {{ source_filter_rows( 13 | account_id=var('account_id_facebook') 14 | ) }} -------------------------------------------------------------------------------- /models/staging/facebook/stg_fb_ads_facts.sql: -------------------------------------------------------------------------------- 1 | select 2 | 3 | {{ dbt_utils.surrogate_key(["account_id", 4 | "campaigns_id", 5 | "adsets_id", 6 | "ads_id", 7 | "creatives_id", 8 | "dates_id", 9 | "traffic_id", 10 | "sites_id"]) 11 | }} as id 12 | , f.account_id as account_id 13 | , f.dates_id as dates_id 14 | , f.traffic_id as traffic_id 15 | , f.sites_id as sites_id 16 | , f.campaigns_id as campaigns_id 17 | , f.adsets_id as adsets_id 18 | , f.ads_id as ads_id 19 | , f.creatives_id as creatives_id 20 | , f.clicks as clicks 21 | , f.unique_clicks as unique_clicks 22 | , f.cpc as cpc 23 | , f.cost_per_unique_click as cost_per_unique_click 24 | , f.cpm as cpm 25 | , f.cpp as cpp 26 | , f.ctr as ctr 27 | , f.unique_ctr as unique_ctr 28 | , f.frequency as frequency 29 | , f.impressions as impressions 30 | , f.reach as reach 31 | , f.cost as cost 32 | , f.total_action_value as total_action_value 33 | , f.total_actions as total_actions 34 | , f.comments as comments 35 | , f.likes as likes 36 | , f.posts as posts 37 | , f.leadgens as leadgens 38 | , f.all_clicks as all_clicks 39 | , f.pixel_purchase as pixel_purchase 40 | , f.pixel_lead as pixel_lead 41 | , f.landing_page_views as landing_page_views 42 | , f.link_clicks as link_clicks 43 | , f.post_reactions as post_reactions 44 | , f.video_views as video_views 45 | , gd.dt as dt 46 | , gd.ts as ts 47 | 48 | from {{ source('facebook', 'ads_facts') }} as f 49 | inner join {{ ref('stg_general_dates') }} as gd 50 | on gd.id = f.dates_id 51 | 52 | {{ source_filter_rows( 53 | account_id=var('account_id_facebook') 54 | ) }} -------------------------------------------------------------------------------- /models/staging/facebook/stg_fb_adsets.sql: -------------------------------------------------------------------------------- 1 | select 2 | 3 | id 4 | , account_id 5 | , adset_id 6 | , name 7 | , billing_event 8 | , configured_status 9 | , effective_status 10 | , is_autobid 11 | , optimization_goal 12 | , rtb_flag 13 | , bid_strategy 14 | , destination_type 15 | 16 | from {{ source('facebook', 'adsets') }} 17 | 18 | {{ source_filter_rows( 19 | account_id=var('account_id_facebook') 20 | ) }} -------------------------------------------------------------------------------- /models/staging/facebook/stg_fb_campaigns.sql: -------------------------------------------------------------------------------- 1 | select 2 | 3 | id 4 | , account_id 5 | , campaign_id 6 | , name 7 | , buying_type 8 | , configured_status 9 | , effective_status 10 | , objective 11 | , special_ad_category 12 | , bid_strategy 13 | 14 | from {{ source('facebook', 'campaigns') }} 15 | 16 | {{ source_filter_rows( 17 | account_id=var('account_id_facebook') 18 | ) }} -------------------------------------------------------------------------------- /models/staging/facebook/stg_fb_creatives.sql: -------------------------------------------------------------------------------- 1 | select 2 | 3 | id 4 | , account_id 5 | , creative_id 6 | , body 7 | , call_to_action_type 8 | , image_crops 9 | , image_url 10 | , link_url 11 | , name 12 | , object_id 13 | , object_story_id 14 | , object_story_spec 15 | , object_url 16 | , thumbnail_url 17 | , title 18 | , url_tags 19 | , instagram_permalink_url 20 | , object_type 21 | , status 22 | , template_url 23 | 24 | from {{ source('facebook', 'creatives') }} 25 | 26 | {{ source_filter_rows( 27 | account_id=var('account_id_facebook') 28 | ) }} -------------------------------------------------------------------------------- /models/staging/ga/stg_ga_costs_facts.sql: -------------------------------------------------------------------------------- 1 | select 2 | 3 | f.account_id as account_id 4 | , f.dates_id as dates_id 5 | , f.sites_id as sites_id 6 | , f.traffic_id as traffic_id 7 | , f.impressions_context as impressions_context 8 | , f.impressions_search as impressions_search 9 | , f.impressions as impressions 10 | , f.clicks_context as clicks_context 11 | , f.clicks_search as clicks_search 12 | , f.clicks as clicks 13 | , f.cost_context as cost_context 14 | , f.cost_search as cost_search 15 | , f.cost as cost 16 | , gd.dt as dt 17 | , gd.ts as ts 18 | 19 | from {{ source('ga', 'costs_facts') }} as f 20 | inner join {{ ref('stg_general_dates') }} as gd 21 | on gd.id = f.dates_id 22 | 23 | {{ source_filter_rows( 24 | account_id=var('account_id_ga') 25 | ) }} -------------------------------------------------------------------------------- /models/staging/ga/stg_ga_devices.sql: -------------------------------------------------------------------------------- 1 | select 2 | 3 | id 4 | , account_id 5 | , category 6 | , browser 7 | , browser_version 8 | , os 9 | , os_version 10 | 11 | from {{ source('ga', 'devices') }} 12 | 13 | {{ source_filter_rows( 14 | account_id=var('account_id_ga') 15 | ) }} -------------------------------------------------------------------------------- /models/staging/ga/stg_ga_events.sql: -------------------------------------------------------------------------------- 1 | select 2 | 3 | id 4 | , account_id 5 | , category 6 | , action 7 | , label 8 | 9 | from {{ source('ga', 'events') }} 10 | 11 | {{ source_filter_rows( 12 | account_id=var('account_id_ga') 13 | ) }} -------------------------------------------------------------------------------- /models/staging/ga/stg_ga_events_facts.sql: -------------------------------------------------------------------------------- 1 | select 2 | 3 | f.account_id as account_id 4 | , f.dates_id as dates_id 5 | , f.clientids_id as clientids_id 6 | , f.traffic_id as traffic_id 7 | , f.events_id as events_id 8 | , f.total_events as total_events 9 | , f.unique_events as unique_events 10 | , f.event_value as event_value 11 | , f.locations_id as locations_id 12 | , f.devices_id as devices_id 13 | , f.sites_id as sites_id 14 | , gd.dt as dt 15 | , gd.ts as ts 16 | 17 | from {{ source('ga', 'events_facts') }} as f 18 | inner join {{ ref('stg_general_dates') }} as gd 19 | on gd.id = f.dates_id 20 | 21 | {{ source_filter_rows( 22 | account_id=var('account_id_ga') 23 | ) }} -------------------------------------------------------------------------------- /models/staging/ga/stg_ga_goals.sql: -------------------------------------------------------------------------------- 1 | select 2 | 3 | id 4 | , account_id 5 | , goal_id 6 | , name 7 | , active 8 | 9 | from {{ source('ga', 'goals') }} 10 | 11 | {{ source_filter_rows( 12 | account_id=var('account_id_ga') 13 | ) }} -------------------------------------------------------------------------------- /models/staging/ga/stg_ga_goals_facts.sql: -------------------------------------------------------------------------------- 1 | select 2 | 3 | f.account_id as account_id 4 | , f.dates_id as dates_id 5 | , f.sites_id as sites_id 6 | , f.clientids_id as clientids_id 7 | , f.devices_id as devices_id 8 | , f.traffic_id as traffic_id 9 | , f.locations_id as locations_id 10 | , f.goals_id as goals_id 11 | , f.completions as completions 12 | , f.goal_value as goal_value 13 | , gd.dt as dt 14 | , gd.ts as ts 15 | 16 | from {{ source('ga', 'goals_facts') }} as f 17 | inner join {{ ref('stg_general_dates') }} as gd 18 | on gd.id = f.dates_id 19 | 20 | {{ source_filter_rows( 21 | account_id=var('account_id_ga') 22 | ) }} -------------------------------------------------------------------------------- /models/staging/ga/stg_ga_mcf_facts.sql: -------------------------------------------------------------------------------- 1 | select 2 | 3 | f.account_id as account_id 4 | , f.dates_id as dates_id 5 | , f.traffic_id as traffic_id 6 | , f.assisted_count as assisted_count 7 | , f.assisted_value as assisted_value 8 | , f.first_count as first_count 9 | , f.first_value as first_value 10 | , f.last_count as last_count 11 | , f.last_value as last_value 12 | , f.total_count as total_count 13 | , f.total_value as total_value 14 | , f.conversion_type as conversion_type 15 | , f.goal_number as goal_number 16 | , gd.dt as dt 17 | , gd.ts as ts 18 | 19 | from {{ source('ga', 'mcf_facts') }} as f 20 | inner join {{ ref('stg_general_dates') }} as gd 21 | on gd.id = f.dates_id 22 | 23 | {{ source_filter_rows( 24 | account_id=var('account_id_ga') 25 | ) }} -------------------------------------------------------------------------------- /models/staging/ga/stg_ga_sessions_facts.sql: -------------------------------------------------------------------------------- 1 | select 2 | 3 | f.account_id as account_id 4 | , f.dates_id as dates_id 5 | , f.sites_id as sites_id 6 | , f.clientids_id as clientids_id 7 | , f.devices_id as devices_id 8 | , f.traffic_id as traffic_id 9 | , f.locations_id as locations_id 10 | , f.session_id as session_id 11 | , f.user_type as user_type 12 | , f.sessions as sessions 13 | , f.bounces as bounces 14 | , f.pageviews as pageviews 15 | , f.duration as duration 16 | , gd.dt as dt 17 | , gd.ts as ts 18 | 19 | from {{ source('ga', 'sessions_facts') }} as f 20 | inner join {{ ref('stg_general_dates') }} as gd 21 | on gd.id = f.dates_id 22 | 23 | {{ source_filter_rows( 24 | account_id=var('account_id_ga') 25 | ) }} -------------------------------------------------------------------------------- /models/staging/gaw/gaw.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | 3 | models: 4 | - name: stg_gaw_campaigns 5 | tests: &gaw_defaults 6 | - not_empty: 7 | severity: warn 8 | - not_null: 9 | column_name: id 10 | - unique: 11 | column_name: id 12 | 13 | - name: stg_gaw_adgroups 14 | tests: *gaw_defaults 15 | 16 | - name: stg_gaw_ads 17 | tests: *gaw_defaults 18 | 19 | - name: stg_gaw_keywords 20 | tests: *gaw_defaults 21 | 22 | - name: stg_gaw_location_criterions 23 | tests: 24 | - not_empty: 25 | severity: warn 26 | - not_null: 27 | column_name: id 28 | - unique: 29 | column_name: id 30 | - relationships: 31 | to: ref('stg_gaw_campaigns') 32 | column_name: campaigns_id 33 | field: id 34 | 35 | 36 | - name: stg_gaw_ads_facts 37 | tests: 38 | - not_empty: 39 | severity: warn 40 | - not_null: 41 | column_name: id 42 | - unique: 43 | column_name: id 44 | - not_null: 45 | column_name: account_id 46 | - not_null: 47 | column_name: campaigns_id 48 | - not_null: 49 | column_name: adgroups_id 50 | - not_null: 51 | column_name: ads_id 52 | - not_null: 53 | column_name: dates_id 54 | - not_null: 55 | column_name: traffic_id 56 | - not_null: 57 | column_name: sites_id 58 | - relationships: 59 | to: ref('stg_general_accounts') 60 | column_name: account_id 61 | field: account_id 62 | - relationships: 63 | to: ref('stg_general_dates') 64 | column_name: dates_id 65 | field: id 66 | - relationships: 67 | to: ref('stg_general_traffic') 68 | column_name: traffic_id 69 | field: id 70 | - relationships: 71 | to: ref('stg_general_sites') 72 | column_name: sites_id 73 | field: id 74 | - relationships: 75 | to: ref('stg_gaw_campaigns') 76 | column_name: campaigns_id 77 | field: id 78 | - relationships: 79 | to: ref('stg_gaw_adgroups') 80 | column_name: adgroups_id 81 | field: id 82 | - relationships: 83 | to: ref('stg_gaw_ads') 84 | column_name: ads_id 85 | field: id 86 | 87 | - name: stg_gaw_keywords_facts 88 | tests: 89 | - not_empty: 90 | severity: warn 91 | - not_null: 92 | column_name: id 93 | - unique: 94 | column_name: id 95 | - not_null: 96 | column_name: account_id 97 | - not_null: 98 | column_name: campaigns_id 99 | - not_null: 100 | column_name: adgroups_id 101 | - not_null: 102 | column_name: keywords_id 103 | - not_null: 104 | column_name: dates_id 105 | - not_null: 106 | column_name: traffic_id 107 | - not_null: 108 | column_name: sites_id 109 | - relationships: 110 | to: ref('stg_general_accounts') 111 | column_name: account_id 112 | field: account_id 113 | - relationships: 114 | to: ref('stg_general_dates') 115 | column_name: dates_id 116 | field: id 117 | - relationships: 118 | to: ref('stg_general_traffic') 119 | column_name: traffic_id 120 | field: id 121 | - relationships: 122 | to: ref('stg_general_sites') 123 | column_name: sites_id 124 | field: id 125 | - relationships: 126 | to: ref('stg_gaw_campaigns') 127 | column_name: campaigns_id 128 | field: id 129 | - relationships: 130 | to: ref('stg_gaw_adgroups') 131 | column_name: adgroups_id 132 | field: id 133 | - relationships: 134 | to: ref('stg_gaw_keywords') 135 | column_name: keywords_id 136 | field: id -------------------------------------------------------------------------------- /models/staging/gaw/stg_gaw_adgroups.sql: -------------------------------------------------------------------------------- 1 | select 2 | 3 | id 4 | , account_id 5 | , adgroup_id 6 | , name 7 | , status 8 | , labels 9 | , tracking_url_template 10 | 11 | from {{ source('gaw', 'adgroups') }} 12 | 13 | {{ source_filter_rows( 14 | account_id=var('account_id_gaw') 15 | ) }} -------------------------------------------------------------------------------- /models/staging/gaw/stg_gaw_ads.sql: -------------------------------------------------------------------------------- 1 | select 2 | 3 | id 4 | , account_id 5 | , ad_id 6 | , url 7 | , display_url 8 | , final_urls 9 | , tracking_url_template 10 | , url_custom_parameters 11 | , type 12 | , headline 13 | , headline_part_one 14 | , headline_part_two 15 | , description 16 | , description_part_one 17 | , description_part_two 18 | , path_one 19 | , path_two 20 | , status 21 | , approval_status 22 | , phone_number 23 | 24 | from {{ source('gaw', 'ads') }} 25 | 26 | {{ source_filter_rows( 27 | account_id=var('account_id_gaw') 28 | ) }} -------------------------------------------------------------------------------- /models/staging/gaw/stg_gaw_ads_facts.sql: -------------------------------------------------------------------------------- 1 | select 2 | 3 | {{ dbt_utils.surrogate_key(["account_id", 4 | "campaigns_id", 5 | "adgroups_id", 6 | "ads_id", 7 | "dates_id", 8 | "traffic_id", 9 | "sites_id", 10 | "device"]) 11 | }} as id 12 | , f.account_id as account_id 13 | , f.campaigns_id as campaigns_id 14 | , f.adgroups_id as adgroups_id 15 | , f.ads_id as ads_id 16 | , f.dates_id as dates_id 17 | , f.traffic_id as traffic_id 18 | , f.sites_id as sites_id 19 | , f.device as device 20 | , f.impressions as impressions 21 | , f.impressions_context as impressions_context 22 | , f.impressions_search as impressions_search 23 | , f.clicks as clicks 24 | , f.clicks_context as clicks_context 25 | , f.clicks_search as clicks_search 26 | , f.cost as cost 27 | , f.cost_context as cost_context 28 | , f.cost_search as cost_search 29 | , f.average_position as average_position 30 | , f.conversions as conversions 31 | , f.conversion_value as conversion_value 32 | , f.all_conversions as all_conversions 33 | , f.all_conversion_value as all_conversion_value 34 | , gd.dt as dt 35 | , gd.ts as ts 36 | 37 | from {{ source('gaw', 'ads_facts') }} as f 38 | inner join {{ ref('stg_general_dates') }} as gd 39 | on gd.id = f.dates_id 40 | 41 | {{ source_filter_rows( 42 | account_id=var('account_id_gaw') 43 | ) }} -------------------------------------------------------------------------------- /models/staging/gaw/stg_gaw_campaigns.sql: -------------------------------------------------------------------------------- 1 | select 2 | 3 | id 4 | , account_id 5 | , campaign_id 6 | , name 7 | , status 8 | , serving_status 9 | , ad_serving_optimization_status 10 | , advertising_channel_type 11 | , advertising_channel_sub_type 12 | , labels 13 | , tracking_url_template 14 | , app_id 15 | , app_vendor 16 | , start_date 17 | , end_date 18 | , is_actual 19 | 20 | from {{ source('gaw', 'campaigns') }} 21 | 22 | {{ source_filter_rows( 23 | account_id=var('account_id_gaw') 24 | ) }} -------------------------------------------------------------------------------- /models/staging/gaw/stg_gaw_keywords.sql: -------------------------------------------------------------------------------- 1 | select 2 | 3 | 4 | id 5 | , account_id 6 | , keyword_id 7 | , name 8 | , final_urls 9 | , status 10 | , first_page_cpc 11 | , top_of_page_cpc 12 | 13 | from {{ source('gaw', 'keywords') }} 14 | 15 | {{ source_filter_rows( 16 | account_id=var('account_id_gaw') 17 | ) }} -------------------------------------------------------------------------------- /models/staging/gaw/stg_gaw_keywords_facts.sql: -------------------------------------------------------------------------------- 1 | select 2 | 3 | {{ dbt_utils.surrogate_key(["account_id", 4 | "campaigns_id", 5 | "adgroups_id", 6 | "keywords_id", 7 | "dates_id", 8 | "traffic_id", 9 | "sites_id", 10 | "device"]) 11 | }} as id 12 | , f.account_id as account_id 13 | , f.campaigns_id as campaigns_id 14 | , f.adgroups_id as adgroups_id 15 | , f.keywords_id as keywords_id 16 | , f.dates_id as dates_id 17 | , f.traffic_id as traffic_id 18 | , f.sites_id as sites_id 19 | , f.device as device 20 | , f.impressions as impressions 21 | , f.impressions_context as impressions_context 22 | , f.impressions_search as impressions_search 23 | , f.clicks as clicks 24 | , f.clicks_context as clicks_context 25 | , f.clicks_search as clicks_search 26 | , f.cost as cost 27 | , f.cost_context as cost_context 28 | , f.cost_search as cost_search 29 | , f.average_position as average_position 30 | , f.conversions as conversions 31 | , f.conversion_value as conversion_value 32 | , f.all_conversions as all_conversions 33 | , f.all_conversion_value as all_conversion_value 34 | , gd.dt as dt 35 | , gd.ts as ts 36 | 37 | from {{ source('gaw', 'keywords_facts') }} as f 38 | inner join {{ ref('stg_general_dates') }} as gd 39 | on gd.id = f.dates_id 40 | 41 | {{ source_filter_rows( 42 | account_id=var('account_id_gaw') 43 | ) }} -------------------------------------------------------------------------------- /models/staging/gaw/stg_gaw_location_criterions.sql: -------------------------------------------------------------------------------- 1 | select 2 | 3 | id 4 | , account_id 5 | , campaigns_id 6 | , criterion_id 7 | , location_name 8 | , display_type 9 | , targeting_status 10 | , is_negative 11 | 12 | from {{ source('gaw', 'location_criterions') }} 13 | 14 | {{ source_filter_rows( 15 | account_id=var('account_id_gaw') 16 | ) }} -------------------------------------------------------------------------------- /models/staging/general/general.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | 3 | models: 4 | 5 | - name: stg_general_clientids 6 | tests: &general_defualt 7 | - not_null: 8 | column_name: id 9 | - unique: 10 | column_name: id 11 | 12 | - name: stg_general_locations 13 | tests: *general_defualt 14 | 15 | - name: stg_general_sites 16 | tests: *general_defualt 17 | 18 | - name: stg_general_accounts 19 | tests: *general_defualt 20 | 21 | - name: stg_general_dates 22 | tests: 23 | - not_null: 24 | column_name: id 25 | - unique: 26 | column_name: id 27 | - not_null: 28 | column_name: dt 29 | - not_null: 30 | column_name: ts 31 | 32 | - name: stg_general_traffic 33 | tests: 34 | - not_null: 35 | column_name: id 36 | 37 | - name: stg_general_costs_facts 38 | tests: 39 | - not_null: 40 | column_name: account_id 41 | - not_null: 42 | column_name: dates_id 43 | - not_null: 44 | column_name: sites_id 45 | - not_null: 46 | column_name: traffic_id -------------------------------------------------------------------------------- /models/staging/general/stg_general_accounts.sql: -------------------------------------------------------------------------------- 1 | select 2 | 3 | id 4 | , account_id 5 | , caption 6 | , service 7 | , enabled 8 | , status 9 | , interval_start 10 | , interval_end 11 | 12 | from {{ source('general', 'accounts') }} -------------------------------------------------------------------------------- /models/staging/general/stg_general_clientids.sql: -------------------------------------------------------------------------------- 1 | select 2 | 3 | id 4 | , clientid 5 | , userid 6 | , phone 7 | , email 8 | 9 | from {{ source('general', 'clientids') }} -------------------------------------------------------------------------------- /models/staging/general/stg_general_costs_facts.sql: -------------------------------------------------------------------------------- 1 | select 2 | 3 | {{ dbt_utils.surrogate_key(["account_id", 4 | "dates_id", 5 | "sites_id", 6 | "traffic_id"]) 7 | }} as id 8 | , cf.account_id as account_id 9 | , cf.dates_id as dates_id 10 | , cf.sites_id as sites_id 11 | , cf.traffic_id as traffic_id 12 | , cf.impressions as impressions 13 | , cf.clicks as clicks 14 | , cf.cost as cost 15 | , cf.vat_included as vat_included 16 | , gd.dt as dt 17 | , gd.ts as ts 18 | 19 | from {{ source('general', 'costs_facts') }} as cf 20 | inner join {{ ref('stg_general_dates') }} as gd 21 | on gd.id = cf.dates_id 22 | 23 | {{ source_filter_rows( 24 | account_id=none 25 | ) }} -------------------------------------------------------------------------------- /models/staging/general/stg_general_dates.sql: -------------------------------------------------------------------------------- 1 | select 2 | 3 | id 4 | , full_date as ts 5 | , simple_date as dt 6 | , year 7 | , quarter 8 | , quarter_label 9 | , month 10 | , month_label 11 | , week 12 | , weekday 13 | , weekday_label 14 | , day 15 | , hour 16 | , minute 17 | 18 | from {{ source('general', 'dates') }} 19 | 20 | {{ source_filter_rows() }} 21 | -------------------------------------------------------------------------------- /models/staging/general/stg_general_locations.sql: -------------------------------------------------------------------------------- 1 | select 2 | 3 | id 4 | , country_iso 5 | , country 6 | , region_iso 7 | , region 8 | , city 9 | , latitude 10 | , longitude 11 | 12 | from {{ source('general', 'locations') }} -------------------------------------------------------------------------------- /models/staging/general/stg_general_sites.sql: -------------------------------------------------------------------------------- 1 | select 2 | 3 | id 4 | , domain 5 | , description 6 | 7 | from {{ source('general', 'sites') }} -------------------------------------------------------------------------------- /models/staging/general/stg_general_traffic.sql: -------------------------------------------------------------------------------- 1 | select 2 | 3 | id 4 | , grouping 5 | , source 6 | , medium 7 | , campaign 8 | , content 9 | , keyword 10 | , landing_page 11 | 12 | from {{ source('general', 'traffic') }} -------------------------------------------------------------------------------- /models/staging/metrika/metrika.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | 3 | models: 4 | - name: stg_ym_devices 5 | tests: 6 | - not_empty: 7 | severity: warn 8 | - not_null: 9 | column_name: id 10 | - unique: 11 | column_name: id 12 | 13 | - name: stg_ym_sessions_facts 14 | tests: 15 | - not_empty: 16 | severity: warn 17 | - unique: 18 | column_name: id 19 | - not_null: 20 | column_name: account_id 21 | - not_null: 22 | column_name: clientids_id 23 | - not_null: 24 | column_name: dates_id 25 | - not_null: 26 | column_name: traffic_id 27 | - not_null: 28 | column_name: locations_id 29 | - not_null: 30 | column_name: devices_id 31 | - relationships: 32 | to: ref('stg_general_accounts') 33 | column_name: account_id 34 | field: account_id 35 | - relationships: 36 | to: ref('stg_general_clientids') 37 | column_name: clientids_id 38 | field: id 39 | - relationships: 40 | to: ref('stg_general_dates') 41 | column_name: dates_id 42 | field: id 43 | - relationships: 44 | to: ref('stg_general_traffic') 45 | column_name: traffic_id 46 | field: id 47 | - relationships: 48 | to: ref('stg_general_locations') 49 | column_name: locations_id 50 | field: id 51 | - relationships: 52 | to: ref('stg_ym_devices') 53 | column_name: devices_id 54 | field: id 55 | 56 | - name: stg_ym_purchases_facts 57 | - name: stg_ym_goals_facts 58 | - name: stg_ym_goals 59 | - name: stg_ym_purchases -------------------------------------------------------------------------------- /models/staging/metrika/stg_ym_devices.sql: -------------------------------------------------------------------------------- 1 | select 2 | 3 | id 4 | , account_id 5 | , category 6 | , browser 7 | , os 8 | , os_version 9 | 10 | from {{ source('metrika', 'devices') }} 11 | 12 | {{ source_filter_rows( 13 | account_id=var('account_id_metrika') 14 | ) }} -------------------------------------------------------------------------------- /models/staging/metrika/stg_ym_goals.sql: -------------------------------------------------------------------------------- 1 | {{ 2 | config ( 3 | enabled=false 4 | ) 5 | }} 6 | 7 | select 8 | 9 | id 10 | , account_id 11 | , goal_id 12 | , name 13 | , type 14 | 15 | from {{ source('metrika', 'goals') }} 16 | 17 | {{ source_filter_rows( 18 | account_id=var('account_id_metrika') 19 | ) }} -------------------------------------------------------------------------------- /models/staging/metrika/stg_ym_goals_facts.sql: -------------------------------------------------------------------------------- 1 | {{ 2 | config ( 3 | enabled=false 4 | ) 5 | }} 6 | 7 | select 8 | 9 | f.account_id as account_id 10 | , f.clientids_id as clientids_id 11 | , f.dates_id as dates_id 12 | , f.traffic_id as traffic_id 13 | , f.goals_id as goals_id 14 | , f.completions as completions 15 | , f.goal_value as goal_value 16 | , gd.dt as dt 17 | , gd.ts as ts 18 | 19 | from {{ source('metrika', 'goals_facts') }} as f 20 | inner join {{ ref('stg_general_dates') }} as gd 21 | on gd.id = f.dates_id 22 | 23 | {{ source_filter_rows( 24 | account_id=var('account_id_metrika') 25 | ) }} -------------------------------------------------------------------------------- /models/staging/metrika/stg_ym_purchases.sql: -------------------------------------------------------------------------------- 1 | {{ 2 | config ( 3 | enabled=false 4 | ) 5 | }} 6 | 7 | select 8 | 9 | id 10 | , account_id 11 | , purchase_id 12 | 13 | from {{ source('metrika', 'purchases') }} 14 | 15 | {{ source_filter_rows( 16 | account_id=var('account_id_metrika') 17 | ) }} -------------------------------------------------------------------------------- /models/staging/metrika/stg_ym_purchases_facts.sql: -------------------------------------------------------------------------------- 1 | {{ 2 | config ( 3 | enabled=false 4 | ) 5 | }} 6 | 7 | select 8 | 9 | f.account_id as account_id 10 | , f.clientids_id as clientids_id 11 | , f.dates_id as dates_id 12 | , f.traffic_id as traffic_id 13 | , f.purchases_id as purchases_id 14 | , f.revenue as revenue 15 | , gd.dt as dt 16 | , gd.ts as ts 17 | 18 | from {{ source('metrika', 'purchases_facts') }} as f 19 | inner join {{ ref('stg_general_dates') }} as gd 20 | on gd.id = f.dates_id 21 | 22 | {{ source_filter_rows( 23 | account_id=var('account_id_metrika') 24 | ) }} -------------------------------------------------------------------------------- /models/staging/metrika/stg_ym_sessions_facts.sql: -------------------------------------------------------------------------------- 1 | select 2 | 3 | {{ dbt_utils.surrogate_key(["account_id", 4 | "clientids_id", 5 | "dates_id", 6 | "traffic_id", 7 | "locations_id", 8 | "devices_id"]) 9 | }} as id 10 | , f.account_id as account_id 11 | , f.clientids_id as clientids_id 12 | , f.dates_id as dates_id 13 | , f.traffic_id as traffic_id 14 | , f.locations_id as locations_id 15 | , f.devices_id as devices_id 16 | , f.sessions as sessions 17 | , f.bounces as bounces 18 | , f.pageviews as pageviews 19 | , f.duration as duration 20 | , gd.dt as dt 21 | , gd.ts as ts 22 | 23 | from {{ source('metrika', 'sessions_facts') }} as f 24 | inner join {{ ref('stg_general_dates') }} as gd 25 | on gd.id = f.dates_id 26 | 27 | {{ source_filter_rows( 28 | account_id=var('account_id_metrika') 29 | ) }} -------------------------------------------------------------------------------- /models/staging/mytarget/mytarget.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | 3 | models: 4 | - name: stg_mt_campaigns 5 | tests: &mytarget_defaults 6 | - not_empty: 7 | severity: warn 8 | - not_null: 9 | column_name: id 10 | - unique: 11 | column_name: id 12 | 13 | - name: stg_mt_banners 14 | tests: *mytarget_defaults 15 | 16 | - name: stg_mt_campaigns_facts 17 | tests: 18 | - not_empty: 19 | severity: warn 20 | - not_null: 21 | column_name: id 22 | - unique: 23 | column_name: id 24 | - not_null: 25 | column_name: account_id 26 | - not_null: 27 | column_name: dates_id 28 | - not_null: 29 | column_name: campaigns_id 30 | - relationships: 31 | to: ref('stg_general_accounts') 32 | column_name: account_id 33 | field: account_id 34 | - relationships: 35 | to: ref('stg_general_dates') 36 | column_name: dates_id 37 | field: id 38 | - relationships: 39 | to: ref('stg_mt_campaigns') 40 | column_name: campaigns_id 41 | field: id 42 | 43 | - name: stg_mt_banners_facts 44 | tests: 45 | - not_empty: 46 | severity: warn 47 | - not_null: 48 | column_name: id 49 | - unique: 50 | column_name: id 51 | - not_null: 52 | column_name: account_id 53 | - not_null: 54 | column_name: campaigns_id 55 | - not_null: 56 | column_name: banners_id 57 | - not_null: 58 | column_name: dates_id 59 | - not_null: 60 | column_name: traffic_id 61 | - not_null: 62 | column_name: sites_id 63 | - relationships: 64 | to: ref('stg_general_accounts') 65 | column_name: account_id 66 | field: account_id 67 | - relationships: 68 | to: ref('stg_general_dates') 69 | column_name: dates_id 70 | field: id 71 | - relationships: 72 | to: ref('stg_general_traffic') 73 | column_name: traffic_id 74 | field: id 75 | - relationships: 76 | to: ref('stg_general_sites') 77 | column_name: sites_id 78 | field: id 79 | - relationships: 80 | to: ref('stg_mt_campaigns') 81 | column_name: campaigns_id 82 | field: id 83 | - relationships: 84 | to: ref('stg_mt_banners') 85 | column_name: banners_id 86 | field: id -------------------------------------------------------------------------------- /models/staging/mytarget/stg_mt_banners.sql: -------------------------------------------------------------------------------- 1 | select 2 | 3 | id 4 | , account_id 5 | , banner_id 6 | , title 7 | , text_content 8 | , other_content 9 | , system_status 10 | , status 11 | , moderation_status 12 | , moderation_reason 13 | , phone 14 | , url 15 | , urls 16 | 17 | from {{ source('mytarget', 'banners') }} 18 | 19 | {{ source_filter_rows( 20 | account_id=var('account_id_mytarget') 21 | ) }} -------------------------------------------------------------------------------- /models/staging/mytarget/stg_mt_banners_facts.sql: -------------------------------------------------------------------------------- 1 | select 2 | 3 | {{ dbt_utils.surrogate_key(["account_id", 4 | "campaigns_id", 5 | "banners_id", 6 | "dates_id", 7 | "traffic_id", 8 | "sites_id"]) 9 | }} as id 10 | , f.account_id as account_id 11 | , f.dates_id as dates_id 12 | , f.campaigns_id as campaigns_id 13 | , f.banners_id as banners_id 14 | , f.traffic_id as traffic_id 15 | , f.sites_id as sites_id 16 | , f.impressions as impressions 17 | , f.clicks as clicks 18 | , f.cost as cost 19 | , gd.dt as dt 20 | , gd.ts as ts 21 | 22 | from {{ source('mytarget', 'banners_facts') }} as f 23 | inner join {{ ref('stg_general_dates') }} as gd 24 | on gd.id = f.dates_id 25 | 26 | {{ source_filter_rows( 27 | account_id=var('account_id_mytarget') 28 | ) }} -------------------------------------------------------------------------------- /models/staging/mytarget/stg_mt_campaigns.sql: -------------------------------------------------------------------------------- 1 | select 2 | 3 | id 4 | , account_id 5 | , campaign_id 6 | , name 7 | , system_status 8 | , status 9 | , autobidding 10 | , mixing 11 | , age_restrictions 12 | , group_members 13 | , extended_age 14 | , enable_utm 15 | , utm 16 | 17 | from {{ source('mytarget', 'campaigns') }} 18 | 19 | {{ source_filter_rows( 20 | account_id=var('account_id_mytarget') 21 | ) }} -------------------------------------------------------------------------------- /models/staging/mytarget/stg_mt_campaigns_facts.sql: -------------------------------------------------------------------------------- 1 | select 2 | 3 | {{ dbt_utils.surrogate_key(["account_id", 4 | "campaigns_id", 5 | "dates_id"]) 6 | }} as id 7 | , f.account_id as account_id 8 | , f.dates_id as dates_id 9 | , f.campaigns_id as campaigns_id 10 | , f.impressions as impressions 11 | , f.clicks as clicks 12 | , f.cost as cost 13 | , gd.dt as dt 14 | , gd.ts as ts 15 | 16 | from {{ source('mytarget', 'campaigns_facts') }} as f 17 | inner join {{ ref('stg_general_dates') }} as gd 18 | on gd.id = f.dates_id 19 | 20 | {{ source_filter_rows( 21 | account_id=var('account_id_mytarget') 22 | ) }} -------------------------------------------------------------------------------- /models/staging/vkontakte/stg_vkontakte_ads.sql: -------------------------------------------------------------------------------- 1 | select 2 | 3 | id 4 | , account_id 5 | , ad_id 6 | , name 7 | , status 8 | , cost_type 9 | , ad_platform 10 | , approved 11 | , video 12 | , title 13 | , description 14 | , link_url 15 | , link_domain 16 | , image_src 17 | , ad_format 18 | , impressions_limit 19 | , impressions_limited 20 | , original_url 21 | , post_content 22 | 23 | from {{ source('vkontakte', 'ads') }} 24 | 25 | {{ source_filter_rows( 26 | account_id=var('account_id_vkontakte') 27 | ) }} -------------------------------------------------------------------------------- /models/staging/vkontakte/stg_vkontakte_ads_facts.sql: -------------------------------------------------------------------------------- 1 | select 2 | 3 | id 4 | , account_id 5 | , dates_id 6 | , campaigns_id 7 | , ads_id 8 | , traffic_id 9 | , all_limit 10 | , impressions 11 | , clicks 12 | , reach 13 | , video_views 14 | , video_views_half 15 | , video_views_full 16 | , video_clicks_site 17 | , join_rate 18 | , cost 19 | , sites_id 20 | , conversion_count 21 | , conversion_sum 22 | , cost_per_message 23 | , message_sends 24 | , gd.dt as dt 25 | , gd.ts as ts 26 | 27 | from {{ source('vkontakte', 'ads_facts') }} as f 28 | inner join {{ ref('stg_general_dates') }} as gd 29 | on gd.id = f.dates_id 30 | 31 | {{ source_filter_rows( 32 | account_id=var('account_id_vkontakte') 33 | ) }} -------------------------------------------------------------------------------- /models/staging/vkontakte/stg_vkontakte_campaigns.sql: -------------------------------------------------------------------------------- 1 | select 2 | 3 | id 4 | , account_id 5 | , campaign_id 6 | , name 7 | , status 8 | 9 | from {{ source('vkontakte', 'campaigns') }} 10 | 11 | {{ source_filter_rows( 12 | account_id=var('account_id_vkontakte') 13 | ) }} -------------------------------------------------------------------------------- /models/staging/vkontakte/stg_vkontakte_campaigns_facts.sql: -------------------------------------------------------------------------------- 1 | select 2 | 3 | id 4 | , account_id 5 | , dates_id 6 | , campaigns_id 7 | , day_limit 8 | , all_limit 9 | , clicks 10 | , impressions 11 | , join_rate 12 | , cost 13 | 14 | from {{ source('vkontakte', 'campaigns_facts') }} as f 15 | inner join {{ ref('stg_general_dates') }} as gd 16 | on gd.id = f.dates_id 17 | 18 | {{ source_filter_rows( 19 | account_id=var('account_id_vkontakte') 20 | ) }} -------------------------------------------------------------------------------- /models/staging/vkontakte/stg_vkontakte_groups.sql: -------------------------------------------------------------------------------- 1 | select 2 | 3 | id 4 | , account_id 5 | , group_id 6 | , name 7 | , screen_name 8 | , description 9 | , group_type 10 | , activity 11 | , age_limits 12 | , site 13 | , photo_50 14 | , photo_100 15 | , photo_200 16 | , is_closed 17 | , verified 18 | 19 | from {{ source('vkontakte', 'groups') }} 20 | 21 | {{ source_filter_rows( 22 | account_id=var('account_id_vkontakte') 23 | ) }} -------------------------------------------------------------------------------- /models/staging/vkontakte/stg_vkontakte_groups_facts.sql: -------------------------------------------------------------------------------- 1 | select 2 | 3 | id 4 | , account_id 5 | , dates_id 6 | , groups_id 7 | , views 8 | , visitors 9 | , reach 10 | , reach_subscribers 11 | , subscribed 12 | , unsubscribed 13 | 14 | from {{ source('vkontakte', 'groups_facts') }} as f 15 | inner join {{ ref('stg_general_dates') }} as gd 16 | on gd.id = f.dates_id 17 | 18 | {{ source_filter_rows( 19 | account_id=var('account_id_vkontakte') 20 | ) }} -------------------------------------------------------------------------------- /models/staging/vkontakte/stg_vkontakte_members.sql: -------------------------------------------------------------------------------- 1 | select 2 | 3 | id 4 | , account_id 5 | , member_id 6 | , first_name 7 | , last_name 8 | , bdate 9 | , sex 10 | , [domain] 11 | , deactivated 12 | , status 13 | , photo_50 14 | , photo_100 15 | , photo_200 16 | , site 17 | , skype 18 | , facebook 19 | , facebook_name 20 | , instagram 21 | , twitter 22 | , has_mobile 23 | , mobile_phone 24 | , home_phone 25 | , can_post 26 | , can_see_all_posts 27 | , can_see_audio 28 | , can_write_private 29 | 30 | from {{ source('vkontakte', 'members') }} 31 | 32 | {{ source_filter_rows( 33 | account_id=var('account_id_vkontakte') 34 | ) }} -------------------------------------------------------------------------------- /models/staging/vkontakte/stg_vkontakte_members_facts.sql: -------------------------------------------------------------------------------- 1 | select 2 | 3 | id 4 | , account_id 5 | , members_id 6 | , locations_id 7 | , groups_id 8 | 9 | from {{ source('vkontakte', 'members_facts') }} 10 | 11 | {{ source_filter_rows( 12 | account_id=var('account_id_vkontakte') 13 | ) }} -------------------------------------------------------------------------------- /models/staging/vkontakte/stg_vkontakte_posts.sql: -------------------------------------------------------------------------------- 1 | select 2 | 3 | id 4 | , account_id 5 | , post_id 6 | , post_type 7 | , marked_as_ads 8 | , can_delete 9 | , can_pin 10 | , content 11 | , group_id 12 | 13 | from {{ source('vkontakte', 'posts') }} 14 | 15 | {{ source_filter_rows( 16 | account_id=var('account_id_vkontakte') 17 | ) }} -------------------------------------------------------------------------------- /models/staging/vkontakte/stg_vkontakte_posts_facts.sql: -------------------------------------------------------------------------------- 1 | select 2 | 3 | id 4 | , account_id 5 | , dates_id 6 | , groups_id 7 | , posts_id 8 | , views 9 | , comments 10 | , reposts 11 | , likes 12 | 13 | from {{ source('vkontakte', 'posts_facts') }} as f 14 | inner join {{ ref('stg_general_dates') }} as gd 15 | on gd.id = f.dates_id 16 | 17 | {{ source_filter_rows( 18 | account_id=var('account_id_vkontakte') 19 | ) }} -------------------------------------------------------------------------------- /packages.yml: -------------------------------------------------------------------------------- 1 | packages: 2 | - package: dbt-labs/dbt_utils 3 | version: [">=0.9.0", "<1.0.0"] 4 | -------------------------------------------------------------------------------- /snapshots/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kzzzr/mybi-dbt-core/1bfb6b02352e676ccbf203f643a050c9c2da8dd6/snapshots/.gitkeep -------------------------------------------------------------------------------- /tests/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kzzzr/mybi-dbt-core/1bfb6b02352e676ccbf203f643a050c9c2da8dd6/tests/.gitkeep --------------------------------------------------------------------------------