Endpoint Read CSV file
Name
read_csv_file
Description
Reads the contents of a CSV file straight into a result set, without requiring a download to disk.
Parameters
| Parameter | Required | Options |
|---|---|---|
|
Name:
Label: File path or ID |
YES |
Output Columns
| Label | Data Type (SSIS) | Data Type (SQL) | Length | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| There are no Static columns defined for this endpoint. This endpoint detects columns dynamically at runtime. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Input Columns
| Label | Data Type (SSIS) | Data Type (SQL) | Length | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| There are no Static columns defined for this endpoint. This endpoint detects columns dynamically at runtime. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Examples
SSIS
Use Dropbox Connector in API Source or in API Destination SSIS Data Flow components to read or write data.
API Source
| Required Parameters | |
|---|---|
| File path or ID | Fill-in the parameter... |
API Destination
| Required Parameters | |
|---|---|
| File path or ID | Fill-in the parameter... |
ODBC application
Use these SQL queries in your ODBC application data source:
Read a CSV file by ID
<p>Reads the contents of a CSV file into a result set using the file ID (e.g. from list_files). Data is returned as rows and columns; no download to disk is required.</p>
SELECT * FROM read_csv_file
WITH (FilePath='id:ZirXxxxxxxxAAAAAAAAABw')
Read a CSV file by path
<p>Reads the contents of a CSV file into a result set using its path. Specify the Dropbox path in <code>FilePath</code>. Rows are returned directly; no file is saved locally.</p>
SELECT * FROM read_csv_file
WITH (FilePath='/myfolder/customers.csv')
SQL Server
Use these SQL queries in SQL Server after you create a data source in Data Gateway:
Read a CSV file by ID
<p>Reads the contents of a CSV file into a result set using the file ID (e.g. from list_files). Data is returned as rows and columns; no download to disk is required.</p>
DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM read_csv_file
WITH (FilePath=''id:ZirXxxxxxxxAAAAAAAAABw'')';
EXEC (@MyQuery) AT [LS_TO_DROPBOX_IN_GATEWAY];
Read a CSV file by path
<p>Reads the contents of a CSV file into a result set using its path. Specify the Dropbox path in <code>FilePath</code>. Rows are returned directly; no file is saved locally.</p>
DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM read_csv_file
WITH (FilePath=''/myfolder/customers.csv'')';
EXEC (@MyQuery) AT [LS_TO_DROPBOX_IN_GATEWAY];