in awsglue/context.py [0:0]
def write_from_options(self, frame_or_dfc, connection_type,
connection_options={}, format={}, format_options={},
transformation_ctx = "", **kwargs):
if isinstance(frame_or_dfc, DynamicFrameCollection):
new_options = dict(list(connection_options.items())
+ [("useFrameName", True)])
elif isinstance(frame_or_dfc, DynamicFrame):
new_options = connection_options
else:
raise TypeError("frame_or_dfc must be DynamicFrame or"
"DynamicFrameCollection. Got " +
str(type(frame_or_dfc)))
# Handle parquet and ORC case, make sure to get the right SparkSQL sink
sink = self.getSink(connection_type, format, transformation_ctx, **new_options)
if (format and format not in self.Spark_SQL_Formats):
sink.setFormat(format, **format_options)
if 'accumulator_size' in kwargs and kwargs['accumulator_size'] > 0:
sink.setAccumulableSize(kwargs['accumulator_size'])
return sink.write(frame_or_dfc)