Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
ffm-baseline
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ML
ffm-baseline
Commits
b9918369
Commit
b9918369
authored
May 15, 2020
by
赵威
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
try sql
parent
be43f2a2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
tag3_update_user_portrait_offline.py
eda/smart_rank/tag3_update_user_portrait_offline.py
+8
-8
No files found.
eda/smart_rank/tag3_update_user_portrait_offline.py
View file @
b9918369
...
...
@@ -107,14 +107,14 @@ def update_tag3_user_portrait(cl_id):
def
consume_kafka
():
#
sql = "select distinct cl_id from kafka_tag3_log where log_time > UNIX_TIMESTAMP(DATE_SUB(NOW(), INTERVAL 30 day))"
#
db, cursor = get_jerry_test()
#
cursor.execute(sql)
#
device_ids_lst = [i[0] for i in cursor.fetchall()]
#
db.close()
#
cursor.close()
device_ids_lst
=
[
"androidid_a25a1129c0b38f7b"
]
sql
=
"select distinct cl_id from kafka_tag3_log where log_time > UNIX_TIMESTAMP(DATE_SUB(NOW(), INTERVAL 30 day))"
db
,
cursor
=
get_jerry_test
()
cursor
.
execute
(
sql
)
device_ids_lst
=
[
i
[
0
]
for
i
in
cursor
.
fetchall
()]
db
.
close
()
cursor
.
close
()
#
device_ids_lst = ["androidid_a25a1129c0b38f7b"]
sparkConf
=
SparkConf
()
.
set
(
"spark.hive.mapred.supports.subdirectories"
,
"true"
)
\
.
set
(
"spark.hadoop.mapreduce.input.fileinputformat.input.dir.recursive"
,
"true"
)
\
...
...
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