Skip to main content
Session.read_csv(
    path: Path | str,
    /,
    *,
    array_separator: str | None = None,
    client_side_encryption: ClientSideEncryptionConfig | None = None,
    columns: Mapping[str, ColumnName] | Sequence[ColumnName] = frozendict({}),
    data_types: Mapping[ColumnName, DataType] = frozendict({}),
    date_patterns: Mapping[ColumnName, str] = frozendict({}),
    default_values: Mapping[ColumnName, Constant | None] = frozendict({}),
    encoding: str = 'utf-8',
    keys: AbstractSet[ColumnName] | Sequence[ColumnName] = frozenset({}),
    partitioning: str | None = None,
    process_quotes: bool | None = True,
    separator: str | None = ',',
    table_name: TableName,
    true_values: AbstractSet[Any] = frozenset({}),
    false_values: AbstractSet[Any] = frozenset({}),
    **kwargs: Unpack[_ReadCsvPrivateParameters],
) → Table
Read a CSV file into a table.
This is just a shortcut for:
The longer variant can be refactored to move the load() call inside a data_transaction().

Parameters

path

See atoti.CsvLoad.path.

array_separator

See atoti.CsvLoad.array_separator.

client_side_encryption

See atoti.CsvLoad.client_side_encryption.

columns

See atoti.CsvLoad.columns.

data_types

The data types for some or all columns of the table. Data types for non specified columns will be inferred from the first 1,000 lines.

date_patterns

See atoti.CsvLoad.date_patterns.

default_values

See create_table()’s default_values.

encoding

See atoti.CsvLoad.encoding.

keys

See create_table()’s keys.

partitioning

See create_table()’s partitioning.

process_quotes

See atoti.CsvLoad.process_quotes.

separator

See atoti.CsvLoad.separator.

table_name

See create_table()’s name.

true_values

See atoti.CsvLoad.true_values.

false_values

See atoti.CsvLoad.false_values.