# CSVApi

## csvGetAllRows

Retrieve all rows from a CSV file.

```
CSVApi.csvGetAllRows(filePath)
or
CSVApi.csvGetAllRows(filePath, separator)
or
CSVApi.csvGetAllRows(filePath, separator, columnNames)
or
CSVApi.csvGetAllRows(filePath, separator, columnNames, columnNameLine)

```

#### Parameters

```
filePath (string)
separator (string)
columnNames (List of strings)
columnNameLine (int)
```

#### Returns

```
A list of dictionaries representing the rows in the CSV file.
```

## csvGetPage

Retrieve a page of data from a CSV file based on query parameters.

```
CSVApi.csvGetPage(fileName, separatorStr,
      columnNames, columnNameLine, query, startIndex, pageSize)
or
CSVApi.csvGetPage(fileName, separatorChar,
      columnNames, columnNameLine, query, startIndex, pageSize)
```

#### Parameters

```
fileName (string)
separatorChar (string)
columnNames (List of string)
columnNameLine (int)
query (string)
startIndex (int)
pageSize (int)
```

#### Returns

```
A list of dictionaries representing the requested page of data from the CSV file.
```

## getCSVIterator

Description...

```
CSVApi.getCSVIterator(fileName, startIndex, pageSize)
or
CSVApi.getCSVIterator(fileName, query, startIndex, pageSize)
or
CSVApi.getCSVIterator(fileName, separatorChar, query, startIndex, pageSize)
or
CSVApi.getCSVIterator(fileName, columnNames, query, startIndex, pageSize)
or
CSVApi.getCSVIterator(fileName, separatorChar, columnNames, query, startIndex, pageSize)
or
CSVApi.getCSVIterator(fileName, columnNames, columnNameLine, query, startIndex, pageSize)
or
CSVApi.getCSVIterator(fileName, separatorChar, columnNames, columnNameLine, query, startIndex, pageSize)
      
```

#### Parameters

```
fileName (string)
startIndex (int)
pageSize (int)
query (string)
separatorChar (string)
columnNames (List of strings)
columnNameLine (int)
```

#### Returns

```
CSVIterator
```

## getCSVIterator

Description...

```
CSVApi.getCSVWriter(fileName, fl)
or
CSVApi.getCSVWriter(fileName, columnNames)
or
CSVApi.getCSVWriter(fileName, separatorChar, fl)
or
CSVApi.getCSVWriter(fileName, separatorChar,
      columnNames)
or
CSVApi.getCSVWriter(fileName, separatorChar, fl,
      columnNameLine)
or
CSVApi.getCSVWriter(fileName, separatorChar,
      columnNames, columnNameLine)
```

#### Parameters

```
fileName (string)
fl (FieldList)
separatorChar (string)
columnNames (List of string)
columnNameLine (int)
```

#### Returns

```
CSVWriter
```

## getCSVIterator

Description...

```
CSVApi.getCSVWriter(fileName, fl)
or
CSVApi.getCSVWriter(fileName, columnNames)
or
CSVApi.getCSVWriter(fileName, separatorChar, fl)
or
CSVApi.getCSVWriter(fileName, separatorChar,
      columnNames)
or
CSVApi.getCSVWriter(fileName, separatorChar, fl,
      columnNameLine)
or
CSVApi.getCSVWriter(fileName, separatorChar,
      columnNames, columnNameLine)
```

#### Parameters

```
fileName (string)
fl (FieldList)
separatorChar (string)
columnNames (List of string)
columnNameLine (int)
```

#### Returns

```
CSVWriter
```

## getCSVIterator

Description...

```
CSVApi.getCSVImportIterator(id, limit)
or
CSVApi.getCSVImportIterator(id, limit,
      mappings)
or
CSVApi.getCSVImportIterator(id, modelClassName, limit,
      mappings)
```

#### Parameters

```
id (string)
limit (int)
mappings (list of dictionaries)
modelClassName (string)
```

#### Returns

```
Object
```

## getCSVIterator

Description...

```
CSVApi.csvWriteFile(fileName, separatorStr, columnNames,
      columnNameLine, rows)
or
CSVApi.csvWriteFile(fileName, separatorChar, columnNames,
      columnNameLine, rows)
```

#### Parameters

```
fileName (string)
separatorStr (string)
separatorChar (string)
columnNames (List of dictionaries)
columnNameLine (int)
rows (List of dictionaries)
```

#### Returns

```
Result
```


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://trillo.gitbook.io/trillo-workbench-python-sdk/csvapi.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
