Skip to content

Commit

Permalink
hw_mukhin
Browse files Browse the repository at this point in the history
  • Loading branch information
M1083 committed Jan 27, 2024
1 parent f1b466f commit eee6176
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .env.template
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
CLICKHOUSE_USER=admin1
CLICKHOUSE_USER=admin
TF_VAR_clickhouse_password=clickhouse
5 changes: 5 additions & 0 deletions models/marts/f_lineorder_flat.sql
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
)
}}


with f_lo_f as (
SELECT

L_ITEMKEY
Expand Down Expand Up @@ -68,3 +70,6 @@ FROM {{ ref('stg_lineitem') }} AS l
INNER JOIN {{ ref('stg_customer') }} AS c ON c.C_CUSTKEY = o.O_CUSTKEY
INNER JOIN {{ ref('stg_supplier') }} AS s ON s.S_SUPPKEY = l.L_SUPPKEY
INNER JOIN {{ ref('stg_part') }} AS p ON p.P_PARTKEY = l.L_PARTKEY
)
SELECT *
from f_lo_f
6 changes: 6 additions & 0 deletions models/marts/f_orders_stats.sql
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
)
}}


with f_o_s AS
(
SELECT
toYear(O_ORDERDATE) AS O_ORDERYEAR
, O_ORDERSTATUS
Expand All @@ -20,3 +23,6 @@ GROUP BY
toYear(O_ORDERDATE)
, O_ORDERSTATUS
, O_ORDERPRIORITY
)
SELECT *
from f_o_s
15 changes: 8 additions & 7 deletions profiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@ clickhouse_starschema:
host: "{{ env_var('DBT_HOST') }}"
port: 8443
user: admin #"{{ env_var('DBT_USER') }}"
password: clickhouse #clickhouse #"{{ env_var('DBT_PASSWORD') }}"
password: clickhouse
#clickhouse #"{{ env_var('DBT_PASSWORD') }}"
secure: True
verify: False
# socket_timeout: 300000
ci:
type: clickhouse
host: clickhouse
port: 8123
schema: default
threads: 4
# ci:
# type: clickhouse
# host: clickhouse
# port: 8123
# schema: default
# threads: 4
target: dev

0 comments on commit eee6176

Please sign in to comment.