This file contains 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
from distutils.debug import DEBUG | |
from pickle import TRUE | |
import json | |
import os | |
import collections | |
from collections import defaultdict | |
DEBUG = TRUE | |
dict_1 = {'John': 15, 'Rick': {10,15}, 'Misa': 12} |
This file contains 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
from dagster import job, op, get_dagster_logger | |
import json | |
from pickle import TRUE | |
from dagster_celery import celery_executor | |
import os | |
import collections | |
from collections import defaultdict | |
# manifest.json catalog.json | |
@op |
This file contains 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
from dagster import job, op, get_dagster_logger | |
import json | |
from pickle import TRUE | |
from dagster_celery import celery_executor | |
import os | |
import collections | |
from collections import defaultdict | |
# manifest.json catalog.json | |
@op |
This file contains 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
from distutils.debug import DEBUG | |
from pickle import TRUE | |
import requests | |
import json | |
import os | |
import collections | |
from collections import defaultdict | |
DEBUG = TRUE |
This file contains 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
import requests | |
from dagster import job, op, get_dagster_logger | |
import json | |
from dagster_celery import celery_executor | |
import os | |
@op | |
# def docs_merge_op(context): | |
def docs_merge_op(): | |
import pathlib |
This file contains 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
{{ config( | |
materialized='incremental' | |
, as_columnstore=false | |
, pre_hook=""" | |
{% if is_incremental() %} | |
delete from {{this}} | |
where Период >= {{ CurrentDay() }} | |
{% endif %} | |
""" |
This file contains 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
{"logs": [{"code": "A001", "data": {"v": "=1.0.0"}, "invocation_id": "2ce3fa58-066a-4907-8580-c3efe5814663", "level": "info", "log_version": 1, "msg": "Running with dbt=1.0.0", "node_info": {}, "pid": 452, "thread_name": "MainThread", "ts": "2022-03-31T09:31:48.578486Z", "type": "log_line"}, {"code": "W006", "data": {"stat_line": "5 models, 0 tests, 0 snapshots, 0 analyses, 169 macros, 0 operations, 0 seed files, 5 sources, 0 exposures, 0 metrics"}, "invocation_id": "2ce3fa58-066a-4907-8580-c3efe5814663", "level": "info", "log_version": 1, "msg": "Found 5 models, 0 tests, 0 snapshots, 0 analyses, 169 macros, 0 operations, 0 seed files, 5 sources, 0 exposures, 0 metrics", "node_info": {}, "pid": 452, "thread_name": "MainThread", "ts": "2022-03-31T09:31:48.780776Z", "type": "log_line"}, {"code": "Q026", "data": {"num_threads": 20, "target_name": "prod"}, "invocation_id": "2ce3fa58-066a-4907-8580-c3efe5814663", "level": "info", "log_version": 1, "msg": "Concurrency: 20 threads (target='prod')", "node_info": {}, |
This file contains 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 | |
{{ BinaryToVarhar( "Ссылка" ) }} as "Ссылка", | |
{{ BinaryToVarhar( "ПометкаУдаления" ) }} as "ПометкаУдаления", | |
{{ BinaryToVarhar( "Родитель" ) }} as "Родитель", | |
{{ BinaryToVarhar( "ЭтоГруппа" ) }} as "ЭтоГруппа", | |
"Код" , | |
"Наименование" , | |
"IDWeb" , | |
{{ BinaryToVarhar( "VIP_Ремонт" ) }} as "VIP_Ремонт" , |
This file contains 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
with client as | |
( | |
select p."ссылка" as "ссылка" | |
,p."код" as "код" | |
,p."наименование" as "клиент", | |
{{ client_fields( 'select distinct p."наименование" from ml."dm_покупатели" p', | |
'клиент',"клиент_" ,'str') }} | |
,if(p."пол"='М', 'М', '') as "полмужской" | |
,if(p."пол"='Ж', 'Ж', '') as "полженский" |
This file contains 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
with client as | |
( | |
select p."ссылка" as "ссылка" | |
,p."код" as "код" | |
,p."наименование" as "клиент" | |
,if(p."пол"='М', 'М', '') as "полмужской" | |
,if(p."пол"='Ж', 'Ж', '') as "полженский" | |
,dimM."наименование" as "размеробувим_группа" , | |
{{ client_fields( 'select distinct dimM."наименование" from ml."dm_покупатели" p |