SQL INSERT file format
This file format contains an INSERT...VALUES statement to be executed on the destination during the load stage.
Additional data types are stored as follows:
datetimeanddateare stored as ISO strings;decimalis stored as a text representation of a decimal number;binarystorage depends on the format accepted by the destination;jsonstorage also depends on the format accepted by the destination.
This file format is compressed by default.
Supported destinations
This format is used by default by:
It is also supported by Filesystem if you'd like to store INSERT VALUES statements for some reason
How to configure
There are several ways of configuring dlt to useinsert_values file format for normalization step and to store your data at the destination:
-
You can set the
loader_file_formatargument toinsert_valuesin the run command:
info = pipeline.run(some_source(), loader_file_format="insert_values")
- Alternatively, you can set the file type directly in the resource decorator.
@dlt.resource(file_format="insert_values") def generate_rows(nr): pass