Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
Amazon-Selection-Data
Overview
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
abel_cjy
Amazon-Selection-Data
Commits
95b97877
Commit
95b97877
authored
Jun 04, 2026
by
fangxingjun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
6dd7a66e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletions
+3
-1
img_id_index_to_doris.py
Pyspark_job/img_search/img_id_index_to_doris.py
+3
-1
No files found.
Pyspark_job/img_search/img_id_index_to_doris.py
View file @
95b97877
...
...
@@ -7,6 +7,7 @@ from utils.templates import Templates
from
utils.secure_db_client
import
get_remote_engine
from
utils.db_util
import
DbTypes
,
DBUtil
from
utils.DorisHelper
import
DorisHelper
from
pyspark.sql
import
functions
as
F
class
ImgIdIndexToDoris
(
Templates
):
...
...
@@ -61,9 +62,10 @@ class ImgIdIndexToDoris(Templates):
df
=
self
.
df_id_index
count
=
df
.
count
()
print
(
f
"读取完成,数据量:{count}"
)
df
=
df
.
withColumn
(
"created_time"
,
F
.
current_timestamp
())
df
.
show
(
10
,
truncate
=
False
)
TABLE_COLUMNS
=
"img_unique,site_name,
index,id,img_typ
e"
TABLE_COLUMNS
=
"img_unique,site_name,
`index`,id,img_type,created_tim
e"
# ===== Step 2:写入 Doris selection.sys_edit_log =====
print
(
f
"[2/2] 写入 Doris {self.doris_db}.{self.doris_table}"
)
DorisHelper
.
spark_export_with_columns
(
...
...
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