Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
新注册的用户请输入邮箱并保存,随后登录邮箱激活账号。后续可直接使用邮箱登录!
Open sidebar
chainweaver
mira
mira-mpc-engine
Commits
a916f0e5
Commit
a916f0e5
authored
1 year ago
by
guanchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add debug log
parent
7b96b788
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
py_sdk.py
py_sdk.py
+2
-1
No files found.
py_sdk.py
View file @
a916f0e5
...
...
@@ -158,8 +158,9 @@ class PySdk():
return
data
def
write_output_to_mysql
(
self
,
mysql_url
,
mysql_prop
,
table_name
,
df
):
#
df.show()
df
.
show
(
10
)
tmp_df
=
df
.
filter
(
"1=0"
)
self
.
logger
.
log
(
f
"connect mysql:
{
mysql_url
}
,
{
str
(
mysql_prop
)
}
.
\n
创建表:
{
table_name
}
"
)
tmp_df
.
write
.
jdbc
(
url
=
mysql_url
,
table
=
"`"
+
table_name
+
"`"
,
mode
=
"overwrite"
,
properties
=
mysql_prop
)
mysql_ops
.
alter_table_charset
(
mysql_url
,
mysql_prop
,
table_name
)
df
.
write
.
jdbc
(
url
=
mysql_url
,
table
=
"`"
+
table_name
+
"`"
,
mode
=
"append"
,
properties
=
mysql_prop
)
...
...
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