Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
bi-report
Project
Project
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
data
bi-report
Commits
f8193869
Commit
f8193869
authored
Jun 22, 2020
by
赵建伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update codes
parent
71f4bab0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
hive.sh
lib/shell/hive.sh
+5
-5
No files found.
lib/shell/hive.sh
View file @
f8193869
#!/bin/bash
# 定义变量方便修改
hive
=
/opt/hive/hive-1.1.0-cdh5.16.1/bin/beeline
hive
=
"/opt/spark/spark-2.4.5-bin-hadoop2.7/bin/beeline -u jdbc:hive2://bj-gm-prod-cos-datacenter003:10010/online -n data"
# 如果是输入的日期按照取输入日期;如果没输入日期取当前时间的前一天
if
[
-n
$1
]
;
then
partition_day
=
$1
if
[
-n
"
$1
"
]
;
then
partition_day
=
$1
else
partition_day
=
`
date
--date
=
"
$V_PARYMD
-1 day"
+%Y%m%d
`
partition_day
=
`
date
--date
=
"
-1 day"
+%Y%m%d
`
fi
sql
=
"
...
...
@@ -236,7 +236,7 @@ FROM
FROM online.bl_hdfs_maidian_updates
WHERE partition_date>=regexp_replace(DATE_SUB(current_date,1) ,'-','')
AND partition_date<regexp_replace((current_date),'-','')
AND (get_json_object(params['extra_param'], '
$.
type')='
交
互栏'
AND (get_json_object(params['extra_param'], '
$.
type')='
���
互栏'
or get_json_object(params['extra_param'], '
$.
jump_from')='msg_link')
AND action='on_click_card'
and params['card_content_type']='service'
...
...
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