Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
cloud-infrastructure
data-analytics
Commits
229c115a
Commit
229c115a
authored
May 03, 2021
by
Domenico Giordano
Browse files
check empty df
parent
914b0b11
Changes
1
Show whitespace changes
Inline
Side-by-side
tests/spark_etl/integration/test_spark_connector.py
View file @
229c115a
...
...
@@ -97,7 +97,11 @@ def getSparkDF(inpath, outpath, spark, schemafile):
output_df
=
regex_df
# Let's now write to the output dir
cluster_utils
.
write_spark_df
(
output_df
,
outpath
)
df_empty
=
(
len
(
output_df
.
head
(
1
))
==
0
)
print
(
"Is the dataframe empty? %s"
%
df_empty
)
if
not
df_empty
:
print
(
"Saving dataframe"
)
cluster_utils
.
write_spark_df
(
output_df
,
outpath
)
return
output_df
...
...
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