> For the complete documentation index, see [llms.txt](https://docs.zingg.ai/zingg/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zingg.ai/zingg/connect-your-data/connect-file-formats.md).

# Connect File Formats

Configure Zingg pipes for CSV, Parquet, Avro, JSON, TSV, and XML flat file formats.

{% hint style="success" icon="right-long" %}
New to Zingg pipes? Understand how pipes work before configuring them - [Pipes and data connections](/zingg/connect-your-data/pipes-and-data-connections.md).
{% endhint %}

This page covers standalone flat file connections - reading and writing files directly from a local path or mounted file system.

For files stored in cloud platforms, use the format sections within each platform tab.

* Files on Databricks or Fabric - Connect cloud warehouses
* Files on S3 - Connect cloud storage

{% hint style="success" icon="right-long" %}
All file formats shown here are available in Community and Enterprise.

The only edition difference is the pipe class in the Python API:

* `CsvPipe` for Community
* `ECsvPipe` for Enterprise
  {% endhint %}

{% tabs %}
{% tab title="CSV" %}

### Python API - Community

```python
from zingg.client import*
from zingg.pipes import*

schema = "field1 string, \
field2 string, field3 string"

inputPipe = CsvPipe("csvInput", "/path/to/input.csv", schema)
args.setData(inputPipe)

outputPipe = CsvPipe("csvOutput", "/path/to/output")
args.setOutput(outputPipe)
```

### Python API - Enterprise

{% hint style="info" icon="right-long" %}
Enterprise uses ECsvPipe. The pipe setup is identical - only the class `name` and `import` changes.
{% endhint %}

```python
from zinggEC.enterprise.common.epipes import*
from zinggEC.enterprise.common.EArguments import*

schema = "field1 string, \
field2 string, field3 string"

inputPipe = ECsvPipe("csvInput", "/path/to/input.csv", schema)
args.setData(inputPipe)

outputPipe = ECsvPipe("csvOutput", "/path/to/output")
outputPipe.setHeader("true")
args.setOutput(outputPipe)
```

### JSON Config

```json
{
  "data" : [ {
    "name" : "csvInput",
    "format" : "csv",
    "props" : {
      "location" : "/path/to/input.csv",
      "delimiter" : ",",
      "header" : "true"
    },
    "schema" : "field1 string,
    field2 string,
    field3 string "
  } ],
  "output" : [ {
    "name" : "csvOutput",
    "format" : "csv",
    "props" : {"location" : "/path/to/output", "header" : "true"}
  } ]
}
```

{% hint style="success" icon="right-long" %}
If your CSV has no header row, set `header`: `false` and define the schema field explicitly.

Schema uses Spark SQL types: string, integer, double, date, timestamp.
{% endhint %}
{% endtab %}

{% tab title="Parquet" %}

### Python API

```python
from zingg.client import*
from zingg.pipes import*

parquetPipe = Pipe("parquetFiles", "parquet")
parquetPipe.addProperty("path", "/home/zingg")
args.setData(parquetPipe)
```

### **JSON Config**

{% hint style="danger" icon="right-long" %}
Parquet uses `path` as the property key, not `location` as CSV uses.
{% endhint %}

```json
{
  "data" : [ {
    "name" : "parquetFiles",
    "format" : "parquet",
    "props" : {
      "path" : "/home/zingg"
    }
  } ]
}
```

{% endtab %}

{% tab title="Avro" %}

### Python API

```python
from zingg.client import*
from zingg.pipes import*

avroPipe = Pipe("avroInput", "avro")
avroPipe.addProperty("path", "/path/to/input.avro")
args.setData(avroPipe)
```

### JSON Config

```json
{
  "data" : [ {
    "name" : "avroInput",
    "format" : "avro",
    "props" : {
      "path" : "/path/to/input.avro"
    }
  } ]
}
```

{% endtab %}

{% tab title="JSON" %}

### Python API

```python
from zingg.client import*
from zingg.pipes import*

jsonPipe = Pipe("jsonInput", "json")
jsonPipe.addProperty("path", "/path/to/input.json")
args.setData(jsonPipe)
```

### JSON Config

```json
{
  "data" : [ {
    "name" : "jsonInput",
    "format" : "json",
    "props" : {
      "path" : "/path/to/input.json"
    }
  } ]
}
```

{% hint style="info" icon="right-long" %}

* For multiline JSON files, add `multiLine`: `true` to props.
* For JSON Lines (one object per line), no additional props needed.
  {% endhint %}
  {% endtab %}
  {% endtabs %}

<details>

<summary><strong>What about TSV and XLSX?</strong></summary>

**TSV**

TSV uses the same CSV connector with a tab delimiter.

```json
{
  "data": [
    {
      "name": "tsvInput",
      "format": "csv",
      "props": {
        "location": "/path/to/input.tsv",
        "delimiter": "\t",
        "header": "true"
      }
    }
  ]
}
```

**Python API - Community**

```python
from zingg.client import *
from zingg.pipes import *

tsvPipe = CsvPipe(
    "tsvInput",
    "/path/to/input.tsv",
    schema
)
tsvPipe.addProperty("sep", "\t")
args.setData(tsvPipe)
```

**XLSX**

***CHECK WITH SONAL - XLSX is listed as supported on zingg.ai but the connector format string and Python class are not confirmed on any live docs page. Please confirm the XLSX config and whether it is all editions or ENT only.***

{% hint style="success" icon="right-long" %}
For files on cloud platforms:

* Databricks and Fabric - [Connect Cloud Warehouses](/zingg/connect-your-data/connect-cloud-warehouses.md)
* S3 - [Connect Cloud Storage](/zingg/connect-your-data/connect-cloud-storage.md)
  {% endhint %}

</details>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.zingg.ai/zingg/connect-your-data/connect-file-formats.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
