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:
| Get-ChildItem -Path 'C:\Your\Directory\Here\' -Filter '*old*' | Rename-Item -NewName { $_.name -replace 'old','new' } | 
| # 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
| ''' | |
| https://habr.com/ru/post/349860/ | |
| Функция Её смысл | |
| re.search(pattern, string) Найти в строке string первую строчку, подходящую под шаблон pattern; | |
| re.fullmatch(pattern, string) Проверить, подходит ли строка string под шаблон pattern; | |
| re.split(pattern, string, maxsplit=0) Аналог str.split(), только разделение происходит по подстрокам, подходящим под шаблон pattern; | |
| re.findall(pattern, string) Найти в строке string все непересекающиеся шаблоны pattern; | |
| re.finditer(pattern, string) Итератор всем непересекающимся шаблонам pattern в строке string (выдаются match-объекты); | |
| re.sub(pattern, repl, string, count=0) Заменить в строке string все непересекающиеся шаблоны pattern на repl; | 
| def transform_xls_to_csv(path, dir_src, dir_res, replace=False): | |
| ''' | |
| transform xls xlsb files to csv | |
| :param path: of file | |
| :param dir_src: directory of sourth file | |
| :param dir_res: directory to save new file | |
| :param replace: replace file if it exists | |
| :return: nothing | |
| ''' | 
| select * | |
| from tab | |
| order by NewID() | 
| # Default ignored files | |
| /shelf/ | |
| /workspace.xml | 
| 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 и не меняем путь предложенный редактором |