pytd.writer.InsertIntoWriter¶
-
class
pytd.writer.
InsertIntoWriter
[source]¶ A writer module that loads Python data to Treasure Data by issueing INSERT INTO query in Presto.
Methods
__init__
(self)Initialize self.
close
(self)from_string
(writer, \*\*kwargs)write_dataframe
(self, dataframe, table, …)Write a given DataFrame to a Treasure Data table.
-
write_dataframe
(self, dataframe, table, if_exists)[source]¶ Write a given DataFrame to a Treasure Data table.
- Parameters
- dataframepandas.DataFrame
Data loaded to a target table.
- tablepytd.table.Table
Target table.
- if_exists{‘error’, ‘overwrite’, ‘append’, ‘ignore’}
What happens when a target table already exists.
error: raise an exception.
overwrite: drop it, recreate it, and insert data.
append: insert data. Create if does not exist.
ignore: do nothing.
-