CORE DWH module for Marketing Analytics is now open sourced and accessible for anyone who might want to try it out.
I have prepared a series of blog posts to cover all the details with explanations and examples.
They will appear in this channel gradually. Stay tuned.
I have prepared a series of blog posts to cover all the details with explanations and examples.
They will appear in this channel gradually. Stay tuned.
Next generation of marketing analytics
I want to leverage the whole power of cloud services and modern data stack: Azure SQL, dbt, Github Actions, Metabase.
Adapt your analytics in ever-changing business environments as well as maintain transparency and predictability to end users.
I want to leverage the whole power of cloud services and modern data stack: Azure SQL, dbt, Github Actions, Metabase.
Adapt your analytics in ever-changing business environments as well as maintain transparency and predictability to end users.
This media is not supported in your browser
VIEW IN TELEGRAM
The whole solution consists of several integral parts.
– Cloud ELT service
– CORE DWH module
– Client DWH deployment
– Data access layer
https://kzzzr.github.io/Building-reliable-product-from-the-start/
– Cloud ELT service
– CORE DWH module
– Client DWH deployment
– Data access layer
https://kzzzr.github.io/Building-reliable-product-from-the-start/
I want to use the best analytics engineering tool on the market – dbt from Fishtown Analytics.
myBI uses Azure SQL as a backend to store collected data in. It requires additional actions and steps to perform:
1. Use official image from Fishtown Analytics with latest dbt version 0.19.1
2. Install dependencies: MS SQL utilities as well as dbt-sqlserver package
3. Configure dbt to use profiles file (connection strings) in the project root directory
https://kzzzr.github.io/CORE-DWH-building-a-common-foundation/
myBI uses Azure SQL as a backend to store collected data in. It requires additional actions and steps to perform:
1. Use official image from Fishtown Analytics with latest dbt version 0.19.1
2. Install dependencies: MS SQL utilities as well as dbt-sqlserver package
3. Configure dbt to use profiles file (connection strings) in the project root directory
https://kzzzr.github.io/CORE-DWH-building-a-common-foundation/
Back from the weekend with a new small post.
Now describing how to configure data sources for dbt project:
https://kzzzr.github.io/Configuring-data-sources-for-dbt/
Now describing how to configure data sources for dbt project:
https://kzzzr.github.io/Configuring-data-sources-for-dbt/
28 апреля в 17.00 говорим о моделировании данных для аналитики и dbt.
Готовлю интересную программу и время для ответов на вопросы.
Зарегистрироваться.
Готовлю интересную программу и время для ответов на вопросы.
Зарегистрироваться.
owox
Transform your data into actionable insights with OWOX BI
Find your growth areas and achieve marketing goals faster with high-quality forecasts and useful insights from OWOX BI.
DWH staging area serves the following key purposes:
- Pointing to source data tables
- Listing available columns
- Generating surrogate keys
- Simple joins are performed
- Rows are filtered
https://kzzzr.github.io/Populating-DWH-staging-area/
- Pointing to source data tables
- Listing available columns
- Generating surrogate keys
- Simple joins are performed
- Rows are filtered
https://kzzzr.github.io/Populating-DWH-staging-area/
Covering models with schema tests:
– Uniqueness of keys
– Not null constraint
– Foreign keys (relationships test)
– Table not empty
There are precisely 335 tests for 56 models which stands for around 600% test coverage.
https://kzzzr.github.io/Covering-models-with-schema-tests/
– Uniqueness of keys
– Not null constraint
– Foreign keys (relationships test)
– Table not empty
There are precisely 335 tests for 56 models which stands for around 600% test coverage.
https://kzzzr.github.io/Covering-models-with-schema-tests/
Слайды с моего сегодняшнего доклада на конференции Power BI Russia
Ключевые тезисы:
– Шаг моделирования данных – необходимость, а не роскошь
– Power BI – отличный инструмент, но иногда его становится недостаточно
– Power BI ограничен в объеме данных
– Неоптимальные обновления и расчеты
– Поддержка большого количества метрик превращается в испытание
– Одновременная работа над PBIX может сломать отчеты
– Version control для отката и восстановления истории изменений
– Импорт готовых проектов и дашбордов для разных клиентов
– Альтернативный BI – рано или поздно Power BI захочется поменять
https://drive.google.com/file/d/1-w4KyLQHZ-jlZ6cbui-nsUKHK1A4g5GV/view?usp=sharing
Ключевые тезисы:
– Шаг моделирования данных – необходимость, а не роскошь
– Power BI – отличный инструмент, но иногда его становится недостаточно
– Power BI ограничен в объеме данных
– Неоптимальные обновления и расчеты
– Поддержка большого количества метрик превращается в испытание
– Одновременная работа над PBIX может сломать отчеты
– Version control для отката и восстановления истории изменений
– Импорт готовых проектов и дашбордов для разных клиентов
– Альтернативный BI – рано или поздно Power BI захочется поменять
https://drive.google.com/file/d/1-w4KyLQHZ-jlZ6cbui-nsUKHK1A4g5GV/view?usp=sharing
pbiconf.ru
Power BI Russia Conf 2021
Конференция по Power BI для бизнеса и для аналитиков
Establishing Integration Tests and CI
I find it pretty hard to build on top of the CORE DWH module if it is not stable enough. Testing of the whole module during every patch and PR and before you can use it ensures quality and reliability. That is where Integration tests and CI come essential.
The workflow is defined like this:
1. Triggered on Pull Requests to master branch.
2. Spins up an already familiar MS SQL Server database in a container as a service.
3. Performs several sequential steps: checking out the code, filling source tables from csv files, running models, testing them, cleaning up.
4. Provides context with environment variables (connections details, target database schema name)
https://kzzzr.github.io/Establishing-integration-tests-and-CI/
I find it pretty hard to build on top of the CORE DWH module if it is not stable enough. Testing of the whole module during every patch and PR and before you can use it ensures quality and reliability. That is where Integration tests and CI come essential.
The workflow is defined like this:
1. Triggered on Pull Requests to master branch.
2. Spins up an already familiar MS SQL Server database in a container as a service.
3. Performs several sequential steps: checking out the code, filling source tables from csv files, running models, testing them, cleaning up.
4. Provides context with environment variables (connections details, target database schema name)
https://kzzzr.github.io/Establishing-integration-tests-and-CI/
Now I would like to pin a specific version of code to a tag and release.
Importing this module becomes as simple as this:
https://kzzzr.github.io/Releasing-CORE-DWH-version/
Importing this module becomes as simple as this:
packages.yml:
packages:
- git: "https://github.com/kzzzr/mybi-dbt-core.git"
revision: 0.2.0
https://kzzzr.github.io/Releasing-CORE-DWH-version/
dbt supercharges SQL with macros
With dbt you can leverage the full power of Jinja templating language in your SQL noscripts. These code blocks are compiled into valid statements before being executed on a target database. Let me show you some useful tricks to use with the CORE DWH module.
You have already seen filter_rows() macro invocation in place of WHERE expression. It is used in every staging model. It helps fetch only relevant account rows and limit the number of rows for development and testing purposes if a table is large enough (especially useful for fact tables – sessions, hits, conversions).
https://kzzzr.github.io/dbt-supercharges-SQL-with-macros/
With dbt you can leverage the full power of Jinja templating language in your SQL noscripts. These code blocks are compiled into valid statements before being executed on a target database. Let me show you some useful tricks to use with the CORE DWH module.
You have already seen filter_rows() macro invocation in place of WHERE expression. It is used in every staging model. It helps fetch only relevant account rows and limit the number of rows for development and testing purposes if a table is large enough (especially useful for fact tables – sessions, hits, conversions).
https://kzzzr.github.io/dbt-supercharges-SQL-with-macros/
Generating concatenate and surrogate keys
Surrogate keys are the central point of any Data Warehouse uniquely identifying rows and connecting facts and dimensions tables. I usually utilize hash functions of source PK columns, which comes from Data Vault 2.0 and gives us consistent results coming from various sources.
But sometimes in case of a compound key you might want to retain readability of the whole concatenated values. This is especially applicable for marketing analytics, where the row key might contain utm_source, utm_medium, utm_campaign, ads_group_id, keyword_id.
https://kzzzr.github.io/Generating-concatenate-and-surrogate-keys/
Surrogate keys are the central point of any Data Warehouse uniquely identifying rows and connecting facts and dimensions tables. I usually utilize hash functions of source PK columns, which comes from Data Vault 2.0 and gives us consistent results coming from various sources.
But sometimes in case of a compound key you might want to retain readability of the whole concatenated values. This is especially applicable for marketing analytics, where the row key might contain utm_source, utm_medium, utm_campaign, ads_group_id, keyword_id.
https://kzzzr.github.io/Generating-concatenate-and-surrogate-keys/
Performing custom ‘not empty’ tests
dbt is shipped with essential schema tests which I covered in one of my previous posts on CORE DWH test suite. There are plenty of additional tests and handy macros shipped with the dbt-utils package, including equal_rowcount, expression_is_true, recency, at_least_one, etc.
But still if you need something special you can easily add it yourself. For me this is signalling if one of my source tables is empty.
https://kzzzr.github.io/Performing-custom-not-empty-tests/
dbt is shipped with essential schema tests which I covered in one of my previous posts on CORE DWH test suite. There are plenty of additional tests and handy macros shipped with the dbt-utils package, including equal_rowcount, expression_is_true, recency, at_least_one, etc.
But still if you need something special you can easily add it yourself. For me this is signalling if one of my source tables is empty.
https://kzzzr.github.io/Performing-custom-not-empty-tests/
Performing set operations UNION, INTERSECT, MINUS with Looker BI tool
The problem:
I would like to list and count all the users who have used product A but never used product B (in a specific period/area/country).
You cannot achieve the desired result by simply slicing this table. One needs a more advanced technique:
- MINUS operation on top of two sets of users:
- Writing a subquery with IN or EXISTS
- Self-joining a fact table
But can I do this with BI tool?
https://kzzzr.github.io/Performing-set-operations-UNION,-INTERSECT,-MINUS-with-Looker-BI-tool/
The problem:
I would like to list and count all the users who have used product A but never used product B (in a specific period/area/country).
You cannot achieve the desired result by simply slicing this table. One needs a more advanced technique:
- MINUS operation on top of two sets of users:
- Writing a subquery with IN or EXISTS
- Self-joining a fact table
But can I do this with BI tool?
https://kzzzr.github.io/Performing-set-operations-UNION,-INTERSECT,-MINUS-with-Looker-BI-tool/
Мастер-класс по Разведочному Анализу Данных – Exploratory Data Analysis – EDA
Kiva - это некоммерческая организация, которая позволяет нуждающимся более чем в 80 странах мира получать финансирование под различного рода проекты и нужды.
Kiva хочет сделать так, чтобы собранные деньги тратились с максимальной пользой. В первую очередь, конечно же, их интересует не дисперсия пожертвований и не еще какие-нибудь статистические показатели, а ощутимые выводы и рекомендации, которые позволят им работать эффективнее и больше понимать специфику потребностей и уровень бедности в разных странах и регионах.
– Проверьте, насколько имеющиеся данные чисты, то есть подвержены выбросам, пропущенным и недействительным значениям
– Ознакомьтесь с датасетом, изучите его базовые характеристики, выявите первоначальные зависимости
– Изучите основные демографические характеристики людей, которые используют Kiva. Из каких они регионов и стран? Какова гендерная характеристика заемщиков?
– Посмотрите, для каких целей людям нужны средства и какие суммы они просят. Изучите сектора экономики, виды деятельности и сделайте выводы о том, как обстоят дела в каждом из них.
– Немаловажным является еще один вопрос: как долго заемщикам приходится ждать полного финансирования заявки? Известно, что некоторые люди на платформе просят ссуды на неотложные нужды.
– Попробуйте изучить природу зависимости времени, требуемого на погашение ссуды и суммы кредита. Возможно, это поможет лучше узнать, сколько люди в конкретных регионах могут себе позволить выплачивать на самые важные нужды.
– Сформулируйте основные выводы и визуальные материалы, подкрепляющие их.
Kiva - это некоммерческая организация, которая позволяет нуждающимся более чем в 80 странах мира получать финансирование под различного рода проекты и нужды.
Kiva хочет сделать так, чтобы собранные деньги тратились с максимальной пользой. В первую очередь, конечно же, их интересует не дисперсия пожертвований и не еще какие-нибудь статистические показатели, а ощутимые выводы и рекомендации, которые позволят им работать эффективнее и больше понимать специфику потребностей и уровень бедности в разных странах и регионах.
– Проверьте, насколько имеющиеся данные чисты, то есть подвержены выбросам, пропущенным и недействительным значениям
– Ознакомьтесь с датасетом, изучите его базовые характеристики, выявите первоначальные зависимости
– Изучите основные демографические характеристики людей, которые используют Kiva. Из каких они регионов и стран? Какова гендерная характеристика заемщиков?
– Посмотрите, для каких целей людям нужны средства и какие суммы они просят. Изучите сектора экономики, виды деятельности и сделайте выводы о том, как обстоят дела в каждом из них.
– Немаловажным является еще один вопрос: как долго заемщикам приходится ждать полного финансирования заявки? Известно, что некоторые люди на платформе просят ссуды на неотложные нужды.
– Попробуйте изучить природу зависимости времени, требуемого на погашение ссуды и суммы кредита. Возможно, это поможет лучше узнать, сколько люди в конкретных регионах могут себе позволить выплачивать на самые важные нужды.
– Сформулируйте основные выводы и визуальные материалы, подкрепляющие их.
Запись мастер-класса доступна, конечно, в рамках курса Skillbox, но Jupyter-ноутбук с пояснениями на русском языке в наличии для самостоятельного изучения и экспериментов.
https://github.com/kzzzr/skillbox-kiva
https://github.com/kzzzr/skillbox-kiva
Подготовил интереснейшее задание для Datathon по DWH / Analytics Engineering:
Сквозная аналитика и практики data-driven для e-Commerce
Пользуйтесь шансом влиться в движение, пообщаться, попрактиковаться на кейсе, приближенном к реальности.
В качестве призов – бесплатное участие в курсе Data Engineer или Analytics Engineer (новый!) на выбор.
Сквозная аналитика и практики data-driven для e-Commerce
Пользуйтесь шансом влиться в движение, пообщаться, попрактиковаться на кейсе, приближенном к реальности.
В качестве призов – бесплатное участие в курсе Data Engineer или Analytics Engineer (новый!) на выбор.