Skip to content

Instantly share code, notes, and snippets.

{{ config(
materialized='incremental',
as_columnstore=false,
pre_hook=""" {% if is_incremental() %}
delete from {{this}}
where Период >= {{ CurrentDay() }}
{% endif %}
"""
, post_hook = "{% if is_incremental() == false %}
{{ create_nonclustered_index( ['Товар']) }}
{{ config(
as_columnstore=false
, post_hook=["
{{ create_nonclustered_index( ['Товар']) }}
{{ create_nonclustered_index( ['СкладКуда']) }}
{{ create_nonclustered_index( ['СкладОткуда']) }}
"]
)
}}
{{ config(
as_columnstore=false,
post_hook=["
{{ create_nonclustered_index( ['Товар']) }}
{{ create_nonclustered_index( ['Склад']) }}
{{ create_nonclustered_index( ['Период']) }}
{{ create_nonclustered_index( ['Регистратор','Товар']) }}
"]
)
}}
{{ config(
as_columnstore=false
, post_hook=["
{{ create_nonclustered_index( ['Товар']) }}
{{ create_nonclustered_index( ['СкладКуда']) }}
{{ create_nonclustered_index( ['СкладОткуда']) }}
"]
)
}}
select customer_id,
redeem_percentage,
redeem_amount,
cancelled_orders_amount,
ordered_basic_goods_qty
from clickhouse.cifra.ct_privilege_cards__calculated_indicators
WHERE NOT EXISTS
(SELECT dbt_statuses."покупатель",
модель dm
{{ config(
as_columnstore=false,
post_hook=["
{{ create_clustered_index(columns = ['Период']) }}
{{ create_nonclustered_index(columns = ['Покупатель']) }}
"]
select indi.customer_id
from clickhouse.cifra.ct_privilege_cards__calculated_indicators as indi
WHERE NOT EXISTS
(SELECT dbt_statuses."покупатель"
from cifratest.dbt_stage."dm_stage_регистрсведений_статусыкартprivilege" as dbt_statuses
where indi.customer_id = dbt_statuses."покупатель"
and indi.redeem_percentage = dbt_statuses."процентвыкупа"
and indi.redeem_amount = dbt_statuses."суммавыкупа"
#single node install config
coordinator=true
http-server.http.port=8080
#JVM -Xmx20g
node-scheduler.include-coordinator=false
query.max-memory=32GB
discovery.uri=http://localhost:8080
Ошибка
#single node install config
coordinator=true
http-server.http.port=8080
#JVM -Xmx20g
node-scheduler.include-coordinator=true
#query.max-memory-per-node=5GB # jvm*0.25 #Invalid value
#memory.heap-headroom-per-node=5GB #jvm*0.2 #Invalid value
#query.max-total-memory-per-node=5GB # jvm*0.4 #can not be configured
query.max-memory=32GB
discovery.uri=http://localhost:8080
version: '3.8'
services:
dagster-postgres:
image: postgres:14.1
container_name: dagster-postgres
ports:
- 5432:5432
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password