Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wanjia
Project
Project
Details
Activity
Releases
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
kino
wanjia
Commits
7e34eec0
Commit
7e34eec0
authored
4 years ago
by
kinomin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
初始化项目
parent
879c50e3
Pipeline
#290
failed with stages
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
6 deletions
+2
-6
dependencies.py
spark/dependencies.py
+2
-6
No files found.
spark/dependencies.py
View file @
7e34eec0
...
...
@@ -57,13 +57,9 @@ def md5(col):
md5
.
update
(
str
(
col
)
.
encode
(
'utf-8'
))
return
md5
.
hexdigest
()
# 脱敏
id
=
sys
.
argv
[
1
]
output_file
=
sys
.
argv
[
2
]
if
__name__
==
'__main__'
:
# 拿到 列名 等
record
=
getRecordByIdResultT1
(
id
)
record
=
getRecordByIdResultT1
(
sys
.
argv
[
1
]
)
col
=
json
.
loads
(
str
(
record
)[
2
:
-
3
])
.
get
(
'col'
)
sql
=
getColumns
(
str
(
record
)[
2
:
-
3
])
print
(
sql
)
...
...
@@ -73,7 +69,7 @@ if __name__ == '__main__':
spark
.
udf
.
register
(
'md5'
,
md5
,
StringType
())
print
(
'=======>'
,
output_file
)
df
=
spark
.
read
.
format
(
'csv'
)
.
option
(
'inferSchema'
,
'true'
)
.
load
(
output_file
)
.
toDF
(
*
col
)
df
=
spark
.
read
.
format
(
'csv'
)
.
option
(
'inferSchema'
,
'true'
)
.
load
(
sys
.
argv
[
2
]
)
.
toDF
(
*
col
)
df
.
count
t_table
=
df
.
createTempView
(
'kino'
)
sinkDF
=
spark
.
sql
(
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