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__
()close
()from_string
(writer, **kwargs)write_dataframe
(dataframe, table, if_exists)Write a given DataFrame to a Treasure Data table.
- write_dataframe(dataframe, table, if_exists)[source]
Write a given DataFrame to a Treasure Data table.
- Parameters:
dataframe (
pandas.DataFrame
) – Data loaded to a target table.table (
pytd.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.