Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
techvaquero authored Sep 6, 2023
1 parent 7ecea79 commit ed50a4c
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 0 deletions.
25 changes: 25 additions & 0 deletions models/redshift/customer.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

{{
config(
materialized = 'table'
)
}}


select
convet(string, c_custkey) as stringkey,
c_name,
c_address,
c_nationkey,
c_phone,
dlog10(c_acctbal) as actbalbaseten,
c_mktsegment,
c_comment,
getdate() as hoy




from
redshift_sample_data.tpch_rs1.customer

24 changes: 24 additions & 0 deletions models/snow/customer.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@

{{
config(
materialized = 'table'
)
}}


select
zeroifnull(c_custkey) as intkey,
contains(c_name,'customer') as namecontains,
c_address,
c_nationkey,
c_phone,
to_number(c_acctbal, 10, 5) as cleanacctbal,
c_mktsegment,
c_comment




from
snowflake_sample_data.tpch_sf1.customer

30 changes: 30 additions & 0 deletions models/snow/lineitem.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@

{{
config(
materialized = 'table'
)
}}


select
l_orderkey,
l_partkey,
l_suppkey,
l_linenumber,
l_quantity,
l_extendedprice,
l_discount,
l_tax,
l_returnflag,
l_linestatus,
timestampadd('year', 2, l_shipdate) as shipadd,
timestampdiff('day',l_receiptdate, l_shipdate) as receiptdiff,
dayname(l_commitdate) as daycommit,
l_shipinstruct,
l_shipmode,
l_comment


from
snowflake_sample_data.tpch_sf1.lineitem

0 comments on commit ed50a4c

Please sign in to comment.