Data Warehouse Analyst – Analytics Engineer @ OTUS.ru
0. Fork demo repo: https://github.com/kzzzr/dbtvault_greenplum_demo
Follow instructions in data_vault_tutorial.md step by step.
Add README.md with answers to the following questions:
| # Step 1: Create a CalendarGenerator() function and paste the contents below into the Advanced Editor | |
| let CreateDateTable = (StartDate as date, EndDate as date, optional Culture as nullable text) as table => | |
| let | |
| DayCount = Duration.Days(Duration.From(EndDate - StartDate)), | |
| Source = List.Dates(StartDate,DayCount,#duration(1,0,0,0)), | |
| TableFromList = Table.FromList(Source, Splitter.SplitByNothing()), | |
| ChangedType = Table.TransformColumnTypes(TableFromList,{{"Column1", type date}}), | |
| RenamedColumns = Table.RenameColumns(ChangedType,{{"Column1", "Date"}}), | |
| InsertYear = Table.AddColumn(RenamedColumns, "Year", each Date.Year([Date])), | |
| InsertQuarter = Table.AddColumn(InsertYear, "Quarter Number", each Date.QuarterOfYear([Date])), |
| # install dbt: https://docs.getdbt.com/dbt-cli/installation | |
| pip install dbt==0.19.0 | |
| # clone repo | |
| git clone https://github.com/dbt-labs/jaffle_shop | |
| # create ~/.dbt/profiles.yml | |
| # ensure profile setup | |
| dbt debug |
Data Warehouse Analyst – Analytics Engineer @ OTUS.ru
Follow instructions in data_vault_tutorial.md step by step.
Add README.md with answers to the following questions:
yc managed-clickhouse cluster help
| 1. Открываем Sublime Text -> Tools -> Build System -> New Build System | |
| 2. Вставляем в открывшийся файл следующие строки, чтобы получилось вот так: | |
| { | |
| "cmd": ["python3", "-i", "-u", "$file"], | |
| "file_regex": "^[ ]File \"(...?)\", line ([0-9]*)", | |
| "selector": "source.python" | |
| } | |
| 3. Сохраняем файл с названием python3.sublime-build и не меняем путь предложенный редактором |
| // Замените на свой API-ключ из личного кабинета (https://dadata.ru/profile/#info) | |
| var API_KEY = "ВАШ_API_КЛЮЧ"; | |
| /*** | |
| /* Не меняйте код ниже этой строчки | |
| ***/ | |
| var FORMATTERS = { | |
| address: formatAddress, | |
| fio: formatFio, |
| // killerDateTableRu | |
| // функция killerDateTableRu создает таблицу с датами. Дополняет ее различными полезными для Time Intelligence столбцами. | |
| // В случае, если четвертый аргумент принимает Дни 1, то функция добавляет столбец с выходными. | |
| // Оригинальная идея philbritton https://gist.github.com/philbritton/9677152 | |
| // пример: killerDateTableRu(#date(2017, 2, 1), #date(2017, 2, 4), "RU-ru", 1) | |
| // Описание полей результирующей таблицы: | |
| // =================================================== | |
| // Date - дата | |
| // Year - год |