# CSV Export with FTP Upload

**URL:** <https://community.cdata.com/t/csv-export-with-ftp-upload/830>\
**Category:** CData Virtuality \[Archived\]\
**Tags:** article, cdata-virtuality\
**Created:** [July 12, 2024, 4:24pm UTC](https://community.cdata.com/t/csv-export-with-ftp-upload/830 "2024-07-12T16:24:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous](https://avatars.discourse-cdn.com/v4/letter/a/8491ac/32.png) [@anonymous](https://community.cdata.com/u/anonymous)\
**Post date:** [July 12, 2024, 4:24pm UTC](https://community.cdata.com/t/csv-export-with-ftp-upload/830/1 "2024-07-12T16:24:51Z")

</div>

The following snippet can be used with Data Virtuality Server 2.0.

We assume the the FTP / SFTP server is already used as a data source in Data Virtuality. Therefore we can use the FTP data source directly as the target schema.

call “UTILS.csvExport”(  
“sourceSchema” =\> ‘\<sourceSchema\>’,  
“sourceTable” =\> ‘\<sourceTable\>’,  
“targetSchema” =\> ‘\<NameOfFTPdatasource\>’,  
“targetFile” =\> ‘\<targetFile\>’,  
“delimiter” =\> ‘\<delimiter\>’,  
“quote” =\> ‘\<quote\>’,  
“header” =\> \<trueORfalse\>,  
“orderBy” =\> ‘string\_orderBy’,  
“encoding” =\> ‘\<encoding\>’  
);;

The following parameters can be deleted if not used:

- targetFile
- delimiter
- quote
- header
- order by
- encoding
