---
title: CSV options (Model Object)
description: The CSV options are properties of a Source that set how the Stage loader reads CSV files.
---

[Skip to content](https://knowledge.bigenius-x.com/csv-options-model-object#main-content)

[Contact us](https://knowledge.bigenius-x.com/kb-tickets/new?hsLang=en) [Go to Customer Portal](https://knowledge.bigenius-x.com/customer-portal?hsLang=en)

[![TRI\_Logo\_biGENIUS\_2020\_RGB\_s](https://knowledge.bigenius-x.com/hs-fs/hubfs/Marketing/TRI_Logo_biGENIUS_2020_RGB_s.png?width=150&height=42&name=TRI_Logo_biGENIUS_2020_RGB_s.png)](https://www.bigenius-x.com/)

Open main navigation

Close main navigation

- [Contact us](https://knowledge.bigenius-x.com/kb-tickets/new)
- [Go to Customer Portal](https://knowledge.bigenius-x.com/customer-portal)

 How can we help you?

- There are no suggestions because the search field is empty.

1. [biGENIUS-X Knowledge Base](https://knowledge.bigenius-x.com/?hsLang=en)
2. [Generators](https://knowledge.bigenius-x.com/generators?hsLang=en)
3. [Properties](https://knowledge.bigenius-x.com/generators?hsLang=en#properties)

# CSV options (Model Object)

**Applies to**  
Platform: Databricks · Fabric Lakehouse  
Architecture: Stage

The CSV options are properties of a Source that set how the Stage loader reads CSV files. Each option becomes one reader option of `spark.read.format('csv')` in the loader notebook. Use them to match the reader to the layout of your files.

The properties exist in the Stage Files generators of Databricks and Fabric Lakehouse. [Column Delimiter](https://knowledge.bigenius-x.com/column-delimiter-model-object?hsLang=en), [Row Delimiter](https://knowledge.bigenius-x.com/row-delimiter-model-object?hsLang=en) and [Field Quote](https://knowledge.bigenius-x.com/field-quote-model-object?hsLang=en) are in the same group and have their own articles.

### Where to set them

Set the options when you [edit a model object](https://knowledge.bigenius-x.com/edit-a-model-object?hsLang=en) of type Source, in the group Csv. Every Stage that reads the Source uses the same values. The meaning of each reader option is described in the [CSV data source documentation](https://spark.apache.org/docs/latest/sql-data-sources-csv.html).

### Options

#### Has Header

`CsvHasHeader`, reader option `header`. Boolean, default `false`. With `true` the reader takes the column names from the first line.

#### Comment Line Character

`CsvComment`, reader option `comment`. One character; lines that start with it are skipped. Default empty.

#### NanValue

`CsvNanValue`, reader option `nanValue`. The text that stands for a value that is not a number. Default `NaN`.

#### Date Format

`CsvDateFormat`, reader option `dateFormat`. Default `yyyy-MM-dd`.

#### Timestamp Format

`CsvTimestampFormat`, reader option `timestampFormat`. Default `yyyy-MM-dd\'T\'HH:mm:ss[.SSS][XXX]`. The property value contains these backslashes, and the loader writes it unchanged into a Python string in single quotes.

#### Timestamp Ntz Format

`CsvTimestampNtzFormat`, reader option `timestampNTZFormat`, for timestamps without time zone. Default `yyyy-MM-dd\'T\'HH:mm:ss[.SSS]`.

#### Multiline

`CsvMultiline`, reader option `multiLine`. Boolean, default `false`. With `true` a quoted value can contain line breaks.

#### Empty Value

`CsvEmptyValue`, reader option `emptyValue`. The text that the reader uses for an empty value.

#### Unescaped Quote Handling

`CsvUnescapedQuoteHandling`, reader option `unescapedQuoteHandling`. Values `STOP_AT_DELIMITER` (default), `STOP_AT_CLOSING_QUOTE`, `BACK_TO_DELIMITER`, `SKIP_VALUE` and `RAISE_ERROR`.

#### Mode

`CsvLoadMode`, reader option `mode`. Values `FAILFAST` (default) and `PERMISSIVE`. With `PERMISSIVE` the loader also passes `columnNameOfCorruptRecord` with the column name `bg_corruptedrecord`, and the Stage table gets the column [BG\_CorruptedRecord](https://knowledge.bigenius-x.com/bg_corruptedrecord?hsLang=en).

### File path

The loader reads `<file path><source object name>`. The `<file path>` comes from the source system property `Csv - File_path`. The generator writes it as a placeholder that ends with `#file_path`, and you set the folder when you [replace the placeholders](https://knowledge.bigenius-x.com/replace-the-placeholders-in-the-artifacts?hsLang=en). The loader stores the path of each file in [BG\_SourceFilePath](https://knowledge.bigenius-x.com/bg_sourcefilepath?hsLang=en).

### Example

The Source `CUSTOMER` has Column Delimiter `|`, Has Header `true` and default values otherwise. The loader notebook of its Stage on Databricks reads the files with:

```
df = spark.read.format('csv') \
    .option('sep', '|') \
    .option('lineSep', '\r\n') \
    .option('quote', '"') \
    .option('header', 'true') \
    .option('mode', 'FAILFAST') \
    .option('comment', '') \
    .option('nanValue', 'NaN') \
    .option('dateFormat', 'yyyy-MM-dd') \
    .option('timestampFormat', 'yyyy-MM-dd\'T\'HH:mm:ss[.SSS][XXX]') \
    .option('timestampNTZFormat', 'yyyy-MM-dd\'T\'HH:mm:ss[.SSS]') \
    .option('multiLine', 'false') \
    .option('emptyValue', 'None') \
    .option('unescapedQuoteHandling', 'STOP_AT_DELIMITER') \
    .load("{stage.spark.databricks.csv#bfm_csv#file_path}CUSTOMER")
```

The text in curly braces is the file path placeholder of the source system `bfm_csv`. The Fabric Lakehouse loader passes the same options.

### Related articles

- Reference: [Column Delimiter (Model Object)](https://knowledge.bigenius-x.com/column-delimiter-model-object?hsLang=en), [Row Delimiter (Model Object)](https://knowledge.bigenius-x.com/row-delimiter-model-object?hsLang=en), [Field Quote (Model Object)](https://knowledge.bigenius-x.com/field-quote-model-object?hsLang=en), [BG\_CorruptedRecord](https://knowledge.bigenius-x.com/bg_corruptedrecord?hsLang=en), [BG\_SourceFilePath](https://knowledge.bigenius-x.com/bg_sourcefilepath?hsLang=en)
- See also: [Replace the placeholders in the artifacts](https://knowledge.bigenius-x.com/replace-the-placeholders-in-the-artifacts?hsLang=en) 
    - Databricks: [Stage Files](https://knowledge.bigenius-x.com/databricks-stage-files-2.0?hsLang=en)
    - Fabric Lakehouse: [Stage Files](https://knowledge.bigenius-x.com/fabric-lakehouse-stage-files-2.0?hsLang=en)

- [Getting started](https://knowledge.bigenius-x.com/getting-started?hsLang=en#main-content)

    - [Guidelines](https://knowledge.bigenius-x.com/getting-started?hsLang=en#guidelines)
    - [Start working](https://knowledge.bigenius-x.com/getting-started?hsLang=en#start-working)
    - [Account](https://knowledge.bigenius-x.com/getting-started?hsLang=en#account)
- [General overview](https://knowledge.bigenius-x.com/general-overview?hsLang=en)
- [Artificial Intelligence](https://knowledge.bigenius-x.com/artificial-intelligence?hsLang=en)
- [Application Modules](https://knowledge.bigenius-x.com/application-modules?hsLang=en#main-content)

    - [Administration](https://knowledge.bigenius-x.com/application-modules?hsLang=en#administration)
    - [Solutions](https://knowledge.bigenius-x.com/application-modules?hsLang=en#solutions)
    - [Global Features](https://knowledge.bigenius-x.com/application-modules?hsLang=en#global-features)
    - [Projects](https://knowledge.bigenius-x.com/application-modules?hsLang=en#projects)
    - [Branches](https://knowledge.bigenius-x.com/application-modules?hsLang=en#branches)
    - [Data Connections](https://knowledge.bigenius-x.com/application-modules?hsLang=en#data-connections)
    - [Dataflow Modeling - Overview](https://knowledge.bigenius-x.com/application-modules?hsLang=en#dataflow-modeling-overview)
    - [Dataflow Modeling - Wizard Steps](https://knowledge.bigenius-x.com/application-modules?hsLang=en#dataflow-modeling-wizard-steps)
    - [Dataflow Modeling - Terms](https://knowledge.bigenius-x.com/application-modules?hsLang=en#dataflow-modeling-terms)
    - [Dataflow Modeling - Term Mapping](https://knowledge.bigenius-x.com/application-modules?hsLang=en#dataflow-modeling-term-mapping)
    - [Dataflow Modeling - Relationships](https://knowledge.bigenius-x.com/application-modules?hsLang=en#dataflow-modeling-relationships)
    - [Dataflow Modeling - Data Quality](https://knowledge.bigenius-x.com/application-modules?hsLang=en#dataflow-modeling-data-quality)
    - [Dataflow Modeling - Indexes](https://knowledge.bigenius-x.com/application-modules?hsLang=en#dataflow-modeling-indexes)
    - [Relationship Modeling](https://knowledge.bigenius-x.com/application-modules?hsLang=en#relationship-modeling)
    - [Generate Artifacts](https://knowledge.bigenius-x.com/application-modules?hsLang=en#generate-artifacts)
    - [Project Settings](https://knowledge.bigenius-x.com/application-modules?hsLang=en#project-settings)
    - [Data Marketplace](https://knowledge.bigenius-x.com/application-modules?hsLang=en#data-marketplace)
- [Generators](https://knowledge.bigenius-x.com/generators?hsLang=en#main-content)

    - [Fabric Warehouse](https://knowledge.bigenius-x.com/generators?hsLang=en#fabric-warehouse)
    - [Fabric Lakehouse](https://knowledge.bigenius-x.com/generators?hsLang=en#fabric-lakehouse)
    - [Databricks](https://knowledge.bigenius-x.com/generators?hsLang=en#databricks)
    - [Snowflake](https://knowledge.bigenius-x.com/generators?hsLang=en#snowflake)
    - [Microsoft SQL Server](https://knowledge.bigenius-x.com/generators?hsLang=en#microsoft-sql-server)
    - [Artifacts](https://knowledge.bigenius-x.com/generators?hsLang=en#artifacts)
    - [Replace Placeholders](https://knowledge.bigenius-x.com/generators?hsLang=en#replace-placeholders)
    - [Target solution environment](https://knowledge.bigenius-x.com/generators?hsLang=en#target-solution-environment)
    - [Deployment](https://knowledge.bigenius-x.com/generators?hsLang=en#deployment)
    - [Deployment with an Azuze DevOps pipeline](https://knowledge.bigenius-x.com/generators?hsLang=en#deployment-with-an-azuze-devops-pipeline)
    - [Delta Deployment](https://knowledge.bigenius-x.com/generators?hsLang=en#delta-deployment)
    - [Load control environment](https://knowledge.bigenius-x.com/generators?hsLang=en#load-control-environment)
    - [Load data with a native load control](https://knowledge.bigenius-x.com/generators?hsLang=en#load-data-with-a-native-load-control)
    - [Load data with Apache Airflow](https://knowledge.bigenius-x.com/generators?hsLang=en#load-data-with-apache-airflow)
    - [Model Object Type](https://knowledge.bigenius-x.com/generators?hsLang=en#model-object-type)
    - [Properties](https://knowledge.bigenius-x.com/generators?hsLang=en#properties)
    - [Default Terms](https://knowledge.bigenius-x.com/generators?hsLang=en#default-terms)
- [Discovery application](https://knowledge.bigenius-x.com/discovery-application?hsLang=en#main-content)

    - [Discovery configurations](https://knowledge.bigenius-x.com/discovery-application?hsLang=en#discovery-configurations)
- [Best practices](https://knowledge.bigenius-x.com/best-practices?hsLang=en#main-content)

    - [Modeling Approaches](https://knowledge.bigenius-x.com/best-practices?hsLang=en#modeling-approaches)
    - [Use Cases](https://knowledge.bigenius-x.com/best-practices?hsLang=en#use-cases)
    - [Business Rules](https://knowledge.bigenius-x.com/best-practices?hsLang=en#business-rules)
    - [Data Quality Rules](https://knowledge.bigenius-x.com/best-practices?hsLang=en#data-quality-rules)
- [FAQs](https://knowledge.bigenius-x.com/faqs?hsLang=en)
- [Product Release Notes](https://knowledge.bigenius-x.com/product-release-notes?hsLang=en#main-content)

    - [SaaS Application](https://knowledge.bigenius-x.com/product-release-notes?hsLang=en#saas-application)
    - [Discovery application](https://knowledge.bigenius-x.com/product-release-notes?hsLang=en#discovery-application)
    - [Generators](https://knowledge.bigenius-x.com/product-release-notes?hsLang=en#generators)
- [Legal Documents](https://knowledge.bigenius-x.com/legal-documents?hsLang=en#main-content)

    - [Current legal docs](https://knowledge.bigenius-x.com/legal-documents?hsLang=en#current-legal-docs)
    - [Software Product and Limits](https://knowledge.bigenius-x.com/legal-documents?hsLang=en#software-product-and-limits)

- [Contact us](https://knowledge.bigenius-x.com/kb-tickets/new?hsLang=en)
- [Customer Portal](https://knowledge.bigenius-x.com/customer-portal)
- [Sign in](https://knowledge.bigenius-x.com/_hcms/mem/login)

[![biGENIUS logo](https://knowledge.bigenius-x.com/hubfs/TRI_Logo_biGENIUS_2020_RGB-1.svg "biGENIUS logo")](https://www.bigenius-x.com)

<https://www.linkedin.com/company/bigenius> <https://www.youtube.com/@biGENIUS_DWA>

All rights reserved © 2025, biGENIUS AG