yc managed-clickhouse cluster help
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 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 - год |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Замените на свой API-ключ из личного кабинета (https://dadata.ru/profile/#info) | |
| var API_KEY = "ВАШ_API_КЛЮЧ"; | |
| /*** | |
| /* Не меняйте код ниже этой строчки | |
| ***/ | |
| var FORMATTERS = { | |
| address: formatAddress, | |
| fio: formatFio, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 и не меняем путь предложенный редактором |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Default ignored files | |
| /shelf/ | |
| /workspace.xml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| select * | |
| from tab | |
| order by NewID() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | |
| ''' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ''' | |
| 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; |
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:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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 |
OlderNewer