Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tkdm
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etl
tkdm
Commits
94e57869
Commit
94e57869
authored
Mar 06, 2017
by
mengdongxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update tkdm_data_payment_detial_day.sql
parent
7070f85e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
tkdm_data_payment_detial_day.sql
tkdm_data_payment_detial_day.sql
+7
-7
No files found.
tkdm_data_payment_detial_day.sql
View file @
94e57869
set
hive
.
input
.
format
=
org
.
apache
.
hadoop
.
hive
.
ql
.
io
.
CombineHiveInputFormat
;
set
mapred
.
min
.
split
.
size
.
per
.
rack
=
100000000
;
set
mapred
.
min
.
split
.
size
.
per
.
node
=
100000000
;
...
...
@@ -6,24 +5,24 @@ set mapred.max.split.size=256000000;
set
hive
.
merge
.
mapfiles
=
true
;
set
hive
.
merge
.
smallfiles
.
avgsize
=
16000000
;
insert
overwrite
table
tkdm
.
tkdm_data_payment_detial_day
partition
(
ds
=
'2017-02-2
4
'
)
insert
overwrite
table
tkdm
.
tkdm_data_payment_detial_day
partition
(
ds
=
'2017-02-2
5
'
)
select
appid
,
deviceid
,
i
f
(
to_date
(
'ins_datetime'
)
=
'2017-02-03'
,
1
,
0
)
as
is_new
,
i
ns_datetime
,
count
(
1
)
as
num_payment_cnt
,
round
(
sum
(
amount
),
2
)
as
amt_payment
from
tkio
.
tkio_mid_pay_day
where
ds
=
'2017-02-2
4
'
and
where
ds
=
'2017-02-2
5
'
and
deviceid
!=
'00000000-0000-0000-0000-000000000000'
and
deviceid
!=
''
and
deviceid
!=
'0'
group
by
appid
,
deviceid
group
by
appid
,
deviceid
,
ins_datetime
distribute
by
appid
,
deviceid
create
EXTERNAL
table
tkdm_data_payment_detial_day
(
appid
string
,
deviceid
string
,
i
s_new
int
,
i
ns_datetime
string
,
num_payment_cnt
int
,
amt_payment
double
)
...
...
@@ -33,4 +32,4 @@ ROW FORMAT DELIMITED
FIELDS
TERMINATED
BY
'
\t
'
STORED
AS
ORC
location
's3://reyuntkio/warehouse/tkio/tkdm.db/tkdm_data_payment_detial_day'
;
;
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment