Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
AppTag
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dataplatform
AppTag
Commits
f8bb2a3d
Commit
f8bb2a3d
authored
6 years ago
by
wangjf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
d5734c95
master
No related merge requests found
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
mysql2hive.sh
azkaban/mysql2hive.sh
+3
-1
No files found.
azkaban/mysql2hive.sh
View file @
f8bb2a3d
...
...
@@ -15,7 +15,8 @@ sqoop import "-Dorg.apache.sqoop.splitter.allow_text_splitter=true" --connect jd
base_dir
=
"s3://mob-emr-test/dataplatform/DataWareHouse/data/dwh/dim_package_tags"
sql
=
"INSERT OVERWRITE DIRECTORY '
${
base_dir
}
/
${
date_path
}
'
SELECT a.package_name,a.platform,b.tag_type,b.first_tag,b.second_tag,b.comment_cn
SELECT DISTINCT * FROM
(SELECT a.package_name,a.platform,b.tag_type,b.first_tag,b.second_tag,b.comment_cn
FROM (SELECT package_name,lower(platform) platform,feat_id
FROM dev.app_tag
LATERAL VIEW EXPLODE(SPLIT(REGEXP_REPLACE(REGEXP_REPLACE(SUBSTRING(category,2,LENGTH(category) - 2),'
\"
',''),' ',''),',')) featTable AS feat_id) a
...
...
@@ -23,6 +24,7 @@ sql="INSERT OVERWRITE DIRECTORY '${base_dir}/${date_path}'
UNION ALL
SELECT package_name,platform,tag_type,first_tag,second_tag,comment
FROM dwh.dim_package_tags
) package_tags
"
hive
-e
"
${
sql
}
"
...
...
This diff is collapsed.
Click to expand it.
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