atoti.Session.read_csv()#

Session.read_csv(path, /, *, array_separator=None, client_side_encryption=None, columns={}, data_types={}, date_patterns={}, default_values={}, encoding='utf-8', keys=frozenset({}), partitioning=None, process_quotes=True, separator=',', table_name=None, **kwargs)#

Read a CSV file into a table.

Note

This is just a shortcut for:

csv_load = tt.CsvLoad(path, ...)
data_types = session.tables.infer_data_types(csv_load)
table = session.create_table(
    table_name,
    data_types={**inferred_data_types, **data_types},
    default_values=...,
    keys=...,
    partitioning=...,
)
table.load(csv_load)

The longer version unlocks better performance because it can be split to move the load() call inside a data_transaction().

Parameters:
Return type:

Table