CSV Connector for CData Sync

Build 22.0.8462
  • CSV
      • Viewing Remote CSV Metadata
    • Establishing a Connection
      • Connecting to CSV Data Sources
      • Connecting to Amazon S3
      • Connecting to Azure Blob Storage
      • Connecting to Azure Data Lake Storage
      • Connecting to Box
        • Create a Custom OAuth App
      • Connecting to Dropbox
        • Create a Custom OAuth App
      • Connecting to Google Cloud Storage
        • Create a Custom OAuth App
      • Connecting to Google Drive
        • Create a Custom OAuth App
      • Connecting to HTTP Streams
      • Connecting to IBM Object Storage
      • Connecting to OneDrive
      • Connecting to SFTP
      • Connecting to SharePoint Online
      • SSO Connections
      • Using Kerberos
      • Fine-Tuning Data Access
    • Modeling CSV Data
      • Using Schema.ini
      • Generating Schema Files
      • Column Definitions
      • SELECT Execution
      • Operations
        • csvproviderGet
        • oauthGetAccessToken
        • oauthGetUserAuthorizationURL
    • Advanced Features
      • SSL Configuration
      • Firewall and Proxy
    • Connection String Options
      • Authentication
        • AuthScheme
        • AccessKey
        • SecretKey
        • ApiKey
        • User
        • Password
        • SharePointEdition
      • Connection
        • ConnectionType
        • URI
        • Region
        • ProjectId
        • OracleNamespace
        • StorageBaseURL
        • SimpleUploadLimit
        • UseVirtualHosting
      • AWS Authentication
        • AWSAccessKey
        • AWSSecretKey
        • AWSRoleARN
        • AWSPrincipalARN
        • AWSRegion
        • AWSCredentialsFile
        • AWSCredentialsFileProfile
        • AWSSessionToken
        • MFASerialNumber
        • MFAToken
        • ServerSideEncryption
      • Azure Authentication
        • AzureStorageAccount
        • AzureAccessKey
        • AzureSharedAccessSignature
        • AzureTenant
        • AzureEnvironment
      • SSO
        • SSOLoginURL
        • SSOProperties
      • OAuth
        • OAuthVersion
        • OAuthClientId
        • OAuthClientSecret
        • Scope
        • OAuthGrantType
        • OAuthPasswordGrantMode
        • OAuthIncludeCallbackURL
        • OAuthAuthorizationURL
        • OAuthAccessTokenURL
        • OAuthRefreshTokenURL
        • OAuthRequestTokenURL
        • AuthToken
        • AuthKey
        • OAuthParams
      • JWT OAuth
        • OAuthJWTCert
        • OAuthJWTCertType
        • OAuthJWTCertPassword
        • OAuthJWTCertSubject
        • OAuthJWTIssuer
        • OAuthJWTSubject
      • Kerberos
        • KerberosKDC
        • KerberosRealm
        • KerberosSPN
        • KerberosKeytabFile
        • KerberosServiceRealm
        • KerberosServiceKDC
        • KerberosTicketCache
      • SSL
        • SSLClientCert
        • SSLClientCertType
        • SSLClientCertPassword
        • SSLClientCertSubject
        • SSLMode
        • SSLServerCert
      • SSH
        • SSHAuthMode
        • SSHClientCert
        • SSHClientCertPassword
        • SSHClientCertSubject
        • SSHClientCertType
        • SSHUser
        • SSHPassword
      • Firewall
        • FirewallType
        • FirewallServer
        • FirewallPort
        • FirewallUser
        • FirewallPassword
      • Proxy
        • ProxyAutoDetect
        • ProxyServer
        • ProxyPort
        • ProxyAuthScheme
        • ProxyUser
        • ProxyPassword
        • ProxySSLType
        • ProxyExceptions
      • Logging
        • LogModules
      • Schema
        • Location
        • BrowsableSchemas
        • Tables
        • Views
        • SchemaIniLocation
        • AggregateFiles
        • MetadataDiscoveryURI
        • TypeDetectionScheme
        • ColumnCount
        • RowScanDepth
      • Data Formatting
        • IncludeColumnHeaders
        • FMT
        • ExtendedProperties
        • RowDelimiter
        • SkipTop
        • IgnoreBlankRows
        • IncludeEmptyHeaders
        • SkipHeaderComments
        • Charset
        • QuoteEscapeCharacter
        • QuoteCharacter
        • TrimSpaces
        • PushEmptyValuesAsNull
        • NullValues
        • PathSeparator
        • IgnoreIncompleteRows
        • MaxCellLength
      • Miscellaneous
        • BatchNamingConvention
        • ClientCulture
        • CreateBatchFolder
        • Culture
        • CustomHeaders
        • CustomUrlParams
        • DirectoryRetrievalDepth
        • ExcludeFileExtensions
        • ExcludeFiles
        • GenerateSchemaFiles
        • IncludeDropboxTeamResources
        • IncludeFiles
        • IncludeSubdirectories
        • InsertMode
        • MaxRows
        • Other
        • Pagesize
        • PseudoColumns
        • Timeout
        • TruncateOnInserts
        • UserDefinedViews
        • UseRowNumbers

CSV Connector for CData Sync

Overview

The CData Sync App provides a straightforward way to continuously pipeline your CSV data to any database, data lake, or data warehouse, making it easily available for Analytics, Reporting, AI, and Machine Learning.

The CSV connector can be used from the CData Sync application to pull data from CSV and move it to any of the supported destinations.

CSV Connector for CData Sync

Viewing Remote CSV Metadata

The CData Sync App is designed for streaming CSV only.

This streamed file content does not include all of the metadata associated with remotely stored CSV files, such as file and folder name.

If access to both the file metadata and the actual file content is needed, then the CData Sync App must be used in tandem with the associated file system driver(s) for the service the CSV files are remotely stored in.

The following file system drivers are available:

  • AmazonS3
  • Box
  • Dropbox
  • FTP
  • GoogleCloudStorage
  • IBLCloudObjectStorage
  • OneDrive
  • SFTP

See the relevant CData file system driver's documentation for a configuration guide for connecting to stored CSV file metadata.

CSV Connector for CData Sync

Establishing a Connection

Create a connection to CSV by navigating to the Connections page in the Sync App application and selecting the corresponding icon in the Add Connections panel. If the CSV icon is not available, click the Add More icon to download and install the CSV connector from the CData site.

Required properties are listed under the Settings tab. The Advanced tab lists connection properties that are not typically required.

The CData Sync App allows connecting to local and remote CSV resources. Set the URI property to the CSV resource location, in addition to any other properties necessary to connect to your data source.

Connecting to Local Files

Set the ConnectionType to Local. Local files support SELECT\INSERT\UPDATE\DELETE.

Set the URI to a folder containing CSV files: C:\folder1.

You can also connect to multiple CSV files which share the same schema. Below is an example connection string:

URI=C:\folder; AggregateFiles=True;

If you would prefer to expose all of the individual CSV files as tables instead, leave this property False.

URI=C:\folder; AggregateFiles=False;

Connecting to Cloud-Hosted CSV Files

While the Sync App is capable of pulling data from CSV files hosted on a variety of cloud data stores, INSERT, UPDATE, and DELETE are not supported outside of local files in this Sync App.

If you need INSERT/UPDATE/DELETE cloud files, you can download the corresponding CData Sync App for that cloud host (supported via stored procedures), make changes with the local file's corresponding Sync App, then upload the file using the cloud source's stored procedures.

As an example, if you wanted to update a file stored on SharePoint, you could use the CData SharePoint Sync App's DownloadDocument procedure to download the CSV file, update the local CSV file with the CData CSV Sync App, then use the SharePoint Sync App's UploadDocument procedure to upload the changed file to SharePoint.

A unique prefix at the beginning of the URI connection property is used to identify the cloud data store being targed by the Sync App and the remainder of the path is a relative path to the desired folder (one table per file) or single file (a single table).

Amazon S3

Set the following to identify your CSV resources stored on Amazon S3:

  • ConnectionType: Set the ConnectionType to Amazon S3.
  • URI: Set this to the bucket and folder: s3://bucket1/folder1.

See Connecting to Amazon S3 for more information regarding how to connect and authenticate to CSV files hosted on Amazon S3.

Azure Blob Storage

Set the following to identify your CSV resources stored on Azure Blob Storage:

  • ConnectionType: Set this to Azure Blob Storage.
  • URI: Set this to the name of your container and the name of the blob. For example: azureblob://mycontainer/myblob.

See Connecting to Azure Blob Storage for more information regarding how to connect and authenticate to CSV files hosted on Amazon Blob Storage.

Azure Data Lake Storage

Set the following to identify your CSV resources stored on Azure Data Lake Storage:

  • ConnectionType: Set this to Azure Data Lake Storage Gen1, Azure Data Lake Storage Gen2, or Azure Data Lake Storage Gen2 SSL.
  • URI: Set this to the name of the file system and the name of the folder which contains your CSV files. For example:
    • Gen 1: adl://myfilesystem/folder1
    • Gen 2: abfs://myfilesystem/folder1
    • Gen 2 SSL: abfss://myfilesystem/folder1

See Connecting to Azure Data Lake Storage for more information regarding how to connect and authenticate to CSV files hosted on Azure Data Lake Storage.

Azure File Storage

Set the following properties to connect:

  • ConnectionType: Set this to Azure Files.
  • URI: Set this the name of your azure file share and the name of the resource. For example: azurefile://fileShare/remotePath.
  • AzureStorageAccount (Required): Set this to the account associated with the Azure file.

You can authenticate either an Azure access key or an Azure shared access signature. Set one of the following:

  • AzureAccessKey: Set this to the access key associated with the Azure file.
  • AzureSharedAccessSignature: Set this to the shared access signature associated with the Azure file.

Box

Set the following to identify your CSV resources stored on Box:

  • ConnectionType: Set this to Box.
  • URI: Set this the name of the file system and the name of the folder which contains your CSV files. For example: box://folder1.

See Connecting to Box for more information regarding how to connect and authenticate to CSV files hosted on Box.

Dropbox

Set the following to identify your CSV resources stored on Dropbox:

  • ConnectionType: Set this to Dropbox.
  • URI: Set this to the path to a folder containing CSV files. For example: dropbox://folder1.

See Connecting to Dropbox for more information regarding how to connect and authenticate to CSV files hosted on Dropbox.

FTP

The Sync App supports both plaintext and SSL/TLS connections to FTP servers.

Set the following connection properties to connect:

  • ConnectionType: Set this to either FTP or FTPS.
  • URI: Set this to the address of the server followed by the path to the folder to be used as the root folder. For example: ftp://localhost:990/folder1 or ftps://localhost:990/folder1.
  • User: Set this to your username on the FTP(S) server you want to connect to.
  • Password: Set this to your password on the FTP(S) server you want to connect to.

Google Cloud Storage

Set the following to identify your CSV resources stored on Google Cloud Storage:

  • ConnectionType: Set this to Google Cloud Storage.
  • URI: Set this to the path to the name of the file system and the name of the folder which contains your CSV files. For example: gs://bucket/remotePath.

See Connecting to Google Cloud Storage for more information regarding how to connect and authenticate to CSV files hosted on Google Cloud Storage.

Google Drive

Set the following to identify your CSV resources stored on Google Drive:

  • ConnectionType: Set this to Google Drive.
  • URI: Set to the path to the name of the file system and the name of the folder which contains your CSV files. For example: gdrive://folder1.

See Connecting to Google Drive for more information regarding how to connect and authenticate to CSV files hosted on Google Drive.

HDFS

Set the following to identify your CSV resources stored on HDFS:

  • ConnectionType: Set this to HDFS or HDFS Secure.
  • URI: Set this to the path to a folder containing CSV files. For example:
    • HDFS: webhdfs://host:port/remotePath
    • HDFS Secure: webhdfss://host:port/remotePath

There are two authentication methods available for connecting to HDFS data source, Anonymous Authentication and Negotiate (Kerberos) Authentication.

Anonymous Authentication

In some situations, you can connect to HDFS without any authentication connection properties. To do so, set the AuthScheme property to None (default).

Authenticate using Kerberos

When authentication credentials are required, you can use Kerberos for authentication. See Using Kerberos for details on how to authenticate with Kerberos.

HTTP Streams

Set the following to identify your CSV resources stored on HTTP streams:

  • ConnectionType: Set this to HTTP or HTTPS.
  • URI: Set this to the URI of your HTTP(S) stream. For example:
    • HTTP: http://remoteStream
    • HTTPS: https://remoteStream

See Connecting to HTTP Streams for more information regarding how to connect and authenticate to CSV files hosted on HTTP Streams.

IBM Cloud Object Storage

Set the following to identify your CSV resources stored on IBM Cloud Object Storage:

  • ConnectionType: Set this to IBM Object Storage Source.
  • URI: Set this to the bucket and folder. For example: ibmobjectstorage://bucket1/remotePath.

See Connecting to IBM Object Storage for more information regarding how to connect and authenticate to CSV files hosted on IBM Cloud Object Storage.

OneDrive

Set the following to identify your CSV resources stored on OneDrive:

  • ConnectionType: Set this to OneDrive.
  • URI: Set this to the path to a folder containing CSV files. For example: onedrive://remotePath.

See Connecting to OneDrive for more information regarding how to connect and authenticate to CSV files hosted on OneDrive.

Oracle Cloud Storage

Set the following properties to authenticate with HMAC:

  • ConnectionType: Set the ConnectionType to Oracle Cloud Storage.
  • URI: Set this to the bucket and folder: os://bucket/remotePath.
  • AccessKey: Set this to an Oracle Cloud Access Key.
  • SecretKey: Set this to an Oracle Cloud Secret Key.
  • OracleNamespace: Set this to an Oracle cloud namespace.
  • Region (optional): Set this to the hosting region for your S3-like Web Services.

SFTP

Set the following to identify your CSV resources stored on SFTP:

  • ConnectionType: Set this to SFTP.
  • URI: Set this to the address of the server followed by the path to the folder to be used as the root folder. For example: sftp://server:port/remotePath.

See Connecting to SFTP for more information regarding how to connect and authenticate to CSV files hosted on SFTP.

SharePoint Online

Set the following to identify your CSV resources stored on SharePoint Online:

  • ConnectionType: Set this to SharePoint REST or SharePoint SOAP.
  • URI: Set this to a document library containing CSV files. For example:
    • SharePoint Online REST: sprest://remotePath
    • SharePoint Online SOAP: sp://remotePath

See Connecting to SharePoint Online for more information regarding how to connect and authenticate to CSV files hosted on SharePoint Online.

Connecting to HTTP CSV Streams

Set the URI to the HTTP or HTTPS URL of the CSV resource you want to access as a table. For example:

URI=http://www.host1.com/streamname1;
To authenticate, set AuthScheme and the corresponding properties. Specify additional headers in CustomHeaders to modify the query string, set CustomUrlParams.

To query the CSV stream, reference streamedtable as the table name.

SELECT * FROM streamedtable

Connecting to Other Sources: System Streams

You can also read from and write to system streams. Reference the stream from code with the ExtendedProperties connection property.

Securing CSV Connections

By default, the Sync App attempts to negotiate SSL/TLS by checking the server's certificate against the system's trusted certificate store. To specify another certificate, see the SSLServerCert property for the available formats to do so.

CSV Connector for CData Sync

Connecting to CSV Data Sources

Connecting to CSV

Below are example connection strings to CSV files or streams, using the Sync App's default data modeling configuration (see below)

Service provider URI formats Connection example
Local Single File Path (One table)

file://localPath

Directory Path (one table per file)

file://localPath

URI=C:/folder1;
HTTP or HTTPS http://remoteStream

https://remoteStream

URI=http://www.host1.com/streamname1;
Amazon S3 Single File Path (One table)

s3://remotePath

Directory Path (one table per file)

s3://remotePath

URI=s3://bucket1/folder1; AWSSecretKey=secret1; AWSRegion=OHIO;
Azure Blob Storage azureblob://mycontainer/myblob/ URI=azureblob://mycontainer/myblob/; AzureStorageAccount=myAccount; AzureAccessKey=myKey;

URI=azureblob://mycontainer/myblob/; AzureStorageAccount=myAccount; AuthScheme=OAuth;

Google Drive Single File Path (One table)

gdrive://remotePath

gdrive://SharedWithMe/remotePath

Directory Path (one table per file)

gdrive://remotePath

gdrive://SharedWithMe/remotePath

URI=gdrive://folder1; AuthScheme=OAuth;

URI=gdrive://SharedWithMe/folder1; AuthScheme=OAuth;

OneDrive Single File Path (One table)

onedrive://remotePath

onedrive://SharedWithMe/remotePath

Directory Path (one table per file)

onedrive://remotePath

onedrive://SharedWithMe/remotePath

URI=onedrive://folder1; AuthScheme=OAuth;

URI=onedrive://SharedWithMe/folder1; AuthScheme=OAuth;

Box Single File Path (One table)

box://remotePath

Directory Path (one table per file)

box://remotePath

URI=box://folder1; AuthScheme=OAuth;
Dropbox Single File Path (One table)

dropbox://remotePath

Directory Path (one table per file)

dropbox://remotePath

URI=dropbox://folder1; AuthScheme=OAuth; OAuthClientId=oauthclientid1; OAuthClientSecret=oauthcliensecret1; CallbackUrl=http://localhost:12345;
SharePoint SOAP Single File Path (One table)

sp://remotePath

Directory Path (one table per file)

sp://remotePath

URI=sp://Documents/folder1; User=user1; Password=password1; StorageBaseURL=https://subdomain.sharepoint.com;
SharePoint REST Single File Path (One table)

sprest://remotePath

Directory Path (one table per file)

sprest://remotePath

URI=sprest://Documents/folder1; AuthScheme=OAuth; StorageBaseURL=https://subdomain.sharepoint.com;
FTP or FTPS Single File Path (One table)

ftp://server:port/remotePath

ftps://server:port/remotepath

Directory Path (one table per file)

ftp://server:port/remotePath

ftps://server:port/remotepath;

URI=ftps://localhost:990/folder1; User=user1; Password=password1;
SFTP Single File Path (One table)

sftp://server:port/remotePath

Directory Path (one table per file)

sftp://server:port/remotePath

URI=sftp://127.0.0.1:22/folder1 User=user1; Password=password1;

URI=sftp://127.0.0.1:22/folder1 SSHAuthmode=PublicKey; SSHClientCert=myPrivateKey

Azure Data Lake Store Gen1 adl://remotePath

adl://Account.azuredatalakestore.net@remotePath

URI=adl://folder1; AuthScheme=OAuth; AzureStorageAccount=myAccount; AzureTenant=tenant;

URI=adl://myAccount.azuredatalakestore.net@folder1; AuthScheme=OAuth; AzureTenant=tenant;

AzureDataLakeStoreGen2 abfs://myfilesystem/remotePath

abfs://[email protected]/remotepath

URI=abfs://myfilesystem/folder1; AzureStorageAccount=myAccount; AzureAccessKey=myKey;

URI=abfs://[email protected]/folder1; AzureAccessKey=myKey;

AzureDataLakeStoreGen2 with SSL abfss://myfilesystem/remotePath

abfss://[email protected]/remotepath

URI=abfss://myfilesystem/folder1; AzureStorageAccount=myAccount; AzureAccessKey=myKey;

URI=abfss://[email protected]/folder1; AzureAccessKey=myKey;

Wasabi Single File Path (One table)

wasabi://bucket1/remotePath

Directory Path (one table per file)

wasabi://bucket1/remotePath

URI=wasabi://bucket/folder1; AccessKey=token1; SecretKey=secret1; Region='us-west-1';
Google Cloud Storage Single File Path (One table)

gs://bucket/remotePath

Directory Path (one table per file)

gs://bucket/remotePath

URI=gs://bucket/folder1; AuthScheme=OAuth; ProjectId=test;
Oracle Cloud Storage Single File Path (One table)

os://bucket/remotePath

Directory Path (one table per file)

os://bucket/remotePath

URI=os://bucket/folder1; AccessKey='myKey'; SecretKey='mySecretKey'; OracleNameSpace='myNameSpace' Region='us-west-1';
Azure File Single File Path (One table)

azurefile://fileShare/remotePath

Directory Path (one table per file)

azurefile://fileShare/remotePath

URI=azurefile://bucket/folder1; AzureStorageAccount='myAccount'; AzureAccessKey='mySecretKey';

URI=azurefile://bucket/folder1; AzureStorageAccount='myAccount'; AzureSharedAccessSignature='mySharedAccessSignature';

IBM Object Storage Source Single File Path (One table)

ibmobjectstorage://bucket1/remotePath

Directory Path (one table per file)

ibmobjectstorage://bucket1/remotePath

URI=ibmobjectstorage://bucket/folder1; AuthScheme='HMAC'; AccessKey=token1; SecretKey=secret1; Region='eu-gb';

URI=ibmobjectstorage://bucket/folder1; ApiKey=key1; Region='eu-gb'; AuthScheme=OAuth; InitiateOAuth=GETANDREFRESH;

Hadoop Distributed File System Single File Path (One table)

webhdfs://host:port/remotePath

Directory Path (one table per file)

webhdfs://host:port/remotePath

URI=webhdfs://host:port/folder1
Secure Hadoop Distributed File System Single File Path (One table)

webhdfss://host:port/remotePath

Directory Path (one table per file)

webhdfss://host:port/remotePath

URI=webhdfss://host:port/folder1

Dynamically Detecting Schemas

The following properties control how the Sync App automatically models CSV as tables when you connect:

  • IncludeColumnHeaders: Set this to get column names from the first line of the specified files (the default). Otherwise, the column names are the column numbers.
  • FMT: Set this to the format to be used to parse the text files: CsvDelimited (the default) or TabDelimited.
  • IncludeFiles: Set this to a comma-separated list of file extensions to include into the set of files modelled as tables. (By default, .txt, .tab, and .csv files are modelled.)
  • RowScanDepth: Set this to automatically determine data types by scanning rows up to the specified depth.

When working with local CSV, you can also use Schema.ini files, compatible with the Microsoft Jet driver, to define columns and data types. See Using Schema.ini for a guide.

Customizing Schemas

To customize column data types and other aspects of the schemas, you can save the schemas to static configuration files. The configuration files have a simple format that makes them easy to extend. For more information on extending the Sync App schemas, see Generating Schema Files.

Accessing Sub-Folders

Set the following properties to model subfolders as views:

  • IncludeSubdirectories: Set this to read files and Schema.ini from nested folders. In the case of a name collision, table names are prefixed by underscore-separated folder names. By default this is false.
  • DirectoryRetrievalDepth: Set this to specify how many subfolders will be recursively scanned when IncludeSubdirectories is set. By default, the Sync App scans all subfolders.

When IncludeSubdirectories is set, the automatically detected table names follow the convention below:

File PathRoot\subfolder1\tableARoot\subfolder1\subfolder2\tableA
Table Namesubfolder1_tableAsubfolder1_subfolder2_tableA

CSV Connector for CData Sync

Connecting to Amazon S3

Before You Connect

Obtain AWS Keys

To obtain the credentials for an IAM user, follow the steps below:

  1. Sign into the IAM console.
  2. In the navigation pane, select Users.
  3. To create or manage the access keys for a user, select the user and then go to the Security Credentials tab.

To obtain the credentials for your AWS root account, follow the steps below:

  1. Sign into the AWS Management console with the credentials for your root account.
  2. Select your account name or number and select My Security Credentials in the menu that is displayed.
  3. Click Continue to Security Credentials and expand the "Access Keys" section to manage or create root account access keys.

Connecting to Amazon S3

Specify the following to connect to data:

  • StorageBaseURL: Specify the base S3 service URL if it has a different URL from "amazonaws.com". Make sure to specify the full URL. For example: http://127.0.0.1:9000.
  • AWSRegion: Set this to the region where your CSV data is hosted.

Authenticating to Amazon S3

There are several authentication methods available for connecting to CSV including:

  • Root Credentials
  • AWS Role, as an AWS Role (from an EC2 Instance or by specifying the root credentials)
  • SSO (ADFS, Okta, PingFederate)
  • MFA
  • Temporary Credentials
  • Credentials File

Root Credentials

To authenticate using account root credentials, set the following:

  • AuthScheme: Set this to AwsRootKeys.
  • AWSAccessKey: The access key associated with the AWS root account.
  • AWSSecretKey: The secret key associated with the AWS root account.

Note: Use of this authentication scheme is discouraged by Amazon for anything but simple tests. The account root credentials have the full permissions of the user, making this the least secure authentication method.

EC2 Instances

If you are using the Sync App from an EC2 Instance and have an IAM Role assigned to the instance, you can use the IAM Role to authenticate. To do so, set the following properties to authenticate:

  • AuthScheme: Set this to AwsEC2Roles.
Do not specify AWSAccessKey and AWSSecretKey because the Sync App will automatically obtain your IAM Role credentials and authenticate with them.

If you are also using an IAM role to authenticate, you must additionally specify the following:

  • AWSRoleARN: Specify the Role ARN for the role you'd like to authenticate with. This will cause the Sync App to attempt to retrieve credentials for the specified role.
  • AWSExternalId: Only if required when you assume a role in another account.

IMDSv2 Support

The CSV Sync App now supports IMDSv2. Unlike IMDSv1, the new version requires an authentication token. Endpoints and response are the same in both versions. In IMDSv2, the CSV Sync App first attempts to retrieve the IMDSv2 metadata token and then uses it to call AWS metadata endpoints. If it is unable to retrieve the token, the Sync App reverts to IMDSv1.

AWS IAM Roles

In many situations it may be preferable to use an IAM role for authentication instead of the direct security credentials of an AWS root user.

To authenticate as an AWS role, set the following:

  • AuthScheme: Set this to AwsIAMRoles.
  • AWSRoleARN: Specify the Role ARN for the role you'd like to authenticate with. This will cause the Sync App to attempt to retrieve credentials for the specified role.
  • AWSExternalId: Only if required when you assume a role in another account.
  • AWSAccessKey: The access key of the IAM user to assume the role for.
  • AWSSecretKey: The secret key of the IAM user to assume the role for.

Note: Roles may not be used when specifying the AWSAccessKey and AWSSecretKey of an AWS root user.

ADFS

Set the AuthScheme to ADFS. The following connection properties need to be set:

  • User: Set this to your ADFS username.
  • Password: Set this to your ADFS password.
  • SSOLoginURL: Set this to the login URL used by the SSO provider.
Below is an example connection string:
AuthScheme=ADFS;User=username;Password=password;SSOLoginURL='https://sts.company.com';

ADFS Integrated

To use the ADFS Integrated flow, specify the SSOLoginURL and leave the username and password empty.

Okta

Set the AuthScheme to Okta. The following connection properties are used to authenticate through Okta:

  • User: Set to your Okta user.
  • Password: Set to your Okta password.
  • SSOLoginURL: Set to the login URL used by the SSO provider.
If you are:

  • using a trusted application or proxy that overrides the Okta client request
  • configuring MFA

then you need to use combinations of SSOProperties input parameters to authenticate using Okta. Otherwise, you do not need to set any of these values.

In SSOProperties when required, set these input parameters:

  • APIToken: When authenticating a user via a trusted application or proxy that overrides the Okta client request context, set this to the API Token the customer created from the Okta organization.
  • MFAType: Set this if you have configured the MFA flow. Currently we support the following types: OktaVerify, Email, and SMS.
  • MFAPassCode: Set this only if you have configured the MFA flow. If you set this to empty or an invalid value, the Sync App issues a one-time password challenge to your device or email. After the passcode is received, reopen the connection where the retrieved one-time password value is set to the MFAPassCode connection property.
  • MFARememberDevice: Okta supports remembering devices when MFA is required. If remembering devices is allowed according to the configured authentication policies, the Sync App sends a device token to extend MFA authentication lifetime. This property is, by default, set to True. Set this to False only if you do not want MFA to be remembered.

Example connection string:

AuthScheme=Okta;SSOLoginURL='https://example.okta.com/home/appType/0bg4ivz6cJRZgCz5d6/46';User=oktaUserName;Password=oktaPassword;

PingFederate

Set the AuthScheme to PingFederate. The following connection properties need to be set:

  • User: Set this to the PingFederate user.
  • Password: Set this to PingFederate password for the user.
  • SSOLoginURL: Set this to the login url used by the SSO provider.
  • SSOExchangeUrl: The Partner Service Identifier URI configured in your PingFederate server instance under: SP Connections > SP Connection > WS-Trust > Protocol Settings. This should uniquely identify a PingFederate SP Connection, so it is a good idea to set it to your AWS SSO ACS URL. You can find it under AWS SSO > Settings > View Details next to the Authentication field.
The following SSOProperties are needed to authenticate to PingFederate:
  • AuthScheme (optional): The authorization scheme to be used for the IdP endpoint. The allowed values for this IdP are None or Basic.
Additionally, you can use the following SSOProperties to configure mutual SSL authentication for SSOLoginURL, the WS-Trust STS endpoint:
  • SSLClientCert
  • SSLClientCertType
  • SSLClientCertSubject
  • SSLClientCertPassword
Below is an example connection string:
authScheme=pingfederate;SSOLoginURL=https://mycustomserver.com:9033/idp/sts.wst;SSOExchangeUrl=https://us-east-1.signin.aws.amazon.com/platform/saml/acs/764ef411-xxxxxx;user=admin;password=PassValue;AWSPrincipalARN=arn:aws:iam::215338515180:saml-provider/pingFederate;AWSRoleArn=arn:aws:iam::215338515180:role/SSOTest2;

MFA

For users and roles that require Multi-factor Authentication, specify the following to authenticate:

  • AuthScheme: Set this to AwsMFA.
  • CredentialsLocation: The location of the settings file where MFA credentials are saved. See the Credentials File Location page under Connection String Options for more information.
  • MFASerialNumber: The serial number of the MFA device if one is being used.
  • MFAToken: The temporary token available from your MFA device.
If you are connecting to AWS (instead of already being connected such as on an EC2 instance), you must additionally specify the following:
  • AWSAccessKey: The access key of the IAM user for whom MFA will be issued.
  • AWSSecretKey: The secret key of the IAM user whom MFA will be issued.
If you are also using an IAM role to authenticate, you must additionally specify the following:
  • AWSRoleARN: Specify the Role ARN for the role you'd like to authenticate with. This will cause the Sync App to attempt to retrieve credentials for the specified role using MFA.
  • AWSExternalId: Only if required when you assume a role in another account.
This causes the Sync App to submit the MFA credentials in a request to retrieve temporary authentication credentials.

Note that you can control the duration of the temporary credentials by setting the TemporaryTokenDuration property (default 3600 seconds).

Temporary Credentials

To authenticate using temporary credentials, specify the following:

  • AuthScheme: Set this to TemporaryCredentials.
  • AWSAccessKey: The access key of the IAM user to assume the role for.
  • AWSSecretKey: The secret key of the IAM user to assume the role for.
  • AWSSessionToken: Your AWS session token. This will have been provided alongside your temporary credentials. See AWS Identity and Access Management User Guide for more info.

The Sync App can now request resources using the same permissions provided by long-term credentials (such as IAM user credentials) for the lifespan of the temporary credentials.

If you are also using an IAM role to authenticate, you must additionally specify the following:

  • AWSRoleARN: Specify the Role ARN for the role you'd like to authenticate with. This will cause the Sync App to attempt to retrieve credentials for the specified role.
  • AWSExternalId: Only if required when you assume a role in another account.

Credentials Files

You can use a credentials file to authenticate. Any configurations related to AccessKey/SecretKey authentication, temporary credentials, role authentication, or MFA can be used. To do so, set the following properties to authenticate:

  • AuthScheme: Set this to AwsCredentialsFile.
  • AWSCredentialsFile: Set this to the location of your credentials file.
  • AWSCredentialsFileProfile (optional): Optionally set this to the name of the profile you would like to use from the specified credentials file. If not specified, the profile with the name default will be used.
See AWS Command Line Interface User Guide for more information.

CSV Connector for CData Sync

Connecting to Azure Blob Storage

Before You Connect

To obtain the credentials for an AzureBlob user, follow the steps below:

  1. Sign into the Azure portal with the credentials for your root account.
  2. Click on Storage Accounts and select the storage account you want to use.
  3. Under Settings, click Access keys.
  4. Your storage account name and key will be displayed on that page.

Connecting to Azure Blob Storage

Set the AzureAccessKey connection property to the access key associated with the Azure blob to identify the user.

Authenticating to Azure Blob Storage

You can authenticate to Azure Blob Storage as an Azure AD user, with MSI authentication, or using an Azure Service Principal.

Azure AD

You can authenticate an Azure AD account using either an Azure Access Key or OAuth authentication.

Method 1: Storage Account and Access Key

Set the following to authenticate with an Azure Access Key:

  • AuthScheme: Set this to AzureAD.
  • AzureStorageAccount: Set this to the account associated with the Azure data lake store.
  • AzureAccessKey: Set this to the access key associated with the Azure data lake store.

Method 2: OAuth

Set the following to authenticate with OAuth:

  • AuthScheme: Set this to AzureAD.
  • AzureStorageAccount: Set this to the account associated with the Azure data lake store.

Azure MSI

If you are connecting from an Azure VM with permissions for Azure Blob storage, set the following:

  • AuthScheme: Set this to AzureMSI.
  • AzureStorageAccount: Set this to the account associated with the Azure blob.

Azure Service Principal

If you would like to authenticate with a service principal instead of a client secret, it is also possible to authenticate with a client certificate. Set the following to authenticate:

  • AuthScheme: Set this to AzureServicePrincipal.
  • AzureTenant: Set this to the tenant you wish to connect to.
  • OAuthGrantType: Set this to CLIENT.
  • OAuthClientId: Set this to the Client Id in your app settings.
  • OAuthJWTCert: Set this to the JWT Certificate store.
  • OAuthJWTCertType: Set this to the type of the certificate store specified by OAuthJWTCert.

CSV Connector for CData Sync

Connecting to Azure Data Lake Storage

Connecting to Azure Data Lake Storage

You can authenticate to Azure Data Lake Storage as an Azure AD user, with MSI authentication, or using an Azure Service Principal.

Azure AD

You can authenticate an Azure AD account using either an Azure Access Key or OAuth authentication.

Method 1: Storage Account and Access Key

Set the following to authenticate with an Azure Access Key:

  • AuthScheme: Set this to AzureAD.
  • AzureStorageAccount: Set this to the account associated with the Azure Data Lake store.
  • AzureAccessKey: Set this to the access key associated with the Azure Data Lake store.

Method 2: OAuth

Set the following to authenticate with OAuth:

  • AuthScheme: Set this to AzureAD.
  • AzureStorageAccount: Set this to the account associated with the Azure Data Lake store.

Azure MSI

If you are connecting from an Azure VM with permissions to connect to Azure Data Lake Storage, set the following:

  • AuthScheme: Set this to AzureMSI.
  • AzureStorageAccount: Set this to the account associated with the Azure Data Lake store.

Azure Service Principal

If you would like to authenticate with a service principal instead of a client secret, it is also possible to authenticate with a client certificate.

  • AuthScheme: Set this to AzureServicePrincipal.
  • AzureTenant: Set this to the tenant you wish to connect to.
  • OAuthGrantType: Set this to CLIENT.
  • OAuthClientId: Set this to the Client Id in your app settings.
  • OAuthJWTCert: Set this to the JWT Certificate store.
  • OAuthJWTCertType: Set this to the type of the certificate store specified by OAuthJWTCert.

CSV Connector for CData Sync

Connecting to Box

Connecting to Box

Use the OAuth authentication standard to connect to Box. You can authenticate with a user account or with a service account. A service account is required to grant organization-wide access scopes to the Sync App. The Sync App facilitates these authentication flows as described below.

User Accounts (OAuth)

AuthScheme must be set to OAuth in all user account flows.

Web Applications

When connecting via a Web application, you need to register a custom OAuth app with Box. You can then use the Sync App to get and manage the OAuth token values. See Create a Custom OAuth App for more information.

Get an OAuth Access Token

Set the following connection properties to obtain the OAuthAccessToken:

  • OAuthClientId: Set this to the client Id in your app settings.
  • OAuthClientSecret: Set this to the client secret in your app settings.

Then call stored procedures to complete the OAuth exchange:

  1. Call the GetOAuthAuthorizationURL stored procedure. Set the CallbackURL input to the Redirect URI you specified in your app settings. The stored procedure returns the URL to the OAuth endpoint.

  2. Navigate to the URL that the stored procedure returned in Step 1. Log in, and authorize the web application. After authenticating, the browser redirects you to the redirect URI. There will be a parameter called code appended to the redirect URI. Note the value of this parameter.
  3. Call the GetOAuthAccessToken stored procedure. Set the AuthMode input to WEB. Set the Verifier input to the code parameter in the query string of the redirect URI.

After you have obtained the access and refresh tokens, you can connect to data and refresh the OAuth access token either automatically or manually.

Automatic Refresh of the OAuth Access Token

To have the Sync App automatically refresh the OAuth access token, set the following on the first data connection.

  • InitiateOAuth: Set this to REFRESH.
  • OAuthClientId: Set this to the client Id in your app settings.
  • OAuthClientSecret: Set this to the client secret in your app settings.
  • OAuthAccessToken: Set this to the access token returned by GetOAuthAccessToken.
  • OAuthRefreshToken: Set this to the refresh token returned by GetOAuthAccessToken.
  • OAuthSettingsLocation: Set this to the path where you want the Sync App to save the OAuth values, which persist across connections.

Manual Refresh of the OAuth Access Token

The only value needed to manually refresh the OAuth access token when connecting to data is the OAuth refresh token. Use the RefreshOAuthAccessToken stored procedure to manually refresh the OAuthAccessToken after the ExpiresIn parameter value returned by GetOAuthAccessToken has elapsed, then set the following connection properties:

  • OAuthClientId: Set this to the client Id in your app settings.
  • OAuthClientSecret: Set this to the client secret in your app settings.

Then call RefreshOAuthAccessToken with OAuthRefreshToken set to the OAuth refresh token returned by GetOAuthAccessToken. After the new tokens have been retrieved, open a new connection by setting the OAuthAccessToken property to the value returned by RefreshOAuthAccessToken.

Finally, store the OAuth refresh token so that you can use it to manually refresh the OAuth access token after it has expired.

Authenticate with a Service Account

Set the AuthScheme to OAuthJWT to authenticate with this method.

Service accounts have silent authentication, without user authentication in the browser. You can also use a service account to delegate enterprise-wide access scopes to the Sync App.

You need to create an OAuth application in this flow. See Create a Custom OAuth App to create and authorize an app. You can then connect to Box data that the service account has permission to access.

After setting the following connection properties, you are ready to connect:

  • OAuthClientId: Set to the Client Id in your app settings.
  • OAuthClientSecret: Set to the Client Secret in your app settings.
  • OAuthJWTCertType: Set to "PEMKEY_FILE".
  • OAuthJWTCert: Set to the path to the .pem file you generated.
  • OAuthJWTCertPassword: Set to the password of the .pem file.
  • OAuthJWTCertSubject: Set to "*" to pick the first certificate in the certificate store.
  • OAuthJWTSubjectType: Set to "enterprise" or "user" depending on the Application Access Value you selected in your app settings. The default value of this connection property is "enterprise".
  • OAuthJWTSubject: Set to your enterprise Id if your subject type is set to "enterprise" or your app user Id if your subject type is set to "user".
  • OAuthJWTPublicKeyId: Set to the Id of your public key in your app settings.
When you connect the Sync App completes the OAuth flow for a service account.

CSV Connector for CData Sync

Create a Custom OAuth App

When To Create a Custom OAuth Application

CData embeds OAuth Application Credentials with CData branding that can be used when connecting via a .

You may choose to use your own OAuth Application Credentials when you want to

  • control branding of the Authentication Dialog
  • control the redirect URI that the application redirects the user to after the user authenticates
  • customize the permissions that you are requesting from the user

Create an OAuth App for User Accounts

  1. Log in to your Box developers dashboard and click Create New App. Select your app type (e.g., Custom App).
  2. Select the Standard OAuth 2.0 (User Authentication) authentication method and click View Your App. After creating your app, you can click Configuration from the main menu to access your app settings.
  3. Note the displayed Client ID and Client Secret. You will later need to use these values to populate the OAuthClientId and OAuthClientSecret connection properties.
  4. Set the Redirect URI and store the specified value for later Sync App configuration.
    • When setting up a , set the Redirect URI to http://localhost:33333 or a different port number.
    • When setting up a web app, set the Redirect URI to https://<yourwebappserver:><port>.
  5. Select the scope of user permissions your app will request.

Create an OAuth App for Service Accounts

Follow the steps below to create an OAuth application and generate a private key. You will then authorize the service account.

  1. Log in to your Box developers dashboard and click Create New App. Select your app type (e.g., Custom App).
  2. Select the OAuth 2.0 with JWT (Server Authentication) authentication method, provide an application name, and click Create App. After creating your app, you can click Configuration from the main menu to access your app settings.
  3. Note the displayed Client ID and Client Secret. You will later need to use these values to populate the OAuthClientId and OAuthClientSecret connection properties.
  4. Select the application access level and the scope of user permissions your app will request. The enterprise access level enables you to work with existing users in your enterprise. The application-level setting restricts access to App-type users, users that have only API access.
  5. Generate your RSA keypair. First you need to generate your private key. You can do this by running the following OpenSSL command : openssl genrsa -aes128 -out private_key.pem 2048 (you can install and use the Cygwin package to run the OpenSSL RSA keypair if you are using Windows).
  6. Generate your public key by running the following OpenSSL command: openssl rsa -pubout -in private_key.pem -out public_key.pem. Copy the contents of the generated public_key.pem file and then add it by using the Add and Manage Public Keys option in your app settings.
  7. Authorize the application in the enterprise admin console: Navigate to Apps > Custom Apps Manager > Add App. In the Add App modal window, provide the Client Id and click Next to identify and verify the app.

    Note: If you change the JWT access scopes, you will need to reauthorize the application in the enterprise admin console: Click Apps in the main menu and then select the ellipsis button next to your JWT application name. Select Reauthorize App in the menu.

CSV Connector for CData Sync

Connecting to Dropbox

Connecting to Dropbox

Dropbox uses the OAuth authentication standard.

Dropbox OAuth Scopes

You need to choose between using CData's embedded OAuth app or Create a Custom OAuth App.

TODO -- PUT NEEDED SCOPES HERE

Web Applications

When connecting via a Web application, you need to register a custom OAuth app with Dropbox. You can then use the Sync App to get and manage the OAuth token values. See Create a Custom OAuth App for more information.

Get an OAuth Access Token

Set the following connection properties to obtain the OAuthAccessToken:

  • OAuthClientId: Set this to the noted App key value from your OAuth app settings.
  • OAuthClientSecret: Set this to the App secret from your OAuth app settings.

Then call stored procedures to complete the OAuth exchange:

  1. Call the GetOAuthAuthorizationURL stored procedure. Set the CallbackURL input to the Redirect URI you specified in your app settings. The stored procedure returns the URL to the OAuth endpoint.

  2. Navigate to the URL that the stored procedure returned in Step 1. Log in, and authorize the web application. After authenticating, the browser redirects you to the redirect URI. There will be a parameter called code appended to the redirect URI. Note the value of this parameter.
  3. Call the GetOAuthAccessToken stored procedure. Set the AuthMode input to WEB. Set the Verifier input to the code parameter in the query string of the redirect URI.

After you have obtained the access and refresh tokens, you can connect to data and refresh the OAuth access token either automatically or manually.

Automatic Refresh of the OAuth Access Token

To have the Sync App automatically refresh the OAuth access token, set the following on the first data connection.

  • InitiateOAuth: Set this to REFRESH.
  • OAuthClientId: Set this to the noted App key value from your OAuth app settings.
  • OAuthClientSecret: Set this to the App secret from your OAuth app settings.
  • OAuthAccessToken: Set this to the access token returned by GetOAuthAccessToken.
  • OAuthRefreshToken: Set this to the refresh token returned by GetOAuthAccessToken.
  • OAuthSettingsLocation: Set this to the path where you want the Sync App to save the OAuth values, which persist across connections.

Manual Refresh of the OAuth Access Token

The only value needed to manually refresh the OAuth access token when connecting to data is the OAuth refresh token. Use the RefreshOAuthAccessToken stored procedure to manually refresh the OAuthAccessToken after the ExpiresIn parameter value returned by GetOAuthAccessToken has elapsed, then set the following connection properties:

  • OAuthClientId: Set this to the noted App key value from your OAuth app settings.
  • OAuthClientSecret: Set this to the App secret from your OAuth app settings.

Then call RefreshOAuthAccessToken with OAuthRefreshToken set to the OAuth refresh token returned by GetOAuthAccessToken. After the new tokens have been retrieved, open a new connection by setting the OAuthAccessToken property to the value returned by RefreshOAuthAccessToken.

Finally, store the OAuth refresh token so that you can use it to manually refresh the OAuth access token after it has expired.

CSV Connector for CData Sync

Create a Custom OAuth App

When To Create a Custom OAuth Application

CData embeds OAuth Application Credentials with CData branding that can be used when connecting via a .

You may choose to use your own OAuth Application Credentials when you want to

  • control branding of the Authentication Dialog
  • control the redirect URI that the application redirects the user to after the user authenticates
  • customize the permissions that you are requesting from the user

Create a Custom OAuth App

  1. Log in to your Dropbox developers dashboard and click Create New App. Select the Dropbox API type. Select the Full Dropbox access for your app.
  2. After creating your app, you can view Configuration from the main menu that displays your app settings.
  3. On the app Settings tab, note the values of App key and App secret for later Sync App configuration.
  4. Set the Redirect URI and store the specified value for later Sync App configuration.
    • When setting up a , set the Redirect URI to http://localhost:33333 or a different port number.
    • When setting up a web app, set the Redirect URI to https://<yourwebappserver:><port>.
  5. On the app Permissions tab, select the scope of user permissions your app will request.

No further values need to be specified in the CSV app settings.

CSV Connector for CData Sync

Connecting to Google Cloud Storage

Connecting to Google Cloud Storage

Set the ProjectId property to the Id of the project you want to connect to.

Authenticating to Google Cloud Storage

The Sync App supports using user accounts and GCP instance accounts for authentication.

The following sections discuss the available authentication schemes for Google Cloud Storage:

  • User Accounts (OAuth)
  • Service Account (OAuthJWT)
  • GCP Instance Account

User Accounts (OAuth)

AuthScheme must be set to OAuth in all user account flows.

Desktop Applications

CData provides an embedded OAuth application that simplifies OAuth desktop Authentication. Alternatively, you can create a custom OAuth application. See Create a Custom OAuth App for information about creating custom applications and reasons for doing so.

For authentication, the only difference between the two methods is that you must set two additional connection properties when using custom OAuth applications.

After setting the following connection properties, you are ready to connect:

  • OAuthClientId: (custom applications only) Set this to the Client Id in your custom OAuth application settings.
  • OAuthClientSecret: (custom applications only) Set this to the Client Secret in the custom OAuth application settings.
When you connect the Sync App opens the OAuth endpoint in your default browser. Log in and grant permissions to the application. The Sync App then completes the OAuth process as follows:

  • Extracts the access token from the callback URL.
  • Obtains a new access token when the old one expires.
  • Saves OAuth values in OAuthSettingsLocation that persist across connections.

Web Applications

When connecting via a Web application, you need to create and register a custom OAuth application with Google Cloud Storage. You can then use the Sync App to acquire and manage the OAuth token values. See Create a Custom OAuth App for more information about custom applications.

Get an OAuth Access Token

Set the following connection properties to obtain the OAuthAccessToken:

  • OAuthClientId: Set this to the Client Id in your application settings.
  • OAuthClientSecret: Set this to the Client Secret in your application settings.

Then call stored procedures to complete the OAuth exchange:

  1. Call the GetOAuthAuthorizationURL stored procedure. Set the CallbackURL input to the Callback URL you specified in your application settings. The stored procedure returns the URL to the OAuth endpoint.
  2. Navigate to the URL that the stored procedure returned in Step 1. Log in to the custom OAuth application and authorize the web application. Once authenticated, the browser redirects you to the callback URL.
  3. Call the GetOAuthAccessToken stored procedure. Set AuthMode to WEB and the Verifier input to the "code" parameter in the query string of the callback URL.

Once you have obtained the access and refresh tokens, you can connect to data and refresh the OAuth access token either automatically or manually.

Automatic Refresh of the OAuth Access Token

To have the driver automatically refresh the OAuth access token, set the following on the first data connection:

  • InitiateOAuth: Set this to REFRESH.
  • OAuthClientId: Set this to the Client Id in your application settings.
  • OAuthClientSecret: Set this to the Client Secret in your application settings.
  • OAuthAccessToken: Set this to the access token returned by GetOAuthAccessToken.
  • OAuthRefreshToken: Set this to the refresh token returned by GetOAuthAccessToken.
  • OAuthSettingsLocation: Set this to the path where the Sync App saves the OAuth token values, which persist across connections.
On subsequent data connections, the values for OAuthAccessToken and OAuthRefreshToken are taken from OAuthSettingsLocation.

Manual Refresh of the OAuth Access Token

The only value needed to manually refresh the OAuth access token when connecting to data is the OAuth refresh token.

Use the RefreshOAuthAccessToken stored procedure to manually refresh the OAuthAccessToken after the ExpiresIn parameter value returned by GetOAuthAccessToken has elapsed, then set the following connection properties:

  • OAuthClientId: Set this to the Client Id in your application settings.
  • OAuthClientSecret: Set this to the Client Secret in your application settings.

Then call RefreshOAuthAccessToken with OAuthRefreshToken set to the OAuth refresh token returned by GetOAuthAccessToken. After the new tokens have been retrieved, open a new connection by setting the OAuthAccessToken property to the value returned by RefreshOAuthAccessToken.

Finally, store the OAuth refresh token so that you can use it to manually refresh the OAuth access token after it has expired.

Headless Machines

To configure the driver, use OAuth with a user account on a headless machine. You need to authenticate on another device that has an internet browser.

  1. Choose one of two options:
    • Option 1: Obtain the OAuthVerifier value as described in "Obtain and Exchange a Verifier Code" below.
    • Option 2: Install the Sync App on a machine with an internet browser and transfer the OAuth authentication values after you authenticate through the usual browser-based flow.
  2. Then configure the Sync App to automatically refresh the access token on the headless machine.

Option 1: Obtain and Exchange a Verifier Code

To obtain a verifier code, you must authenticate at the OAuth authorization URL.

Follow the steps below to authenticate from the machine with an internet browser and obtain the OAuthVerifier connection property.

  1. Choose one of these options:
    • If you are using the Embedded OAuth Application click Google Cloud Storage OAuth endpoint to open the endpoint in your browser.
    • If you are using a custom OAuth application, create the Authorization URL by setting the following properties:
      • InitiateOAuth: Set to OFF.
      • OAuthClientId: Set to the client Id assigned when you registered your application.
      • OAuthClientSecret: Set to the client secret assigned when you registered your application.
      Then call the GetOAuthAuthorizationURL stored procedure with the appropriate CallbackURL. Open the URL returned by the stored procedure in a browser.
  2. Log in and grant permissions to the Sync App. You are then redirected to the callback URL, which contains the verifier code.
  3. Save the value of the verifier code. Later you will set this in the OAuthVerifier connection property.
Next, you need to exchange the OAuth verifier code for OAuth refresh and access tokens. Set the following properties:

On the headless machine, set the following connection properties to obtain the OAuth authentication values:

  • InitiateOAuth: Set this to REFRESH.
  • OAuthVerifier: Set this to the verifier code.
  • OAuthClientId: (custom applications only) Set this to the Client Id in your custom OAuth application settings.
  • OAuthClientSecret: (custom applications only) Set this to the Client Secret in the custom OAuth application settings.
  • OAuthSettingsLocation: Set this to persist the encrypted OAuth authentication values to the specified file.

After the OAuth settings file is generated, you need to re-set the following properties to connect:

  • InitiateOAuth: Set this to REFRESH.
  • OAuthClientId: (custom applications only) Set this to the client Id assigned when you registered your application.
  • OAuthClientSecret: (custom applications only) Set this to the client secret assigned when you registered your application.
  • OAuthSettingsLocation: Set this to the file containing the encrypted OAuth authentication values. Make sure this file gives read and write permissions to the Sync App to enable the automatic refreshing of the access token.

Option 2: Transfer OAuth Settings

Prior to connecting on a headless machine, you need to create and install a connection with the driver on a device that supports an internet browser. Set the connection properties as described in "Desktop Applications" above.

After completing the instructions in "Desktop Applications", the resulting authentication values are encrypted and written to the path specified by OAuthSettingsLocation. The default filename is OAuthSettings.txt.

Once you have successfully tested the connection, copy the OAuth settings file to your headless machine.

On the headless machine, set the following connection properties to connect to data:

  • InitiateOAuth: Set this to REFRESH.
  • OAuthClientId: (custom applications only) Set this to the client Id assigned when you registered your application.
  • OAuthClientSecret: (custom applications only) Set this to the client secret assigned when you registered your application.
  • OAuthSettingsLocation: Set this to the path to your OAuth settings file. Make sure this file gives read and write permissions to the Sync App to enable the automatic refreshing of the access token.

GCP Instance Accounts

When running on a GCP virtual machine, the Sync App can authenticate using a service account tied to the virtual machine. To use this mode, set AuthScheme to GCPInstanceAccount.

CSV Connector for CData Sync

Create a Custom OAuth App

Introduction

You can use a custom OAuth app to authenticate a service account or a user account. You can always create a custom OAuth application, but note that desktop and headless connections support embedded OAuth, which simplifies the process of authentication.

When To Create a Custom OAuth Application

CData embeds OAuth Application Credentials with CData branding that can be used when connecting via either a Desktop Application or from a Headless Machine.

You may choose to use your own OAuth Application Credentials when you want to

  • control branding of the Authentication Dialog
  • control the redirect URI that the application redirects the user to after the user authenticates
  • customize the permissions that you are requesting from the user

Enable the

Follow these steps to enable the :

  1. Navigate to the Google Cloud Console.
  2. Select Library from the left-hand navigation menu. This opens the Library page.
  3. In the search field, enter "" and select from the search results.
  4. On the page, click ENABLE.

Create an OAuth Application for User Accounts (OAuth)

When using AuthScheme=OAuth, and you're using a web application, you must create an OAuth Client ID Application. For desktop and headless flows, creating a custom OAuth application is optional.

Follow these steps to create a custom OAuth application:

  1. Navigate to the Google Cloud Console.
  2. If you have not done so, follow the steps in the console to create an OAuth consent screen.
  3. Select Credentials from the left-hand navigation menu.
  4. On the Credentials page, select Create Credentials > OAuth Client ID.
  5. In the Application Type menu, select Web application.
  6. Specify a name for your OAuth custom web application.
  7. Under Authorized redirect URIs, click ADD URI and enter a redirect URI. Press Enter.
  8. Click CREATE, which returns you to the Credentials page.
  9. A window opens that displays your client Id and client secret. Although the client secret is accessible from from the Google Cloud Console, we recommend you write down the client secret. You need both the client secret and client Id to specify the OAuthClientId and OAuthClientSecret connection properties.

Create an OAuth Application for Service Accounts (OAuthJWT)

When using AuthScheme=OAuthJWT, you must create a Service Account Application. Follow these steps:

  1. Navigate to the Google Cloud Console.
  2. If you have not done so, follow the steps in the console to create an OAuth consent screen.
  3. Select Credentials from the left-hand navigation menu.
  4. On the Credentials page, select Create Credentials > Service account.
  5. On the Create service account page, enter the Service account name, the Service account ID, and, optionally, a description.
  6. Click DONE. This returns you to the Credentials page.

CSV Connector for CData Sync

Connecting to Google Drive

Authenticating to Google Drive

The Sync App supports using user accounts and GCP instance accounts for authentication.

The following sections discuss the available authentication schemes for Google Drive:

  • User Accounts (OAuth)
  • Service Account (OAuthJWT)
  • GCP Instance Account

User Accounts (OAuth)

AuthScheme must be set to OAuth in all user account flows.

Web Applications

When connecting via a Web application, you need to create and register a custom OAuth application with Google Drive. You can then use the Sync App to acquire and manage the OAuth token values. See Create a Custom OAuth App for more information about custom applications.

Get an OAuth Access Token

Set the following connection properties to obtain the OAuthAccessToken:

  • OAuthClientId: Set this to the Client Id in your application settings.
  • OAuthClientSecret: Set this to the Client Secret in your application settings.

Then call stored procedures to complete the OAuth exchange:

  1. Call the GetOAuthAuthorizationURL stored procedure. Set the CallbackURL input to the Callback URL you specified in your application settings. The stored procedure returns the URL to the OAuth endpoint.
  2. Navigate to the URL that the stored procedure returned in Step 1. Log in to the custom OAuth application and authorize the web application. Once authenticated, the browser redirects you to the callback URL.
  3. Call the GetOAuthAccessToken stored procedure. Set AuthMode to WEB and the Verifier input to the "code" parameter in the query string of the callback URL.

Once you have obtained the access and refresh tokens, you can connect to data and refresh the OAuth access token either automatically or manually.

Automatic Refresh of the OAuth Access Token

To have the driver automatically refresh the OAuth access token, set the following on the first data connection:

  • InitiateOAuth: Set this to REFRESH.
  • OAuthClientId: Set this to the Client Id in your application settings.
  • OAuthClientSecret: Set this to the Client Secret in your application settings.
  • OAuthAccessToken: Set this to the access token returned by GetOAuthAccessToken.
  • OAuthRefreshToken: Set this to the refresh token returned by GetOAuthAccessToken.
  • OAuthSettingsLocation: Set this to the path where the Sync App saves the OAuth token values, which persist across connections.
On subsequent data connections, the values for OAuthAccessToken and OAuthRefreshToken are taken from OAuthSettingsLocation.

Manual Refresh of the OAuth Access Token

The only value needed to manually refresh the OAuth access token when connecting to data is the OAuth refresh token.

Use the RefreshOAuthAccessToken stored procedure to manually refresh the OAuthAccessToken after the ExpiresIn parameter value returned by GetOAuthAccessToken has elapsed, then set the following connection properties:

  • OAuthClientId: Set this to the Client Id in your application settings.
  • OAuthClientSecret: Set this to the Client Secret in your application settings.

Then call RefreshOAuthAccessToken with OAuthRefreshToken set to the OAuth refresh token returned by GetOAuthAccessToken. After the new tokens have been retrieved, open a new connection by setting the OAuthAccessToken property to the value returned by RefreshOAuthAccessToken.

Finally, store the OAuth refresh token so that you can use it to manually refresh the OAuth access token after it has expired.

GCP Instance Accounts

When running on a GCP virtual machine, the Sync App can authenticate using a service account tied to the virtual machine. To use this mode, set AuthScheme to GCPInstanceAccount.

CSV Connector for CData Sync

Create a Custom OAuth App

The Sync App facilitates the following OAuth authentication flows:

  • The user consent flow enables individual users to connect to their own data.
  • The service account flow enables access to domain-wide data.

Using a User Account to Connect to Google

This OAuth flow requires the authenticating user to interact with Google using the browser. The Sync App facilitates this in various ways as described below.

Authenticate to Google

When you connect the Sync App opens the OAuth endpoint in your default browser. Log in and grant permissions to the application. The Sync App then completes the OAuth process:

  1. Extracts the access token from the callback URL and authenticates requests.
  2. Refreshes the access token when it expires.
  3. Saves OAuth values to be persisted across connections.

Authenticate from a Web Application

When connecting via a Web application or if the Sync App is not authorized to open a browser window, you exchange a verifier code for the access token.

To begin, you need to register an OAuth app with Google and set the following connection properties.

  • OAuthClientId: Set this to the client Id in your app settings.
  • OAuthClientSecret: Set this to the client secret in your app settings.

Once you have registered an app and set OAuthClientId and OAuthClientSecret you can exchange a verifier code for the access token.

  1. Call GetOAuthAuthorizationURL. The stored procedure returns the URL of the OAuth endpoint.
  2. Log in at the OAuth endpoint and authorize the application. You are redirected back via the callback URL.

    The verifier code is appended to the callback URL in a query string parameter named "code". Extract the verifier code.

  3. Call GetOAuthAccessToken.
To connect to data, set OAuthAccessToken. When the access token expires, call RefreshOAuthAccessToken.

Using a Service Account to Connect to Domain-Wide Data

You can use a service account in this OAuth flow to access Google APIs on behalf of users in a domain. A domain administrator can delegate domain-wide access to the service account.

To complete the service account flow, generate a private key in the Google APIs Console. In the service account flow, the Sync App exchanges a JSON Web token (JWT) for the OAuthAccessToken. The private key is required to sign the JWT. The OAuthAccessToken authenticates that the Sync App has the same permissions granted to the service account.

Generate a Private Key

Follow the steps below to generate a private key and obtain the credentials for your application:

  1. Log into the Google API Console.
  2. Click Create Project or select an existing project.
  3. In the API Manager, click Credentials -> Create Credentials -> Service Account Key. In the Service Account menu, select New Service Account or select an existing service account. In the Key Type section, select the P12 key type.
  4. Click Create to download the key pair. The private key's password is displayed: Set this in OAuthJWTCertPassword.
  5. In the Service Account Keys section on the Credentials page, click Manage Service Accounts and set OAuthJWTIssuer to the email address displayed in service account Id.
  6. Click Library -> Google Drive API -> Enable API.

Service Accounts

After setting the following connection properties, you are ready to connect:

  • InitiateOAuth: Set this to GETANDREFRESH. You can use InitiateOAuth to avoid repeating the OAuth exchange and manually setting the OAuthAccessToken connection property.
  • OAuthJWTCertType: Set this to "PFXFILE".
  • OAuthJWTCertPassword: Set this to the password of the .p12 file.
  • OAuthJWTCertSubject: Set this to "*" to pick the first certificate in the certificate store.
  • OAuthJWTIssuer: Set this to the email address of the service account.
  • OAuthJWTCert: Set this to the path to the .p12 file.
  • OAuthJWTSubject: Set this to the email address of the user for whom the application is requesting delegate access.
When you connect the Sync App completes the OAuth flow for a service account:
  1. Creates and signs the JWT with the claim set required by the Sync App.
  2. Exchanges the JWT for the access token.
  3. Submits the JWT for a new access token when the token expires.

CSV Connector for CData Sync

Connecting to HTTP Streams

Authenticating to HTTP(S)

Basic

AuthScheme: Set this to Basic.

Digest

AuthScheme: Set this to Digest.

OAuth

AuthScheme: Set this to OAuth.

OAuthJWT

AuthScheme: Set this to OAuthJWT.

OAuthPassword

AuthScheme: Set this to OAuthPassword.

OAuthClient

AuthScheme: Set this to OAuthClient.

OAuthPKCE

AuthScheme: Set this to OAuthPKCE.

CSV Connector for CData Sync

Connecting to IBM Object Storage

Before You Connect

Register a New Instance of Cloud Object Storage

If you do not already have Cloud Object Storage in your IBM Cloud account, you can follow the procedure below to install an instance of SQL Query in your account:

  1. Log in to your IBM Cloud account.
  2. Navigate to the Cloud Object Storage page, choose a name for your instance and click Create. You will be redirected to the instance of Cloud Object Storage you just created.

API Key

To connect with IBM Cloud Object Storage, you will need an ApiKey. You can obtain this as follows:

  1. Log in to your IBM Cloud account.
  2. Navigate to the Platform API Keys page.
  3. On the middle-right corner click Create an IBM Cloud API Key to create a new API Key.
  4. In the pop-up window, specify the API Key name and click Create. Note the ApiKey as you can never access it again from the dashboard.

Connecting to IBM Cloud Object Storage

You can authenticate to IBM Cloud Object Storage using either HMAC or OAuth authentication.

HMAC

Set the following properties to authenticate:

  • AccessKey: Set this to an IBM Access Key (a username).
  • SecretKey: Set this to an IBM Secret Key.
For example:
ConnectionType=IBM Object Storage Source;URI=ibmobjectstorage://bucket1/folder1; AccessKey=token1; SecretKey=secret1; Region=eu-gb;
Optionally, specify Region in addition.

OAuth

Set the following to authenticate using OAuth authentication.

  • AuthScheme: Set this to OAuth.
  • ApiKey: Set this to the IBM API Key noted during setup.
  • Region: Set this property to your IBM instance region.
For example:
ConnectionType=IBM Object Storage Source;URI=ibmobjectstorage://bucket1/folder1; ApiKey=key1; Region=eu-gb; AuthScheme=OAuth; InitiateOAuth=GETANDREFRESH;

When you connect, the Sync App completes the OAuth process.

CSV Connector for CData Sync

Connecting to OneDrive

Authenticating to CSV

CSV uses the OAuth authentication standard. To authenticate using OAuth, you will need to create an app to obtain the OAuthClientId, OAuthClientSecret, and CallbackURL connection properties. AZUREOAUTHentazuread AZUREOAUTHentazureserviceprincipalinfo AZUREOAUTHentmsiauth

CSV Connector for CData Sync

Connecting to SFTP

Connecting to SFTP

None

SSHAuthMode: Set this to None.

Password

SSHAuthMode: Set this to Password.

Public_Key

SSHAuthMode: Set this to Public_Key.

CSV Connector for CData Sync

Connecting to SharePoint Online

TODO

Connecting to SharePoint Online SOAP

Set the URI to a document library containing CSV files. To authenticate, set User and Password and StorageBaseURL.

For example:

Note that this connection method may not work if the StorageBaseURL ends with "-my.sharepoint.com". You should use the onedrive:// scheme when connecting to these sites because they do not support the components that of SharePoint that the Sync App needs to download files.

TODO

Connecting to SharePoint Online REST

Set the URI to a document library containing CSV files. StorageBaseURL is optional. If not provided, the driver will work with the root drive. To authenticate, use the OAuth authentication standard.

For example:

Note that this connection method may not work if the StorageBaseURL ends with "-my.sharepoint.com". You should use the onedrive:// scheme when connecting to these sites because they do not support the components that of SharePoint that the Sync App needs to download files.

CSV Connector for CData Sync

SSO Connections

Authenticating with SSO

Service provider Okta OneLogin ADFS AzureAD
Amazon S3 Y Y Y
Azure Blob Storage
Azure Data Lake Store Gen1
Azure Data Lake Store Gen2
Azure Data Lake Store Gen2 with SSL
Google Drive
OneDrive
Box
Dropbox
SharePoint Online SOAP Y Y Y
SharePoint Online REST
Wasabi
Google Cloud Storage
Oracle Cloud Storage
Azure File

AzureAD

Azure AD Configuration

The main theme behind this configuration is the OAuth 2.0 On-Behalf-Of flow. It requires two Azure AD applications:

  1. An application used for the single sign-on process to a specific service provider.
    • Amazon S3: Please follow this link for detailed instructions on how to create this application. Make sure you test the connection and you are able to login to the AWS console from Azure AD.

      Save the step "Assign the Azure AD test user" until after provisioning so that you can select the AWS roles when assigning the user.

  2. A "connector" application with user_impersonation permission on the SSO application you created in the previous step. Go to Azure Active Directory > App registrations and register a new application. After you register this application, you need to allow it to make API calls to the SSO application. Go to the API permissions section of the app you registered and click the "Add a permission" box. Select the API of your SSO application by specifying the API name or Application Id and add the user_impersonation permission.

CData Driver Common Properties

The following SSOProperties are needed to authenticate to Azure Active Directory and must be specified for every service provider.

  • Resource: The application Id URI of the SSO application, listed in the Overview section of the app registration.
  • Tenant: The Id of the Azure AD tenant where the applications are registered. You can find this value using the instructions found here.

We will retrieve the SSO SAML response from an OAuth 2.0 On-Behalf-Of flow so the following OAuth connection properties must be specified:

  • OAuthClientId: The application Id of the connector application, listed in the Overview section of the app registration.
  • OAuthClientSecret: The client secret value of the connector application. Azure AD displays this when you create a new client secret (Certificates & secrets section).

Amazon S3

In addition to the common properties, the following properties must be specified when connecting to Amazon S3 service provider:

  • AuthScheme: Set the AuthScheme to AzureAD.
  • AWSRoleARN: The ARN of the IAM role. Find this on the Summary page of the IAM role.
  • AWSPrincipalARN: The ARN of the identity provider. Find this on the identity provider's summary page.
The following is an example connection string:
AuthScheme=AzureAD;InitiateOAuth=GETANDREFRESH;OAuthClientId=d593a1d-ad89-4457-872d-8d7443aaa655;OauthClientSecret=g9-oy5D_rl9YEKfN-45~3Wm8FgVa2F;SSOProperties='Tenant=94be7-edb4-4fda-ab12-95bfc22b232f;Resource=https://signin.aws.amazon.com/saml;';AWSRoleARN=arn:aws:iam::2153385180:role/AWS_AzureAD;AWSPrincipalARN=arn:aws:iam::215515180:saml-provider/AzureAD;

OneLogin

OneLogin Configuration

You must create an application used for the single sign-on process to a specific provider.

  • Sharepoint SOAP: Please follow this link for detailed instructions on how to create this application. Make sure you test the connection and you are able to login to Office 365 from OneLogin. Make sure you have enabled WS-TRUST in your application. Otherwise, the CData driver will not be able to connect.

Sharepoint SOAP

The following properties must be specified when connecting to Sharepoint SOAP service provider:

  • AuthScheme: Set the AuthScheme to OneLogin.
  • User: The username of the OneLogin account.
  • Password: The password of the OneLogin account.
  • SSOProperties:
    • Domain (optional): It may be required to be set this property if the domain configured on the SSO domain is different than the domain of the User.
The following is an example connection string:
AuthScheme='OneLogin';User=test;Password=test;SSOProperties='Domain=test.cdata;';

Okta

Okta Configuration

You must create an application used for the single sign-on process to a specific provider.

  • Sharepoint SOAP: Please follow this link for detailed instructions on how to create this application and configure SSO. Make sure you test the connection and you are able to login to Office 365 from Okta. Make sure you have configured SSO using WS-Federation in your application. Otherwise, the CData driver will not be able to connect.
  • Amazon S3: Please follow this link for detailed instructions on how to create this application and configure SSO. Make sure you test the connection and you are able to login to AWS from Okta. Make sure you have configured SSO with SAML 2.0 in your application. Otherwise, the CData driver will not be able to connect. Ensure that the assigned AWS role in the Okta app has access to the S3 bucket you want to connect.

Sharepoint SOAP

The following properties must be specified when connecting to Sharepoint SOAP service provider:

  • AuthScheme: Set the AuthScheme to Okta.
  • User: The username of the Okta account.
  • Password: The password of the Okta account.
  • SSOProperties:
    • Domain (optional): It may be required to be set this property if the domain configured on the SSO domain is different than the domain of the User.
The following is an example connection string:
AuthScheme='Okta';User=test;Password=test;SSOProperties='Domain=test.cdata;';

Amazon S3

The following properties must be specified when connecting to an Amazon S3 service provider:

  • AuthScheme: Set the AuthScheme to Okta.
  • User: The username of the Okta account.
  • Password: The password of the Okta account.
  • SSOLoginURL: Set this to the embedded URL of your AWS Okta SSO app.
  • AWSRoleARN (optional): The ARN of the IAM role. Find this on the Summary page of the IAM role.
  • AWSPrincipalARN (optional): The ARN of the identity provider. Find this on the identity provider's summary page.
  • SSOProperties:
    • APIToken (optional): Set this to the API Token that the customer created from the Okta org. It should be used when authenticating a user via a trusted application or proxy that overrides Okta client request context.
The following is an example connection string:
AuthScheme=Okta;User=OktaUser;Password=OktaPassword;SSOLoginURL='https://{subdomain}.okta.com/home/amazon_aws/0oan2hZLgQiy5d6/272';

ADFS

ADFS Configuration

You must create an application used for the single sign-on process to a specific provider.

  • Sharepoint SOAP: Please follow this link for detailed instructions on how to set up ADFS for Office 365 for Single Sign-On. Make sure you test the connection and you are able to login to Office 365 from ADFS.
  • Amazon S3: Please follow this link for detailed instructions on how to set up ADFS for AWS Single Sign-On. Make sure you test the connection and you are able to login to AWS from ADFS.

Sharepoint SOAP

The following properties must be specified when connecting to a Sharepoint SOAP service provider:

  • AuthScheme: Set the AuthScheme to ADFS.
  • User: The username of the ADFS account.
  • Password: The password of the ADFS account.
  • SSOProperties:
    • Domain (optional): It may be required to be set this property if the domain configured on the SSO domain is different than the domain of the User.
The following is an example connection string:
AuthScheme='ADFS';User=test;Password=test;SSOProperties='Domain=test.cdata;';

Amazon S3

The following properties must be specified when connecting to a Sharepoint SOAP service provider:

  • AuthScheme: Set the AuthScheme to ADFS.
  • SSOLoginURL: Set this to the URL of your ADFS instance.
  • User: The username of the ADFS account.
  • Password: The password of the ADFS account.
  • AWSRoleARN (optional): The ARN of the IAM role. Find this on the Summary page of the IAM role.
  • AWSPrincipalARN (optional): The ARN of the identity provider. Find this on the identity provider's summary page.
The following is an example connection string:
AuthScheme=ADFS;User=username;Password=password;SSOLoginURL='https://sts.company.com';
ADFS Integrated

The ADFS Integrated flow indicates you are connecting with the currently logged in Windows user credentials. To use the ADFS Integrated flow, simply do not specify the User and Password, but otherwise follow the same steps in the ADFS guide above.

CSV Connector for CData Sync

Using Kerberos

This section shows how to use the Sync App to authenticate using Kerberos.

Kerberos

To authenticate to CSV using Kerberos, set the following properties:

  • AuthScheme: Set this to NEGOTIATE.
  • KerberosKDC: Set this to the host name or IP Address of your Kerberos KDC machine.
  • KerberosSPN: Set this to the service and host of the CSV Kerberos Principal. This is the value prior to the '@' symbol (for instance, ServiceName/MyHost) of the principal value (for instance, ServiceName/[email protected]).

Retrieve the Kerberos Ticket

You can use one of the following options to retrieve the required Kerberos ticket.

MIT Kerberos Credential Cache File

This option enables you to use the MIT Kerberos Ticket Manager or kinit command to get tickets. Note that you do not need to set the User or Password connection properties with this option.

  1. Ensure that you have an environment variable created called KRB5CCNAME.
  2. Set the KRB5CCNAME environment variable to a path pointing to your credential cache file (for instance, C:\krb_cache\krb5cc_0 or /tmp/krb5cc_0). This file is created when generating your ticket with MIT Kerberos Ticket Manager.
  3. To obtain a ticket, open the MIT Kerberos Ticket Manager application, click Get Ticket, enter your principal name and password, then click OK. If successful, ticket information appears in Kerberos Ticket Manager and is stored in the credential cache file.
  4. Now that you have created the credential cache file, the Sync App uses the cache file to obtain the Kerberos ticket to connect to CSV.

As an alternative to setting the KRB5CCNAME environment variable, you can directly set the file path using the KerberosTicketCache property. When set, the Sync App uses the specified cache file to obtain the Kerberos ticket to connect to CSV.

Keytab File

If the KRB5CCNAME environment variable has not been set, you can retrieve a Kerberos ticket using a Keytab File. To do so, set the User property to the desired username and set the KerberosKeytabFile property to a file path pointing to the keytab file associated with the user.

User and Password

If both the KRB5CCNAME environment variable and the KerberosKeytabFile property have not been set, you can retrieve a ticket using a user and password combination. To do this, set the User and Password properties to the user/password combination that you use to authenticate with CSV.

Cross-Realm

More complex Kerberos environments may require cross-realm authentication where multiple realms and KDC servers are used (e.g., where one realm/KDC is used for user authentication and another realm/KDC is used for obtaining the service ticket).

In such an environment, set the KerberosRealm and KerberosKDC properties to the values required for user authentication. Also set the KerberosServiceRealm and KerberosServiceKDC properties to the values required to obtain the service ticket.

CSV Connector for CData Sync

Fine-Tuning Data Access

Resource location

The URI should be used to specify a CSV resource location. Set the URI property to specify one of the following sources:
  • An empty value automatically assigns the URI to a reference to the current directory, "./". The explicit path to the CSV folders depends on the environment of the running application.
  • A path to a folder.
  • A path to a file or stream - in this case you can query the file by executing SELECT * FROM streamedtable.

Modeling tables

Set the following properties to control how the Sync App models CSV as tables:

  • IncludeColumnHeaders: Set this to get column names from the first line of the specified files (the default). Otherwise, the column names are the column numbers.
  • FMT: Set this to the format to be used to parse the text files: CsvDelimited (the default) or TabDelimited.
  • IncludeFiles: Set this to a comma-separated list of file extensions to include into the set of files modelled as tables. (By default, .txt, .tab, and .csv files are modelled.)
  • RowScanDepth: Set this to automatically determine data types by scanning rows up to the specified depth.

CSV Connector for CData Sync

Modeling CSV Data

The CData Sync App hides the complexity of processing local and remote CSV data, from connecting over wire protocols to modeling the data as tables. However, you also have control over these layers.

Customizing Automatic Schema Discovery

The Sync App dynamically derives schemas from CSV based on the connection properties specified. The available connection properties give you control over many aspects of how CSV data is modeled as tables. See Connecting to CSV Data Sources for more information on configuring the connection. When working with local CSV, you can also configure the column definitions and file format with Schema.ini, the configuration used by the Microsoft Jet driver.

For more granular control over the columns reported and other aspects of modeling the data as tables, you can define your own schemas or extend the generated ones. Schemas are defined in extendable configuration files. See Generating Schema Files to save the detected schemas to configuration files, which you can then easily edit.

The following sections show how to customize schemas or write your own from scratch.

Authoring Custom Schemas

Tables and views are defined by authoring schema files in API Script. API Script is a simple configuration language that allows you to define the columns and the behavior of the table. It also has built-in operations that enable you to process CSV.

In addition to these data processing primitives, API Script is a full-featured language with constructs for conditionals, looping, etc. However, as shown by the example schema, for most table definitions you will not need to use these features.

Below is a fully functional table schema that models the Person entity in the popular Northwind sample database. It contains all the components you will need to access your data source through SQL. You can find more information on using these components in Column Definitions and SELECT Execution.

<api:script>
  <!-- See Column Definitions to define column behavior. -->
   <api:info title="CSVPersons" desc="Parse the CSV Persons feed.">
    <attr name="ID"           xs:type="int" key="true"  />
    <attr name="EmployeeID"   xs:type="int"             />
    <attr name="Name"         xs:type="string"          />
    <attr name="TotalExpense" xs:type="double"          />
    <attr name="HireDate"     xs:type="datetime"        />
    <attr name="Salary"       xs:type="int"             />
  </api:info>

  <api:set attr="uri" value="http://pathtocsvstream" /> 
  
  <!-- The GET method corresponds to SELECT. The results of processing are pushed to the schema's output. See SELECT Execution for more information. -->
  <api:script method="GET" >
    <api:call  op="csvproviderGet"/>
  </api:script>

  <!-- Not implemented -->
  <api:script method="POST">
    <api:call op="csvproviderInsert">
      <api:push/>
    </api:call>
  </api:script>

  <!-- Not implemented -->
  <api:script method="MERGE">
    <api:call op="csvproviderUpdate">
      <api:push/>
    </api:call>
  </api:script>

  <!-- Not implemented -->
  <api:script method="DELETE">
    <api:call op="csvproviderDelete">
      <api:push/>
    </api:call>
  </api:script>
</api:script>

CSV Connector for CData Sync

Using Schema.ini

In the Schema.ini file you can specify the format of a text file you want to model as a table and you can also define the columns of the table. Schema.ini must be located in the folder specified in the URI -- or, if IncludeSubdirectories is set, Schema.ini can be defined in each subfolder.

To allow you to define a Schema.ini only when necessary, you can also use IncludeFiles and ExtendedProperties.

ExtendedProperties is compatible with Microsoft Jet OLE DB 4.0. The format for all text files can be set in ExtendedProperties. Schema.ini overrides ExtendedProperties for a specific file.

Files specified in Schema.ini are reported as tables in addition to files included by IncludeFiles. The Sync App uses a definition in Schema.ini if one exists and the filename otherwise to report the table.

Defining Tables in Schema.ini

A section in Schema.ini must begin with the file name enclosed in square brackets. For example:

[Jerrie's travel expense.txt]

Specifying the File Format

After adding a file name entry, you can set the Format property to the format of the file. The possible values are the following:

  • CSVDelimited
  • TabDelimited
  • Delimited(custom character)
For example, the following is equivalent to CSVDelimited:
Format=Delimited(,)
Note: By default, .txt files are processed as CSV files with headers.

Defining Columns

There are two ways to define columns based on the fields in your text files:

  • Define the column names in the file's first row, the header row. When you connect the Sync App determines the data type.
  • Define the column number, name, data type, and width in Schema.ini. Columns defined this way override columns initially accepted from the header row. You may also ignore a file's header row by specifying "ColNameHeader=False" in the file's section in Schema.ini.

To define a column in Schema.ini, use the following format:

Coln=ColumnName DataType [Width Width]

For example:

Col2=A Text Width 100 
Note: If format is set to fixed length, then defining the width of each column is mandatory.

Schema.ini Example

Below is an example Schema.ini:
[Jerrie's travel expense.csv] 
ColNameHeader=True 
Format=Delimited(,) 
Col1=Date Text 
Col2=A Text 
Col3=B Text 
Col4=C Text 
Col5=Total Text
Col6=Date Text 
Col7=D Text
Col8=E Text 
Col9=F Text 
Col10=G Text
Col11=rate numeric

[invoices.csv] 
ColNameHeader=True 
Format=Delimited(,) 
Col1=id numeric 
Col2=invoicedate date 
Col3=total numeric

Supported Data Types

Data types can be any of the following:

  • binary
  • byte
  • boolean
  • date
  • time
  • datetime
  • decimal
  • double
  • tinyint
  • smallint
  • integer
  • bigint
  • float
  • string
  • text
  • longtext
  • char
  • varchar
  • nvarchar

CSV Connector for CData Sync

Generating Schema Files

The CData Sync App enables you to persist schema definitions to configuration files. Schema files make it easy to customize and save the dynamically detected schemas, or to define your own view of the data.

The following sections show how to use the GenerateSchemaFiles property to save the table definitions detected based on the connection string. Alternatively, you can invoke the CreateSchema stored procedure to manually generate a schema file based on the provided input parameters.

After creating a schema, see Modeling CSV Data for more information on extending table schemas to gain further control over data types and other aspects of modeling CSV as tables.

Using the GenerateSchemaFiles Connection Property

Set the following additional connection properties to generate table schemas for local or remote CSV:

  • GenerateSchemaFiles: Set this to generate a schema file for the table determined by the connecting properties outlined in Connecting to CSV Data Sources. A value of OnUse will generate the schema when you execute a SELECT query to the CSV. Set this to OnStart to generate schemas when you connect. If a schema file with the same name already exists, the Sync App will not overwrite the file.
  • Location: Set this property to the path to your schemas. The Sync App exposes all .rsd files in this folder as tables. The Sync App exposes all .rsb files in this folder as stored procedures.

Note: Columns defined in .rsd files take precedence over the definitions in Schema.ini. Columns defined in generated schema files take precedence over the definitions in Schema.ini.

CSV Connector for CData Sync

Column Definitions

The basic attributes of a column are the name of the column, the data type, whether the column is a primary key, and the internal name. The Sync App uses the internal name to extract nodes from CSV with no readable names.

Mark up column attributes in the api:info block of the schema file. You can set the internal name in the other:internalname property. You can also specify the format of the resulting column value with other:valueFormat. To see the column definitions in a complete example, refer to Modeling CSV Data.

<api:info title="CSVPersons" desc="Parse the CSV Persons feed.">
  <attr name="ID"           xs:type="int"        key="true"                                            />
  <attr name="EmployeeID"   xs:type="int"                             other:internalname="employee_id" />
  <attr name="Name"         xs:type="string"                                                           />
  <attr name="TotalExpense" xs:type="double"                                                           />
  <attr name="HireDate"     xs:type="datetime"                                                         />
  <attr name="Salary"       xs:type="int"                                                              />
</api:info>

Defining the internal name

The other:internalname property is used to specify the CSV column name that selects the column's value from CSV. So, if the CSV file contains a column name employee_id you use other:internalname="employee_id"

CSV Connector for CData Sync

SELECT Execution

With a URI and Column Definitions specified, the Sync App processes SELECT statements client-side, in memory, through SupportEnhancedSQL. The following sections show how to use the Sync App's built-in operations to customize how the Sync App requests and returns data from the server.

Execute Selects to CSV

When a SELECT query is issued, the Sync App executes the GET method of the schema. In this method you can process CSV. To see this schema in a complete example, refer to Modeling CSV Data.

Retrieving Data

The following line maps the schema to a URI:

<api:set  attr="uri"                      value="ftp://somewebsite/NorthwindOData.csv" />

Invoke the operation to retrieve the data in the GET method. Specify the operation with the api:push keyword. The following lines push the results of processing to the schema's output.

<api:script method="GET" >
  <api:push op="csvproviderGet"/>
</api:script>
You can then execute WHERE clause searches, JOIN queries, and SQL aggregate functions.

Customizing Data Retrieval

The Sync App's operations give you high level control over the request sent to the server. You can set a variety of inputs to control authentication and other aspects of the request. See Operations for the available inputs.

You can also build the request by injecting inputs from the SQL statement. As an example, the following sections show how to use the WHERE clause to change the request dynamically. Note that other filters specified in the WHERE clause are processed client-side by the Sync App; you can search on any column returned in the response.

Consider a weather forecast API that returns a location's forecast in CSV. You specify the location you want in the URI. Using the Sync App, you could get the forecast with a query like the following:

SELECT *
FROM Forecasts 
WHERE (Location = '90210') 

Follow the steps below to implement this query. The following procedure defines a pseudo column, an input that can only be used in the WHERE clause, and maps the pseudo column to an API request.

  1. Add a Location input parameter to the column definitions in the api:info block.
    <api:info>
    ...
    <input  name="Location"                 required="true"/>
    </api:info>
  2. Reference the Location pseudo-column value. In the following example, the Location is the name of the CSV resource, set in the URI.
    <api:set attr='uri' value="http://api.wunderground.com/api/MyAPIKey/hourly/q/[_input.Location].csv"/> 
  3. Invoke the operation to make the request and process the response:
    <api:script method="GET" >
    <api:push op="csvproviderGet"/>
    </api:script>

Customize Paging

To override the Sync App's internal paging mechanism, add the Rows@Next input to the list of columns in the api:info block.

<input name="rows@next" desc="Identifier for the next page of results." />
Note that making this an input parameter instead of an attr parameter will prevent it from showing up in column listings. You will also need to set the EnablePaging attribute to TRUE to turn off the driver's internal paging mechanism.
<api:set attr="EnablePaging" value="TRUE" />
When the Rows@Next value is set in the output, the Sync App will automatically call the method again with the Rows@Next value in the input after it is finished returning results for this page. You can use the value of this input to modify the request on the next pass to get the next page of data. Set the Rows@Next input to any information needed to make the request for the next page of data.

For example, your API may return the next page's URL in the response. You can obtain this value by providing the XPath to the URL:

<api:set  attr="elementmappath#"  value="/next_page" />
<api:set  attr="elementmapname#"  value="rows@next" /> 
You can then modify the URL where the request is made, provided the value is set. The api:check element is useful for checking the existence of a required input before attempting to access its value. The Rows@Next input can be accessed as an attribute of the _input item:
<api:check attr="_input.rows@next">
<api:set  attr="uri"  value="[_input.rows@next]" />
<api:else>
<api:set  attr="uri"  value="<first page's URL>" />
</api:else>
<api:check> 

Access Components of SELECT Statements

You can use the _query item to access any component of the SELECT statement in the schema.

queryThe SQL query. For example:
SELECT Id, Name FROM Accounts WHERE City LIKE '%New%' AND COUNTRY = 'US' GROUP BY CreatedDate ORDER BY Name LIMIT 10,50;
selectcolumnsA comma-separated list containing the columns specified in the SELECT statement. For example, the Id and Name columns in the example.
tableThe table name specified in the SELECT statement. For example, Accounts in the example.
criteriaThe WHERE clause of the statement. For example, the following WHERE clause in the example:
City LIKE '%New%' AND COUNTRY = 'US'
orderbyThe columns specified in the ORDER BY clause. For example, Name in the example.
groupbyThe GROUP BY clause in the SELECT statement. For example, CreatedDate in the example.
limitThe limit specified in the LIMIT or TOP clauses of the SELECT statement. For example, 50 in the example.
offsetThe offset specified in the LIMIT or TOP clauses of the SELECT statement. For example, 10 in the example.
isjoinWhether the query is a join.
jointableThe table to be joined.
isschemaonlyWhether the query retrieves only schema information.

CSV Connector for CData Sync

Operations

The Sync App has high-performance, built-in operations for accessing data from CSV data sources. These operations are platform neutral: Schema files that invoke these operations can be used in both .NET and Java. You can also extend the Sync App with your own operations written in .NET or Java.

The Sync App consists of the following operations:

Operation NameDescription
csvproviderGetThe csvproviderGet operation is an API Script operation that is used to process CSV content. It allows you to split CSV content into rows.
oauthGetAccessTokenFor OAuth 1.0, exchange a request token for an access token. For OAuth 2.0, get an access token or get a new access token with the refresh token.
oauthGetUserAuthorizationURLGenerates the user authorization URL. OAuth 2.0 will not access the network in this operation.

CSV Connector for CData Sync

csvproviderGet

The csvproviderGet operation is an API Script operation that is used to process CSV content. It allows you to split CSV content into rows.

Required Parameters

  • URI: The URI parameter specifies the location of the CSV content. This URI scheme can be file:// for local files or can specify a remote data source: http:// (or https://), s3://, gdrive://, box://, or ftp:// (ftps://).

Network Operation

The csvproviderGet operation can be used to execute remote data retrieval operations. It abstracts the request and also enables configuration of most aspects through the following inputs, including authentication and firewall traversal. See ProxyAuthScheme and FirewallType the properties needed to negotiate a firewall.

Column Mapping

The csvproviderGet operation reads the api:info section of the table schema file to map various elements in the CSV document into column values within a row. It does so using the other:internalname property of the column definition.

HTTP

  • Method: The HTTP method that corresponds to the SQL data manipulation statement. The allowed values are GET, POST, PUT, DELETE, and MERGE. The default value is GET.
  • ContentType: The content type of the HTTP post. Relevant only if data is specified.
  • Data: Data to include in the put or the post.
  • Text: Input CSV text (an alternative to URI).
  • Header:Name#: The name for each custom header to pass with the request.
  • Header:Value#: The value for each custom header to pass with the request.
  • ParamName#: The name for each parameter to pass with the request.
  • ParamValue#: The value for each parameter to pass with the request.
  • Cookie:*: Any cookies that should be added to the request.
  • Timeout: The timeout, in seconds, for the operation to complete. Zero (0) means no timeout. The default value is 60.
  • LogFile: The file where exchanged/transferred data is logged.

Authentication

  • User: The username used for authentication.
  • Password: The password used for authentication.
  • AuthScheme: The authentication method to use. Only relevant if User and Password are provided. The allowed values are BASIC, DIGEST, NONE, NTLM, NEGOTIATE. The default value is BASIC.
  • KerberosKDC: The KDC setting of Kerberos, available when AuthScheme is NEGOTIATE.
  • KerberosRealm: The Realm setting of Kerberos, available when AuthScheme is NEGOTIATE.
  • KerberosToken: The Kerberos token used for authentication.

OAuth

  • Version: The OAuth version. The allowed values are DISABLED, 1.0, 2.0. The default value is DISABLED.
  • Token: The access token for OAuth.
  • Token_Secret: The access token secret. OAuth 1.0 only.
  • Client_Id: The OAuth client Id. OAuth 1.0 only.
  • Client_Secret: The OAuth client secret. OAuth 1.0 only.
  • Sign_Method: The signature method used to calculate the signature for OAuth 1.0. The allowed values are HMAC-SHA1, PLAINTEXT. The default value is HMAC-SHA1.
  • Other_Options: Other options to control the behavior of OAuth.

Proxy

  • Proxy_Auto: Whether or not the proxy should be detected from Windows system settings. This takes precedence over other proxy settings and is not available in Java. The allowed values are TRUE, FALSE. The default value is FALSE.
  • Proxy_Server: IP address or host name of the proxy server used for the request.
  • Proxy_Port: The port number of the proxy server.
  • Proxy_User: The user Id used to authenticate with the proxy server.
  • Proxy_Password: The password used to authenticate with the proxy server.
  • Proxy_AuthScheme: The authentication scheme of the proxy server. The allowed values are BASIC, DIGEST, PROPRIETARY, NONE, NTLM. The default value is BASIC.
  • Proxy_AuthToken: The proxy authentication token.
  • Proxy_SSLType: The SSL type of the proxy server. The allowed values are AUTO, ALWAYS, NEVER, TUNNEL. The default value is AUTO.

Firewall

  • Firewall_Server: The IP address or host name of the firewall.
  • Firewall_Port: The port number of the firewall.
  • Firewall_User: The user Id used to authenticate with the firewall.
  • Firewall_Password: The password used to authenticate with the firewall.
  • Firewall_Type: The type of the firewall. The allowed values are NONE, TUNNEL, SOCKS4, and SOCKS5. The default value is NONE.

CSV Connector for CData Sync

oauthGetAccessToken

The oauthGetAccessToken operation is an API Script operation that is used to facilitate the OAuth authentication flow. To pass the needed inputs to the operation, define the GetOAuthAccessToken stored procedure and, if your data source has a refresh flow, RefreshOAuthAccessToken. The Sync App can call this internally.

The Sync App includes stored procedures that invoke this operation to complete the OAuth exchange. The following example schema briefly lists some of the typically required inputs before the following sections explain them in more detail.

For a guide to using the Sync App to authenticate, see the "Getting Started" chapter.

Creating a GetOAuthAccessToken Stored Procedure

Invoke the oauthGetAccessToken with the GetOAuthAccessToken stored procedure. The following inputs are required for most data sources and will provide default values for the connection properties of the same name.

<api:script xmlns:api="http://www.rssbus.com/ns/rsbscript/2">

  <api:info title="GetOAuthAccessToken"   description="Obtains the OAuth access token to be used for authentication with various APIs."                                                         >
    <input  name="AuthMode"               desc="The OAuth flow. APP or WEB."                                                                                                                    />
    <input  name="CallbackURL"            desc="The URL to be used as a trusted redirect URL, where the user will return with the token that verifies that they have granted your app access. " />
    <input  name="OAuthAccessToken"       desc="The request token. OAuth 1.0 only."                                                                                                             />
    <input  name="OAuthAccessTokenSecret" desc="The request token secret. OAuth 1.0 only."                                                                                                      />
    <input  name="Verifier"               desc="The verifier code obtained when the user grants permissions to your app."                                                                       />

    <output name="OAuthAccessToken"       desc="The access token."                                                                                                                              />
    <output name="OAuthTokenSecret"       desc="The access token secret."                                                                                                                       />
    <output name="OAuthRefreshToken"      desc="A token that may be used to obtain a new access token."                                                                                         />
 </api:info>

  <!-- Set OAuthVersion to 1.0 or 2.0. -->
  <api:set attr="OAuthVersion"                                                    value="MyOAuthVersion"                 />
  <!-- Set RequestTokenURL to the URL where the request for the request token is made. OAuth 1.0 only.-->
  <api:set attr="OAuthRequestTokenURL"                                            value="http://MyOAuthRequestTokenURL" />
  <!-- Set OAuthAuthorizationURL to the URL where the user logs into the service and grants permissions to the application. -->
  <api:set attr="OAuthAuthorizationURL"                                           value="http://MyOAuthAuthorizationURL" />
  <!-- Set OAuthAccessTokenURL to the URL where the request for the access token is made. -->
  <api:set attr="OAuthAccessTokenURL"                                             value="http://MyOAuthAccessTokenURL"   />
  <!-- Set GrantType to the authorization grant type. OAuth 2.0 only. -->
  <api:set attr="GrantType"                                                       value="CODE"                           />
  <!-- Set SignMethod to the signature method used to calculate the signature of the request. OAuth 1.0 only.-->
  <api:set attr="SignMethod"                                                      value="HMAC-SHA1"                      />
  <api:call op="oauthGetAccessToken">
    <api:push/>
  </api:call>
  
</api:script>

Writing the RefreshOAuthAccessToken Stored Procedure

You can also use oauthGetAccessToken to refresh the access token by providing the following inputs:

<api:script xmlns:api="http://www.rssbus.com/ns/rsbscript/2">

  <api:info title="RefreshOAuthAccessToken" description="Refreshes the OAuth access token used for authentication." >
    <input  name="OAuthRefreshToken"        desc="A token that may be used to obtain a new access token."           /> 
    <output name="OAuthAccessToken"         desc="The authentication token returned."                               />
    <output name="OAuthTokenSecret"         desc="The authentication token secret returned. OAuth 1.0 only."        />
    <output name="OAuthRefreshToken"        desc="A token that may be used to obtain a new access token."           />
    <output name="ExpiresIn"                desc="The remaining lifetime on the access token."                      />

  </api:info>

  <!-- Set OAuthVersion to 1.0 or 2.0. -->
  <api:set attr="OAuthVersion"                                                    value="MyOAuthVersion"                 />
    <!-- Set GrantType to REFRESH. OAuth 2.0 only. -->
    <api:set attr="GrantType"            value="REFRESH" />
    <!-- Set SignMethod to the signature method used to calculate the signature of the request. OAuth 1.0 only.-->
    <api:set attr="SignMethod"           value="HMAC-SHA1" />
    <!-- Set OAuthAccessTokenURL to the URL where the request for the access token is made. -->
    <api:set attr="OAuthAccessTokenURL"  value="http://MyOAuthAccessTokenURL" />
    <!-- Set AuthMode to 'WEB' when calling RefreshOAuthAccessToken -->
    <api:set attr="AuthMode" value="WEB"/>
  <api:call op="oauthGetAccessToken">
    <api:push/>
  </api:call>
  
</api:script>

Input Parameters

  • OAuthVersion: The OAuth version. The allowed values are 1.0, 2.0. The default value is 1.0.
  • AuthMode: The OAuth flow. OAuth 2.0 only. If you choose the App mode, this operation will launch your browser and prompt you to authenticate with your account credentials. Set this parameter to WEB to authenticate a Web app or if the Sync App is not allowed to open a Web browser. The default value is APP.
  • OAuthRequestTokenURL: The URL where the Sync App makes a request for the request token. OAuth 1.0 only. Required for OAuth 1.0.
  • OAuthAuthorizationURL: The URL where the user logs into the service and grants permissions to the application. In OAuth 1.0, if permissions are granted the request token is authorized.
  • OAuthAccessTokenURL: The URL where the request for the access token is made. In OAuth 1.0, the authorized request token is exchanged for the access token.
  • CallbackURL: The URL to be used as a trusted redirect URL, where the user will return with the token that verifies that they have granted your app access. This value must match the callback URL you specify when you register an app. Note that your data source may additionally require the port.
  • OAuthClientId: The client Id obtained when you register an app. Also called a consumer key.
  • OAuthClientSecret: The client secret obtained when you register an app. Also called a consumer secret.
  • OAuthAccessToken: The request token. OAuth 1.0 only.
  • OAuthAccessTokenSecret: The request token secret. OAuth 1.0 only.
  • OAuthRefreshToken: A token that may be used to obtain a new access token.
  • GrantType: Authorization grant type. OAuth 2.0 only. The allowed values are CODE, PASSWORD, CLIENT, REFRESH. The default value is CODE.
  • Verifier: The verifier code obtained when the user grants permissions to the Sync App. In the OAuth 2.0 code grant type, the verifier code is located in the code query string parameter of the callback URL. In OAuth 1.0, the verifier is located in the oauth_verifier query string parameter of the callback URL.
  • SignMethod: The signature method used to calculate the signature for OAuth 1.0. The allowed values are HMAC-SHA1, PLAINTEXT. The default value is HMAC-SHA1.
  • Cert: Path for the PFX personal certificate file. OAuth 1.0 only.
  • CertPassword: Personal certificate password. OAuth 1.0 only.
  • OtherOptions: Other options to control the behavior of OAuth.
  • OAuthParam:*: Other parameters.
  • PostData: The HTTP POST data.
  • Timeout: The timeout, in seconds, for the operation to complete. Zero (0) means no timeout. The default value is 60.
  • LogFile: Specifies a file where the request and response are logged.
  • Proxy_Auto: Whether or not the proxy should be detected from Windows system settings. This takes precedence over other proxy settings and is not available in Java. The allowed values are TRUE, FALSE. The default value is FALSE.
  • Proxy_Server: IP address or host name of the proxy server used for the request.
  • Proxy_Port: The port number of the proxy server.
  • Proxy_User: The user Id used to authenticate with the proxy server.
  • Proxy_Password: The password used to authenticate with the proxy server.
  • Proxy_AuthScheme: The authentication scheme of the proxy server. The allowed values are BASIC, DIGEST, PROPRIETARY, NONE, NTLM. The default value is BASIC.
  • Proxy_AuthToken: The proxy authentication token.
  • Proxy_SSLType: The SSL type of the proxy server. The allowed values are AUTO, ALWAYS, NEVER, TUNNEL. The default value is AUTO.
  • Firewall_Type: The type of the firewall. The allowed values are NONE, TUNNEL, SOCKS4, SOCKS5. The default value is NONE.
  • Firewall_Server: The IP address or host name of the firewall.
  • Firewall_Port: The port number of the firewall.
  • Firewall_User: The user Id used to authenticate with the firewall.
  • Firewall_Password: The password used to authenticate with the firewall.

Output Parameters

  • OAuthAccessToken: The access token.
  • OAuthTokenSecret: The access token secret.
  • OAuthRefreshToken: A token that may be used to obtain a new access token.
  • ExpiresIn: The remaining lifetime on the access token.
  • OAuthParam:*: Other parameters sent from the server.

CSV Connector for CData Sync

oauthGetUserAuthorizationURL

The oauthGetUserAuthorizationURL is an API Script operation that is used to facilitate the OAuth authentication flow for Web apps, for offline apps, and in situations where the Sync App is not allowed to open a Web browser. To pass the needed inputs to this operation, define the GetOAuthAuthorizationURL stored procedure. The Sync App can call this internally.

Define stored procedures in .rsb files with the same file name as the schema's title. The example schema briefly lists some of the typically required inputs before the following sections explain them in more detail.

For a guide to authenticating in the OAuth flow, see the "Getting Started" chapter.

Writing the GetOAuthAuthorizationURL Stored Procedure

Call oauthGetUserAuthorizationURL in the GetOAuthAuthorizationURL stored procedure.

<api:script xmlns:api="http://www.rssbus.com/ns/rsbscript/2">

  <api:info title="Get OAuth Authorization URL" description="Obtains the OAuth authorization URL used for authentication with various APIs."                                                          >
    <input  name="CallbackURL"                  desc="The URL to be used as a trusted redirect URL, where the user will return with the token that verifies that they have granted your app access. " />

    <output name="URL"                          desc="The URL where the user logs in and is prompted to grant permissions to the app. "                                                               />
    <output name="OAuthAccessToken"             desc="The request token. OAuth 1.0 only."                                                                                                             />
    <output name="OAuthTokenSecret"             desc="The request token secret. OAuth 1.0 only."                                                                                                      />
  </api:info>

  <!-- Set OAuthVersion to 1.0 or 2.0. -->
  <api:set attr="OAuthVersion"          value="MyOAuthVersion"                 />
  <!-- Set ResponseType to the desired authorization grant type. OAuth 2.0 only.-->
  <api:set attr="ResponseType"           value="code"                           />
  <!-- Set SignMethod to the signature method used to calculate the signature. OAuth 1.0 only.-->
  <api:set attr="SignMethod"            value="HMAC-SHA1"                      />
  <!-- Set OAuthAuthorizationURL to the URL where the user logs into the service and grants permissions to the application. -->
  <api:set attr="OAuthAuthorizationURL"  value="http://MyOAuthAuthorizationURL" />
  <!-- Set OAuthAccessTokenURL to the URL where the request for the access token is made. -->
  <api:set attr="OAuthAccessTokenURL"   value="http://MyOAuthAccessTokenURL"/>
  <!-- Set RequestTokenURL to the URL where the request for the request token is made. OAuth 1.0 only.-->
  <api:set attr="OAuthRequestTokenURL"   value="http://MyOAuthRequestTokenURL"       />
  <api:call op="oauthGetUserAuthorizationUrl">
    <api:push/>
  </api:call>
  
</api:script>

<p>

Input Parameters

  • OAuthVersion: The OAuth version. The allowed values are 1.0, 2.0. The default value is 1.0.
  • OAuthAuthorizationURL: The URL where the user logs into the service and grants permissions to the application. In OAuth 1.0, if permissions are granted the request token is authorized.
  • OAuthRequestTokenURL: The URL where the Sync App makes a request for the request token. OAuth 1.0 only. Required for OAuth 1.0.
  • CallbackURL: The URL to be used as a trusted redirect URL, where the user will return with the token that verifies that they have granted your app access. This value must match the callback URL you specify when you register an app. Note that your data source may additionally require the port. The default value is http://127.0.0.1/.
  • OAuthClientId: The client Id. Also called a consumer key.
  • OAuthClientSecret: The client secret. Also called a consumer secret.
  • ResponseType: The desired authorization grant type. OAuth 2.0 only. The allowed values are CODE, IMPLICIT. The default value is CODE.
  • SignMethod: The signature method used to calculate the signature for OAuth 1.0. The allowed values are HMAC-SHA1, RSA-SHA1, PLAINTEXT. The default value is HMAC-SHA1.
  • Cert: Path for the personal certificate PFX file. OAuth 1.0 only.
  • CertPassword: Personal certificate password. OAuth 1.0 only.
  • OtherOptions: Other options to control the behavior of OAuth.
  • OAuthParam:*: Other parameters. OAuth 1.0 only.
  • Timeout: The timeout, in seconds, for the operation to complete. Zero (0) means no timeout. The default value is 60.
  • Proxy_Auto: Whether or not the proxy should be detected from Windows system settings. This takes precedence over other proxy settings and is not available in Java. The allowed values are TRUE, FALSE. The default value is FALSE.
  • Proxy_Server: IP address or host name of the proxy server used for the request.
  • Proxy_Port: The port number of the proxy server.
  • Proxy_User: The user Id used to authenticate with the proxy server.
  • Proxy_Password: The password used to authenticate with the proxy server.
  • Proxy_AuthScheme: The authentication scheme of the proxy server. The allowed values are BASIC, DIGEST, PROPRIETARY, NONE, NTLM. The default value is BASIC.
  • Proxy_AuthToken: The proxy authentication token.
  • Proxy_SSLType: The SSL type of the proxy server. The allowed values are AUTO, ALWAYS, NEVER, TUNNEL. The default value is AUTO.
  • Firewall_Type: The type of the firewall. The allowed values are NONE, TUNNEL, SOCKS4, SOCKS5. The default value is NONE.
  • Firewall_Server: The IP address or host name of the firewall.
  • Firewall_Port: The port number of the firewall.
  • Firewall_User: The user Id used to authenticate with the firewall.
  • Firewall_Password: The password used to authenticate with the firewall.

Output Parameters

  • URL: The URL where the user logs in and is prompted to grant permissions to the app. In OAuth 1.0, if permissions are granted the request token is authorized.
  • OAuthAccessToken: The request token. OAuth 1.0 only.
  • OAuthTokenSecret: The request token secret. OAuth 1.0 only.
  • OAuthParam:*: Other parameters sent from the server. OAuth 1.0 only.

CSV Connector for CData Sync

Advanced Features

This section details a selection of advanced features of the CSV Sync App.

User Defined Views

The Sync App allows you to define virtual tables, called user defined views, whose contents are decided by a pre-configured query. These views are useful when you cannot directly control queries being issued to the drivers. See User Defined Views for an overview of creating and configuring custom views.

SSL Configuration

Use SSL Configuration to adjust how Sync App handles TLS/SSL certificate negotiations. You can choose from various certificate formats; see the SSLServerCert property under "Connection String Options" for more information.

Firewall and Proxy

Configure the Sync App for compliance with Firewall and Proxy, including Windows proxies and HTTP proxies. You can also set up tunnel connections.

Query Processing

The Sync App offloads as much of the SELECT statement processing as possible to CSV and then processes the rest of the query in memory (client-side).

See Query Processing for more information.

Logging

See Logging for an overview of configuration settings that can be used to refine CData logging. For basic logging, you only need to set two connection properties, but there are numerous features that support more refined logging, where you can select subsets of information to be logged using the LogModules connection property.

CSV Connector for CData Sync

SSL Configuration

Customizing the SSL Configuration

By default, the Sync App attempts to negotiate SSL/TLS by checking the server's certificate against the system's trusted certificate store.

To specify another certificate, see the SSLServerCert property for the available formats to do so.

Client SSL Certificates

The CSV Sync App also supports setting client certificates. Set the following to connect using a client certificate.

  • SSLClientCert: The name of the certificate store for the client certificate.
  • SSLClientCertType: The type of key store containing the TLS/SSL client certificate.
  • SSLClientCertPassword: The password for the TLS/SSL client certificate.
  • SSLClientCertSubject: The subject of the TLS/SSL client certificate.

CSV Connector for CData Sync

Firewall and Proxy

Connecting Through a Firewall or Proxy

HTTP Proxies

To connect through the Windows system proxy, you do not need to set any additional connection properties. To connect to other proxies, set ProxyAutoDetect to false.

In addition, to authenticate to an HTTP proxy, set ProxyAuthScheme, ProxyUser, and ProxyPassword, in addition to ProxyServer and ProxyPort.

Other Proxies

Set the following properties:

  • To use a proxy-based firewall, set FirewallType, FirewallServer, and FirewallPort.
  • To tunnel the connection, set FirewallType to TUNNEL.
  • To authenticate, specify FirewallUser and FirewallPassword.
  • To authenticate to a SOCKS proxy, additionally set FirewallType to SOCKS5.

CSV Connector for CData Sync

Connection String Options

The connection string properties are the various options that can be used to establish a connection. This section provides a complete list of the options you can configure in the connection string for this provider. Click the links for further details.

For more information on establishing a connection, see Establishing a Connection.

Authentication


PropertyDescription
AuthSchemeThe type of authentication to use when connecting to remote services.
AccessKeyYour account access key. This value is accessible from your security credentials page.
SecretKeyYour account secret key. This value is accessible from your security credentials page.
ApiKeyThe API Key used to identify the user to IBM Cloud.
UserThe user account used to authenticate.
PasswordThe password used to authenticate the user.
SharePointEditionThe edition of SharePoint being used. Set either SharePointOnline or SharePointOnPremise.

Connection


PropertyDescription
ConnectionTypeThe type of connection to use.
URIThe Uniform Resource Identifier (URI) for the CSV resource location.
RegionThe hosting region for your S3-like Web Services.
ProjectIdThe Id of the project where your Google Cloud Storage instance resides.
OracleNamespaceThe Oracle Cloud Object Storage namespace to use.
StorageBaseURLThe URL of a cloud storage service provider.
SimpleUploadLimitThis setting specifies the threshold, in bytes, above which the provider will choose to perform a multipart upload rather than uploading everything in one request.
UseVirtualHostingIf true (default), buckets will be referenced in the request using the hosted-style request: http://yourbucket.s3.amazonaws.com/yourobject. If set to false, the bean will use the path-style request: http://s3.amazonaws.com/yourbucket/yourobject. Note that this property will be set to false, in case of an S3 based custom service when the CustomURL is specified.

AWS Authentication


PropertyDescription
AWSAccessKeyYour AWS account access key. This value is accessible from your AWS security credentials page.
AWSSecretKeyYour AWS account secret key. This value is accessible from your AWS security credentials page.
AWSRoleARNThe Amazon Resource Name of the role to use when authenticating.
AWSPrincipalARNThe ARN of the SAML Identity provider in your AWS account.
AWSRegionThe hosting region for your Amazon Web Services.
AWSCredentialsFileThe path to the AWS Credentials File to be used for authentication.
AWSCredentialsFileProfileThe name of the profile to be used from the supplied AWSCredentialsFile.
AWSSessionTokenYour AWS session token.
MFASerialNumberThe serial number of the MFA device if one is being used.
MFATokenThe temporary token available from your MFA device.
ServerSideEncryptionWhen activated, file uploads into Amazon S3 buckets will be server-side encrypted.

Azure Authentication


PropertyDescription
AzureStorageAccountThe name of your Azure storage account.
AzureAccessKeyThe storage key associated with your CSV account.
AzureSharedAccessSignatureA shared access key signature that may be used for authentication.
AzureTenantThe Microsoft Online tenant being used to access data. If not specified, your default tentant will be used.
AzureEnvironmentThe Azure Environment to use when establishing a connection.

SSO


PropertyDescription
SSOLoginURLThe identity provider's login URL.
SSOPropertiesAdditional properties required to connect to the identity provider in a semicolon-separated list.

OAuth


PropertyDescription
OAuthVersionThe version of OAuth being used.
OAuthClientIdThe client Id assigned when you register your application with an OAuth authorization server.
OAuthClientSecretThe client secret assigned when you register your application with an OAuth authorization server.
ScopeSpecify scope to obtain the initial access and refresh token.
OAuthGrantTypeThe grant type for the OAuth flow.
OAuthPasswordGrantModeHow to pass Client Id and Secret with OAuthGrantType is set to Password.
OAuthIncludeCallbackURLWhether to include the callback URL in an access token request.
OAuthAuthorizationURLThe authorization URL for the OAuth service.
OAuthAccessTokenURLThe URL to retrieve the OAuth access token from.
OAuthRefreshTokenURLThe URL to refresh the OAuth token from.
OAuthRequestTokenURLThe URL the service provides to retrieve request tokens from. This is required in OAuth 1.0.
AuthTokenThe authentication token used to request and obtain the OAuth Access Token.
AuthKeyThe authentication secret used to request and obtain the OAuth Access Token.
OAuthParamsA comma-separated list of other parameters to submit in the request for the OAuth access token in the format paramname=value.

JWT OAuth


PropertyDescription
OAuthJWTCertThe JWT Certificate store.
OAuthJWTCertTypeThe type of key store containing the JWT Certificate.
OAuthJWTCertPasswordThe password for the OAuth JWT certificate.
OAuthJWTCertSubjectThe subject of the OAuth JWT certificate.
OAuthJWTIssuerThe issuer of the Java Web Token.
OAuthJWTSubjectThe user subject for which the application is requesting delegated access.

Kerberos


PropertyDescription
KerberosKDCThe Kerberos Key Distribution Center (KDC) service used to authenticate the user.
KerberosRealmThe Kerberos Realm used to authenticate the user.
KerberosSPNThe service principal name (SPN) for the Kerberos Domain Controller.
KerberosKeytabFileThe Keytab file containing your pairs of Kerberos principals and encrypted keys.
KerberosServiceRealmThe Kerberos realm of the service.
KerberosServiceKDCThe Kerberos KDC of the service.
KerberosTicketCacheThe full file path to an MIT Kerberos credential cache file.

SSL


PropertyDescription
SSLClientCertThe TLS/SSL client certificate store for SSL Client Authentication (2-way SSL).
SSLClientCertTypeThe type of key store containing the TLS/SSL client certificate.
SSLClientCertPasswordThe password for the TLS/SSL client certificate.
SSLClientCertSubjectThe subject of the TLS/SSL client certificate.
SSLModeThe authentication mechanism to be used when connecting to the FTP or FTPS server.
SSLServerCertThe certificate to be accepted from the server when connecting using TLS/SSL.

SSH


PropertyDescription
SSHAuthModeThe authentication method to be used to log on to an SFTP server.
SSHClientCertA private key to be used for authenticating the user.
SSHClientCertPasswordThe password of the SSHClientCert key if it has one.
SSHClientCertSubjectThe subject of the SSH client certificate.
SSHClientCertTypeThe type of SSHClientCert private key.
SSHUserThe SSH user.
SSHPasswordThe SSH password.

Firewall


PropertyDescription
FirewallTypeThe protocol used by a proxy-based firewall.
FirewallServerThe name or IP address of a proxy-based firewall.
FirewallPortThe TCP port for a proxy-based firewall.
FirewallUserThe user name to use to authenticate with a proxy-based firewall.
FirewallPasswordA password used to authenticate to a proxy-based firewall.

Proxy


PropertyDescription
ProxyAutoDetectThis indicates whether to use the system proxy settings or not. This takes precedence over other proxy settings, so you'll need to set ProxyAutoDetect to FALSE in order use custom proxy settings.
ProxyServerThe hostname or IP address of a proxy to route HTTP traffic through.
ProxyPortThe TCP port the ProxyServer proxy is running on.
ProxyAuthSchemeThe authentication type to use to authenticate to the ProxyServer proxy.
ProxyUserA user name to be used to authenticate to the ProxyServer proxy.
ProxyPasswordA password to be used to authenticate to the ProxyServer proxy.
ProxySSLTypeThe SSL type to use when connecting to the ProxyServer proxy.
ProxyExceptionsA semicolon separated list of destination hostnames or IPs that are exempt from connecting through the ProxyServer .

Logging


PropertyDescription
LogModulesCore modules to be included in the log file.

Schema


PropertyDescription
LocationA path to the directory that contains the schema files defining tables, views, and stored procedures.
BrowsableSchemasThis property restricts the schemas reported to a subset of the available schemas. For example, BrowsableSchemas=SchemaA,SchemaB,SchemaC.
TablesThis property restricts the tables reported to a subset of the available tables. For example, Tables=TableA,TableB,TableC.
ViewsRestricts the views reported to a subset of the available tables. For example, Views=ViewA,ViewB,ViewC.
SchemaIniLocationA path to the directory that contains the schema.ini file.
AggregateFilesWhen set to true, the provider will aggregate into a single table called AggregatedFiles all the files located in the URI directory which have the same schema.
MetadataDiscoveryURIUsed together with AggregateFiles , this property specifies a specific file to read the schema of the AggregatedFiles result set.
TypeDetectionSchemeDetermines how to determine the data types of columns.
ColumnCountThe number of columns to detect when dynamically determining columns for the table.
RowScanDepthThe number of rows to scan when dynamically determining columns for the table.

Data Formatting


PropertyDescription
IncludeColumnHeadersWhether to get column names from the first line of the specified files.
FMTThe format to be used to parse all text files.
ExtendedPropertiesThe Microsoft Jet OLE DB 4.0-compatible extended properties for text files.
RowDelimiterThe character which will be used to detect the end of a CSV row.
SkipTopSkips the amount of rows specified starting from the top.
IgnoreBlankRowsIndicates whether to skip the empty rows.
IncludeEmptyHeadersWhether to include empty value for a column name within column header.
SkipHeaderCommentsIf set to true, skips rows at the top of the file beginning with #.
CharsetSpecifies the session character set for encoding and decoding character data transferred to and from the CSV file. The default value is UTF-8.
QuoteEscapeCharacterDetermines the character which will be used to escape quotes.
QuoteCharacterDetermines the character which will be used to quote values in CSV file.
TrimSpacesSet to True if you want the provider to trim preceeding and trailing spaces in a cell containing a quoted value.
PushEmptyValuesAsNullIndicates whether to read the empty values as empty or as null.
NullValuesA comma separated list which will be replaced with nulls if there are found in the CSV file.
PathSeparatorDetermines the character which will be used to replace the file separator.
IgnoreIncompleteRowsIndicates whether to ignore incomplete rows.
MaxCellLengthMax length a cell can hold, after passing this number the cell content will get truncated. If value is -1 then we don't limit the cell content length.

Miscellaneous


PropertyDescription
BatchNamingConventionDetermines the naming convention of batch files.
ClientCultureThis property can be used to specify the format of data (e.g., currency values) that is accepted by the client application. This property can be used when the client application does not support the machine's culture settings. For example, Microsoft Access requires 'en-US'.
CreateBatchFolderWhether to create a folder or not when InsertMode is set to FilePerBatch.
CultureThis setting can be used to specify culture settings that determine how the provider interprets certain data types that are passed into the provider. For example, setting Culture='de-DE' will output German formats even on an American machine.
CustomHeadersOther headers as determined by the user (optional).
CustomUrlParamsThe custom query string to be included in the request.
DirectoryRetrievalDepthLimit the subfolders recursively scanned when IncludeSubdirectories is enabled.
ExcludeFileExtensionsSet to true if file extensions should be excluded from table names.
ExcludeFilesComma-separated list of file extensions to exclude from the set of the files modeled as tables.
GenerateSchemaFilesIndicates the user preference as to when schemas should be generated and saved.
IncludeDropboxTeamResourcesIndicates if you want to include Dropbox team files and folders.
IncludeFilesComma-separated list of file extensions to include into the set of the files modeled as tables.
IncludeSubdirectoriesWhether to read files from nested folders. In the case of a name collision, table names are prefixed by the underscore-separated folder names.
InsertModeSpecifies the mode for inserting data into CSV files.
MaxRowsLimits the number of rows returned rows when no aggregation or group by is used in the query. This helps avoid performance issues at design time.
OtherThese hidden properties are used only in specific use cases.
PagesizeThe maximum number of results to return per page from CSV.
PseudoColumnsThis property indicates whether or not to include pseudo columns as columns to the table.
TimeoutThe value in seconds until the timeout error is thrown, canceling the operation.
TruncateOnInsertsSet to True if you want the provider to truncate on every (batch) insert.
UserDefinedViewsA filepath pointing to the JSON configuration file containing your custom views.
UseRowNumbersSet this to true if you are deleting or updating in CSV and you do not want to specify a custom schema. This will create a new column with the name RowNumber which will be used as key for that table.
CSV Connector for CData Sync

Authentication

This section provides a complete list of the Authentication properties you can configure in the connection string for this provider.


PropertyDescription
AuthSchemeThe type of authentication to use when connecting to remote services.
AccessKeyYour account access key. This value is accessible from your security credentials page.
SecretKeyYour account secret key. This value is accessible from your security credentials page.
ApiKeyThe API Key used to identify the user to IBM Cloud.
UserThe user account used to authenticate.
PasswordThe password used to authenticate the user.
SharePointEditionThe edition of SharePoint being used. Set either SharePointOnline or SharePointOnPremise.
CSV Connector for CData Sync

AuthScheme

The type of authentication to use when connecting to remote services.

Remarks

General

The following options are generally available to all connections:

  • None: Uses no authentication.
  • Basic: Uses Basic authentication with User and Password.
  • Auto: Determines the right type of authentication to use based on the service. Local files and HTTP will use None.

HTTP

The following options are available when URI refers to a web service:

  • Digest: Uses HTTP Digest authentication with User and Password.
  • NTLM: Uses NTLM authentication with User and Password set to your Windows credentials.
  • Negotiate: Negotiates with the server to determine an authentication scheme. Typically used with Kerberos, which requires KerberosKDC, KerberosRealm and KerberosSPN.
  • OAuth: Uses either OAuth1 or OAuth2, with the specific flow being determined by the OAuthGrantType. OAuthVersion must be set to determine what version of OAuth is used.
  • OAuthJWT: Uses OAuth2 with the JWT bearer grant type. OAuthJWTCertType and OAuthJWTCert determine what certificate the JWT is signed with. OAuthVersion must be set to 2.0.
  • OAuthPassword: Uses OAuth2 with the password grant type. User and Password are the credentials. OAuthVersion must be set to 2.0.
  • OAuthClient: Uses OAuth2 with the client credentials grant type. OAuthClientId and OAuthClientSecret are the credentials. OAuthVersion must be set to 2.0.
  • OAuthPKCE: Uses OAuth2 with the authorization code grant type and PKCE extension. OAuthClientId is the credential. OAuthVersion must be set to 2.0.
  • SSL: Uses SSL client certificates to authenticate. Requires that URI be set to an HTTPS URL and that SSLClientCert and SSLClientCertType be set.

AWS

The following options are also available when URI points to an Amazon service:

  • AwsRootKeys: Set this to use the root user access key and secret. Useful for quickly testing, but production use cases are encouraged to use something with narrowed permissions.
  • AwsIAMRoles: Set to use IAM Roles for the connection.
  • AwsEC2Roles: Set this to automatically use IAM Roles assigned to the EC2 machine the CData Sync App is currently running on.
  • AwsMFA: Set to use multi factor authentication.
  • OKTA: Set to use a single sign on connection with OKTA as the identify provider.
  • ADFS: Set to use a single sign on connection with ADFS as the identify provider.
  • AzureAD: Set to use a single sign on connection with AzureAD as the identify provider.
  • AwsTempCredentials: Set this to leverage temporary security credentials alongside a session token to connect.
  • AwsCredentialsFile: Set to use a credential file for authentication.

Azure

The following options are also available when URI points to an Azure service:

  • AzureAD: Set this to perform Azure Active Directory OAuth authentication.
  • AzureServicePrincipal: Set this to authenticate as an Azure Service Principal.
  • AzureMSI: Set this to automatically obtain Managed Service Identity credentials when running on an Azure VM.

SharePoint

The following options are also available when URI points to a SharePoint SOAP service:

  • OKTA: Set to use a single sign on connection with OKTA as the identify provider.
  • ADFS: Set to use a single sign on connection with ADFS as the identify provider.
  • OneLogin: Set to use a single sign on connection with OneLogin as the identify provider.
  • PingFederate: Set to use a single sign on connection with PingFederate as the identify provider.

IBM Cloud Object Storage

The following options are also available when URI points to a IBM Cloud Object Storage service:

  • OAuth: Uses either OAuth with the specific flow being determined by the InitiateOAuth. ApiKey must be set to successfully complete this flow.
  • HMAC: Uses AccessKey and SecretKey to authenticate to the IBM Cloud Object Storage service.

CSV Connector for CData Sync

AccessKey

Your account access key. This value is accessible from your security credentials page.

Remarks

Your account access key. This value is accessible from your security credentials page depending on the service you are using.

CSV Connector for CData Sync

SecretKey

Your account secret key. This value is accessible from your security credentials page.

Remarks

Your account secret key. This value is accessible from your security credentials page depending on the service you are using.

CSV Connector for CData Sync

ApiKey

The API Key used to identify the user to IBM Cloud.

Remarks

Access to resources in the CSV REST API is governed by an API key in order to retrieve token. An API Key can be created by navigating to Manage --> Access (IAM) --> Users and clicking 'Create'.

CSV Connector for CData Sync

User

The user account used to authenticate.

Remarks

Together with Password, this field is used to authenticate against the server.

This property will refer to different things based on the context, namely the value of ConnectionType and AuthScheme:

  • ConnectionType=AmazonS3
    • AuthScheme=ADFS: This refers to your ADFS username.
    • AuthScheme=Okta: This refers to your Okta username.
    • AuthScheme=PingFederate: This refers to your PingFederate username.
  • ConnectionType=FTP(S)
    • AuthScheme=Basic: This refers to your FTP(S) server username.
  • ConnectionType=HDFS/HDFS Secure
    • AuthScheme=Negotiate: This refers to your HDFS intance username.
  • ConnectionType=HTTP(S)
    • AuthScheme=Basic: This refers to the username associated with the HTTP stream.
    • AuthScheme=Digest: This refers to the username associated with the HTTP stream.
    • AuthScheme=OAuthPassword: This refers to the username associated with the HTTP stream.
  • ConnectionType=SharePoint SOAP
    • AuthScheme=Basic: This refers to your SharePoint account username.
    • AuthScheme=ADFS: This refers to your ADFS username.
    • AuthScheme=Okta: This refers to your Okta username.
    • AuthScheme=OneLogin: This refers to your OneLogin username.

CSV Connector for CData Sync

Password

The password used to authenticate the user.

Remarks

The User and Password are together used to authenticate with the server.

This property will refer to different things based on the context, namely the value of ConnectionType and AuthScheme:

  • ConnectionType=AmazonS3
    • AuthScheme=ADFS: This refers to your ADFS password.
    • AuthScheme=Okta: This refers to your Okta password.
    • AuthScheme=PingFederate: This refers to your PingFederate password.
  • ConnectionType=FTP(S)
    • AuthScheme=Basic: This refers to your FTP(S) server password.
  • ConnectionType=HDFS/HDFS Secure
    • AuthScheme=Negotiate: This refers to your HDFS intance password.
  • ConnectionType=HTTP(S)
    • AuthScheme=Basic: This refers to the password associated with the HTTP stream.
    • AuthScheme=Digest: This refers to the password associated with the HTTP stream.
    • AuthScheme=OAuthPassword: This refers to the password associated with the HTTP stream.
  • ConnectionType=SharePoint SOAP
    • AuthScheme=Basic: This refers to your SharePoint account password.
    • AuthScheme=ADFS: This refers to your ADFS password.
    • AuthScheme=Okta: This refers to your Okta password.
    • AuthScheme=OneLogin: This refers to your OneLogin password.

CSV Connector for CData Sync

SharePointEdition

The edition of SharePoint being used. Set either SharePointOnline or SharePointOnPremise.

Remarks

The edition of SharePoint being used. Set either SharePointOnline or SharePointOnPremise.

CSV Connector for CData Sync

Connection

This section provides a complete list of the Connection properties you can configure in the connection string for this provider.


PropertyDescription
ConnectionTypeThe type of connection to use.
URIThe Uniform Resource Identifier (URI) for the CSV resource location.
RegionThe hosting region for your S3-like Web Services.
ProjectIdThe Id of the project where your Google Cloud Storage instance resides.
OracleNamespaceThe Oracle Cloud Object Storage namespace to use.
StorageBaseURLThe URL of a cloud storage service provider.
SimpleUploadLimitThis setting specifies the threshold, in bytes, above which the provider will choose to perform a multipart upload rather than uploading everything in one request.
UseVirtualHostingIf true (default), buckets will be referenced in the request using the hosted-style request: http://yourbucket.s3.amazonaws.com/yourobject. If set to false, the bean will use the path-style request: http://s3.amazonaws.com/yourbucket/yourobject. Note that this property will be set to false, in case of an S3 based custom service when the CustomURL is specified.
CSV Connector for CData Sync

ConnectionType

The type of connection to use.

Remarks

Set the ConnectionType to one of the following:

  • Auto
  • Local
  • Amazon S3
  • Azure Blob Storage
  • Azure Data Lake Storage Gen1
  • Azure Data Lake Storage Gen2
  • Azure Data Lake Storage Gen2 SSL
  • Azure Files
  • Box
  • Dropbox
  • FTP
  • FTPS
  • Google Cloud Storage
  • Google Drive
  • HDFS
  • HDFS Secure
  • HTTP
  • HTTPS
  • IBM Object Storage Source
  • OneDrive
  • Oracle Cloud Storage
  • SFTP
  • SharePoint REST
  • SharePoint SOAP

Set the ConnectionType to one of the following:

  • Auto
  • Local
  • Amazon S3
  • Azure Blob Storage
  • Azure Data Lake Storage Gen1
  • Azure Data Lake Storage Gen2
  • Azure Data Lake Storage Gen2 SSL
  • Azure Files
  • Box
  • Dropbox
  • FTP
  • FTPS
  • Google Cloud Storage
  • Google Drive
  • HDFS
  • HDFS Secure
  • HTTP
  • HTTPS
  • IBM Object Storage Source
  • OneDrive
  • Oracle Cloud Storage
  • SFTP
  • SharePoint REST
  • SharePoint SOAP

CSV Connector for CData Sync

URI

The Uniform Resource Identifier (URI) for the CSV resource location.

Remarks

Set the URI property to specify a path to a file or stream.

NOTE: this connection property requires that you set ConnectionType, which provide the

See for more advanced features available for parsing and merging multiple files.

Below are examples of the URI formats for the available data sources:

Service provider URI formats
Local Single File Path One table

localPath

file://localPath

Directory Path (one table per file)

localPath

file://localPath

HTTP or HTTPS http://remoteStream

https://remoteStream

Amazon S3 Single File Path One table

s3://remotePath

Directory Path (one table per file)

s3://remotePath

Azure Blob Storage Single File Path One table

azureblob://mycontainer/myblob/

Directory Path (one table per file)

azureblob://mycontainer/myblob/

OneDrive Single File Path One table

onedrive://remotePath

Directory Path (one table per file)

onedrive://remotePath

Google Cloud Storage Single File Path One table

gs://bucket/remotePath

Directory Path (one table per file)

gs://bucket/remotePath

Google Drive Single File Path One table

gdrive://remotePath

Directory Path (one table per file)

gdrive://remotePath

Box Single File Path One table

box://remotePath

Directory Path (one table per file)

box://remotePath

FTP or FTPS Single File Path One table

ftp://server:port/remotePath

Directory Path (one table per file)

ftp://server:port/remotePath

SFTP Single File Path One table

sftp://server:port/remotePath

Directory Path (one table per file)

sftp://server:port/remotePath

Sharepoint Single File Path One table

sp://https://server/remotePath

Directory Path (one table per file)

sp://https://server/remotePath

Example Connection Strings and Queries

Below are example connection strings to CSV files or streams.

Service provider URI formats Connection example
Local Single File Path One table

localPath

file://localPath

Directory Path (one table per file)

localPath

file://localPath

URI=C:\folder1
Amazon S3 Single File Path One table

s3://bucket1/folder1

Directory Path (one table per file)

s3://bucket1/folder1

URI=s3://bucket1/folder1; AWSAccessKey=token1; AWSSecretKey=secret1; AWSRegion=OHIO;
Azure Blob Storage Single File Path One table

azureblob://mycontainer/myblob/

Directory Path (one table per file)

azureblob://mycontainer/myblob/

URI=azureblob://mycontainer/myblob/; AzureStorageAccount=myAccount; AzureAccessKey=myKey;

URI=azureblob://mycontainer/myblob/; AzureStorageAccount=myAccount; AuthScheme=OAuth;

OneDrive Single File Path One table

onedrive://remotePath

Directory Path (one table per file)

onedrive://remotePath

URI=onedrive://folder1; AuthScheme=OAuth;

URI=onedrive://SharedWithMe/folder1; AuthScheme=OAuth;

Google Cloud Storage Single File Path One table

gs://bucket/remotePath

Directory Path (one table per file)

gs://bucket/remotePath

URI=gs://bucket/folder1; AuthScheme=OAuth; ProjectId=test;
Google Drive Single File Path One table

gdrive://remotePath

Directory Path (one table per file)

gdrive://remotePath

URI=gdrive://folder1;
Box Single File Path One table

box://remotePath

Directory Path (one table per file)

box://remotePath

URI=box://folder1; OAuthClientId=oauthclientid1; OAuthClientSecret=oauthcliensecret1; CallbackUrl=http://localhost:12345;
FTP or FTPS Single File Path One table

ftp://server:port/remotePath

Directory Path (one table per file)

ftp://server:port/remotePath

URI=ftps://localhost:990/folder1; User=user1; Password=password1;
SFTP sftp://server:port/remotePath URI=sftp://127.0.0.1:22/remotePath; User=user1; Password=password1;
Sharepoint sp://https://server/remotePath URI=sp://https://domain.sharepoint.com/Documents; User=user1; Password=password1;

CSV Connector for CData Sync

Region

The hosting region for your S3-like Web Services.

Remarks

The hosting region for your S3-like Web Services.

Oracle Cloud Object Storage Regions

Value Region
Commercial Cloud Regions
ap-hyderabad-1 India South (Hyderabad)
ap-melbourne-1 Australia Southeast (Melbourne)
ap-mumbai-1 India West (Mumbai)
ap-osaka-1 Japan Central (Osaka)
ap-seoul-1 South Korea Central (Seoul)
ap-sydney-1 Australia East (Sydney)
ap-tokyo-1 Japan East (Tokyo)
ca-montreal-1 Canada Southeast (Montreal)
ca-toronto-1 Canada Southeast (Toronto)
eu-amsterdam-1 Netherlands Northwest (Amsterdam)
eu-frankfurt-1 Germany Central (Frankfurt)
eu-zurich-1 Switzerland North (Zurich)
me-jeddah-1 Saudi Arabia West (Jeddah)
sa-saopaulo-1 Brazil East (Sao Paulo)
uk-london-1 UK South (London)
us-ashburn-1 (default) US East (Ashburn, VA)
us-phoenix-1 US West (Phoenix, AZ)
US Gov FedRAMP High Regions
us-langley-1 US Gov East (Ashburn, VA)
us-luke-1 US Gov West (Phoenix, AZ)
US Gov DISA IL5 Regions
us-gov-ashburn-1 US DoD East (Ashburn, VA)
us-gov-chicago-1 US DoD North (Chicago, IL)
us-gov-phoenix-1 US DoD West (Phoenix, AZ)

Wasabi Regions

Value Region
eu-central-1 Europe (Amsterdam)
us-east-1 (Default) US East (Ashburn, VA)
us-east-2 US East (Manassas, VA)
us-west-1 US West (Hillsboro, OR)

CSV Connector for CData Sync

ProjectId

The Id of the project where your Google Cloud Storage instance resides.

Remarks

The Id of the project where your Google Cloud Storage instance resides. You can find this value by going to Google Cloud Console and clicking the project name at the top left screen. The ProjectId is displayed on the Id column of the matching project.

CSV Connector for CData Sync

OracleNamespace

The Oracle Cloud Object Storage namespace to use.

Remarks

The Oracle Cloud Object Storage namespace to use. This setting must be set to the Oracle Cloud Object Storage namespace associated with the Oracle Cloud account before any requests can be made. Refer to the Understanding Object Storage Namespaces page of the Oracle Cloud documentation for instructions on how to find your account's Object Storage namespace.

CSV Connector for CData Sync

StorageBaseURL

The URL of a cloud storage service provider.

Remarks

This connection property is used to specify:

  • The URL of a custom S3 service
  • The URL required for the Sharepoint SOAP/REST cloud storage service provider.

    If the domain for this option ends in -my (for example, https://bigcorp-my.sharepoint.com) then you may need to use the onedrive:// scheme instead of the sp:// or sprest:// scheme.

CSV Connector for CData Sync

SimpleUploadLimit

This setting specifies the threshold, in bytes, above which the provider will choose to perform a multipart upload rather than uploading everything in one request.

Remarks

This setting specifies the threshold, in bytes, above which the Sync App will choose to perform a multipart upload rather than uploading everything in one request.

CSV Connector for CData Sync

UseVirtualHosting

If true (default), buckets will be referenced in the request using the hosted-style request: http://yourbucket.s3.amazonaws.com/yourobject. If set to false, the bean will use the path-style request: http://s3.amazonaws.com/yourbucket/yourobject. Note that this property will be set to false, in case of an S3 based custom service when the CustomURL is specified.

Remarks

If true (default), buckets will be referenced in the request using the hosted-style request: http://yourbucket.s3.amazonaws.com/yourobject. If set to false, the bean will use the path-style request: http://s3.amazonaws.com/yourbucket/yourobject. Note that this property will be set to false, in case of an S3 based custom service when the CustomURL is specified.

CSV Connector for CData Sync

AWS Authentication

This section provides a complete list of the AWS Authentication properties you can configure in the connection string for this provider.


PropertyDescription
AWSAccessKeyYour AWS account access key. This value is accessible from your AWS security credentials page.
AWSSecretKeyYour AWS account secret key. This value is accessible from your AWS security credentials page.
AWSRoleARNThe Amazon Resource Name of the role to use when authenticating.
AWSPrincipalARNThe ARN of the SAML Identity provider in your AWS account.
AWSRegionThe hosting region for your Amazon Web Services.
AWSCredentialsFileThe path to the AWS Credentials File to be used for authentication.
AWSCredentialsFileProfileThe name of the profile to be used from the supplied AWSCredentialsFile.
AWSSessionTokenYour AWS session token.
MFASerialNumberThe serial number of the MFA device if one is being used.
MFATokenThe temporary token available from your MFA device.
ServerSideEncryptionWhen activated, file uploads into Amazon S3 buckets will be server-side encrypted.
CSV Connector for CData Sync

AWSAccessKey

Your AWS account access key. This value is accessible from your AWS security credentials page.

Remarks

Your AWS account access key. This value is accessible from your AWS security credentials page:

  1. Sign into the AWS Management console with the credentials for your root account.
  2. Select your account name or number and select My Security Credentials in the menu that is displayed.
  3. Click Continue to Security Credentials and expand the Access Keys section to manage or create root account access keys.

CSV Connector for CData Sync

AWSSecretKey

Your AWS account secret key. This value is accessible from your AWS security credentials page.

Remarks

Your AWS account secret key. This value is accessible from your AWS security credentials page:

  1. Sign into the AWS Management console with the credentials for your root account.
  2. Select your account name or number and select My Security Credentials in the menu that is displayed.
  3. Click Continue to Security Credentials and expand the Access Keys section to manage or create root account access keys.

CSV Connector for CData Sync

AWSRoleARN

The Amazon Resource Name of the role to use when authenticating.

Remarks

When authenticating outside of AWS, it is common to use a Role for authentication instead of your direct AWS account credentials. Entering the AWSRoleARN will cause the CData Sync App to perform a role based authentication instead of using the AWSAccessKey and AWSSecretKey directly. The AWSAccessKey and AWSSecretKey must still be specified to perform this authentication. You cannot use the credentials of an AWS root user when setting RoleARN. The AWSAccessKey and AWSSecretKey must be those of an IAM user.

CSV Connector for CData Sync

AWSPrincipalARN

The ARN of the SAML Identity provider in your AWS account.

Remarks

The ARN of the SAML Identity provider in your AWS account.

CSV Connector for CData Sync

AWSRegion

The hosting region for your Amazon Web Services.

Remarks

The hosting region for your Amazon Web Services. Available values are OHIO, NORTHERNVIRGINIA, NORTHERNCALIFORNIA, OREGON, CAPETOWN, HONGKONG, JAKARTA, MUMBAI, OSAKA, SEOUL, SINGAPORE, SYDNEY, TOKYO, CENTRAL, BEIJING, NINGXIA, FRANKFURT, IRELAND, LONDON, MILAN, PARIS, STOCKHOLM, ZURICH, BAHRAIN, UAE, SAOPAULO, GOVCLOUDEAST, and GOVCLOUDWEST.

CSV Connector for CData Sync

AWSCredentialsFile

The path to the AWS Credentials File to be used for authentication.

Remarks

The path to the AWS Credentials File to be used for authentication. See https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html for more information.

CSV Connector for CData Sync

AWSCredentialsFileProfile

The name of the profile to be used from the supplied AWSCredentialsFile.

Remarks

The name of the profile to be used from the supplied AWSCredentialsFile. See https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html for more information.

CSV Connector for CData Sync

AWSSessionToken

Your AWS session token.

Remarks

Your AWS session token. This value can be retrieved in different ways. See this link for more info.

CSV Connector for CData Sync

MFASerialNumber

The serial number of the MFA device if one is being used.

Remarks

You can find the device for an IAM user by going to the AWS Management Console and viewing the user's security credentials. For virtual devices, this is actually an Amazon Resource Name (such as arn:aws:iam::123456789012:mfa/user).

CSV Connector for CData Sync

MFAToken

The temporary token available from your MFA device.

Remarks

If MFA is required, this value will be used along with the MFASerialNumber to retrieve temporary credentials to login. The temporary credentials available from AWS will only last up to 1 hour by default (see TemporaryTokenDuration). Once the time is up, the connection must be updated to specify a new MFA token so that new credentials may be obtained. %AWSpSecurityToken; %AWSpTemporaryTokenDuration;

CSV Connector for CData Sync

ServerSideEncryption

When activated, file uploads into Amazon S3 buckets will be server-side encrypted.

Remarks

Server-side encryption is the encryption of data at its destination by the application or service that receives it. Amazon S3 encrypts your data at the object level as it writes it to disks in its data centers and decrypts it for you when you access it. Learn more: https://docs.aws.amazon.com/AmazonS3/latest/userguide/serv-side-encryption.html

CSV Connector for CData Sync

Azure Authentication

This section provides a complete list of the Azure Authentication properties you can configure in the connection string for this provider.


PropertyDescription
AzureStorageAccountThe name of your Azure storage account.
AzureAccessKeyThe storage key associated with your CSV account.
AzureSharedAccessSignatureA shared access key signature that may be used for authentication.
AzureTenantThe Microsoft Online tenant being used to access data. If not specified, your default tentant will be used.
AzureEnvironmentThe Azure Environment to use when establishing a connection.
CSV Connector for CData Sync

AzureStorageAccount

The name of your Azure storage account.

Remarks

The name of your Azure storage account.

CSV Connector for CData Sync

AzureAccessKey

The storage key associated with your CSV account.

Remarks

The storage key associated with your CSV account. You can retrieve it as follows:

  1. Sign into the azure portal with the credentials for your root account. (https://portal.azure.com/)
  2. Click on storage accounts and select the storage account you want to use.
  3. Under settings, click Access keys.
  4. Your storage account name and key will be displayed on that page.

CSV Connector for CData Sync

AzureSharedAccessSignature

A shared access key signature that may be used for authentication.

Remarks

A shared access signature. You can create one by following these steps:

  1. Sign into the azure portal with the credentials for your root account. (https://portal.azure.com/)
  2. Click on storage accounts and select the storage account you want to use.
  3. Under settings, click Shared Access Signature.
  4. Set the permissions and when the token will expire
  5. Click Generate SAS can copy the token.

CSV Connector for CData Sync

AzureTenant

The Microsoft Online tenant being used to access data. If not specified, your default tentant will be used.

Remarks

The Microsoft Online tenant being used to access data. For instance, contoso.onmicrosoft.com. Alternatively, specify the tenant Id. This value is the directory Id in the Azure Portal > Azure Active Directory > Properties.

Typically it is not necessary to specify the Tenant. This can be automatically determined by Microsoft when using the OAuthGrantType set to CODE (default). However, it may fail in the case that the user belongs to multiple tenants. For instance, if an Admin of domain A invites a user of domain B to be a guest user. The user will now belong to both tenants. It is a good practice to specify the Tenant, although in general things should normally work without having to specify it.

The AzureTenant is required when setting OAuthGrantType to CLIENT. When using client credentials, there is no user context. The credentials are taken from the context of the app itself. While Microsoft still allows client credentials to be obtained without specifying which Tenant, it has a much lower probability of picking the specific tenant you want to work with. For this reason, we require AzureTenant to be explicitly stated for all client credentials connections to ensure you get credentials that are applicable for the domain you intend to connect to.

CSV Connector for CData Sync

AzureEnvironment

The Azure Environment to use when establishing a connection.

Remarks

In most cases, leaving the environment set to global will work. However, if your Azure Account has been added to a different environment, the AzureEnvironment may be used to specify which environment. The available values are GLOBAL, CHINA, USGOVT, USGOVTDOD.

CSV Connector for CData Sync

SSO

This section provides a complete list of the SSO properties you can configure in the connection string for this provider.


PropertyDescription
SSOLoginURLThe identity provider's login URL.
SSOPropertiesAdditional properties required to connect to the identity provider in a semicolon-separated list.
CSV Connector for CData Sync

SSOLoginURL

The identity provider's login URL.

Remarks

The identity provider's login URL.

CSV Connector for CData Sync

SSOProperties

Additional properties required to connect to the identity provider in a semicolon-separated list.

Remarks

Additional properties required to connect to the identity provider in a semicolon-separated list. is used in conjunction with the SSOLoginURL.

SSO configuration is discussed further in .

CSV Connector for CData Sync

OAuth

This section provides a complete list of the OAuth properties you can configure in the connection string for this provider.


PropertyDescription
OAuthVersionThe version of OAuth being used.
OAuthClientIdThe client Id assigned when you register your application with an OAuth authorization server.
OAuthClientSecretThe client secret assigned when you register your application with an OAuth authorization server.
ScopeSpecify scope to obtain the initial access and refresh token.
OAuthGrantTypeThe grant type for the OAuth flow.
OAuthPasswordGrantModeHow to pass Client Id and Secret with OAuthGrantType is set to Password.
OAuthIncludeCallbackURLWhether to include the callback URL in an access token request.
OAuthAuthorizationURLThe authorization URL for the OAuth service.
OAuthAccessTokenURLThe URL to retrieve the OAuth access token from.
OAuthRefreshTokenURLThe URL to refresh the OAuth token from.
OAuthRequestTokenURLThe URL the service provides to retrieve request tokens from. This is required in OAuth 1.0.
AuthTokenThe authentication token used to request and obtain the OAuth Access Token.
AuthKeyThe authentication secret used to request and obtain the OAuth Access Token.
OAuthParamsA comma-separated list of other parameters to submit in the request for the OAuth access token in the format paramname=value.
CSV Connector for CData Sync

OAuthVersion

The version of OAuth being used.

Remarks

The version of OAuth being used. The following options are available: 1.0,2.0

CSV Connector for CData Sync

OAuthClientId

The client Id assigned when you register your application with an OAuth authorization server.

Remarks

As part of registering an OAuth application, you will receive the OAuthClientId value, sometimes also called a consumer key, and a client secret, the OAuthClientSecret.

CSV Connector for CData Sync

OAuthClientSecret

The client secret assigned when you register your application with an OAuth authorization server.

Remarks

As part of registering an OAuth application, you will receive the OAuthClientId, also called a consumer key. You will also receive a client secret, also called a consumer secret. Set the client secret in the OAuthClientSecret property.

CSV Connector for CData Sync

Scope

Specify scope to obtain the initial access and refresh token.

Remarks

Specify scope to obtain the initial access and refresh token.

CSV Connector for CData Sync

OAuthGrantType

The grant type for the OAuth flow.

Remarks

The following options are available: CODE,CLIENT,PASSWORD

CSV Connector for CData Sync

OAuthPasswordGrantMode

How to pass Client Id and Secret with OAuthGrantType is set to Password.

Remarks

The OAuth RFC specifies two methods of passing the OAuthClientId and OAuthClientSecret when using the Password OAuthGrantType. The most commonly used is to pass them via post data to the service. However, some services may require that you pass them via the Authorize header as to be used in BASIC authorization. Change this property to Basic to submit the parameters as part of the Authorize header instead of the post data.

CSV Connector for CData Sync

OAuthIncludeCallbackURL

Whether to include the callback URL in an access token request.

Remarks

This defaults to true since standards-compliant OAuth services will ignore the redirect_uri parameter for grant types like CLIENT or PASSWORD that do not require it.

This option should only be enabled for OAuth services that report errors when redirect_uri is included.

CSV Connector for CData Sync

OAuthAuthorizationURL

The authorization URL for the OAuth service.

Remarks

The authorization URL for the OAuth service. At this URL, the user logs into the server and grants permissions to the application. In OAuth 1.0, if permissions are granted, the request token is authorized.

CSV Connector for CData Sync

OAuthAccessTokenURL

The URL to retrieve the OAuth access token from.

Remarks

The URL to retrieve the OAuth access token from. In OAuth 1.0, the authorized request token is exchanged for the access token at this URL.

CSV Connector for CData Sync

OAuthRefreshTokenURL

The URL to refresh the OAuth token from.

Remarks

The URL to refresh the OAuth token from. In OAuth 2.0, this URL is where the refresh token is exchanged for a new access token when the old access token expires.

CSV Connector for CData Sync

OAuthRequestTokenURL

The URL the service provides to retrieve request tokens from. This is required in OAuth 1.0.

Remarks

The URL the service provides to retrieve request tokens from. This is required in OAuth 1.0. In OAuth 1.0, this is the URL where the app makes a request for the request token.

CSV Connector for CData Sync

AuthToken

The authentication token used to request and obtain the OAuth Access Token.

Remarks

This property is required only when performing headless authentication in OAuth 1.0. It can be obtained from the GetOAuthAuthorizationUrl stored procedure.

It can be supplied alongside the AuthKey in the GetOAuthAccessToken stored procedure to obtain the OAuthAccessToken.

CSV Connector for CData Sync

AuthKey

The authentication secret used to request and obtain the OAuth Access Token.

Remarks

This property is required only when performing headless authentication in OAuth 1.0. It can be obtained from the GetOAuthAuthorizationUrl stored procedure.

It can be supplied alongside the AuthToken in the GetOAuthAccessToken stored procedure to obtain the OAuthAccessToken.

CSV Connector for CData Sync

OAuthParams

A comma-separated list of other parameters to submit in the request for the OAuth access token in the format paramname=value.

Remarks

A comma-separated list of other parameters to submit in the request for the OAuth access token in the format paramname=value.

CSV Connector for CData Sync

JWT OAuth

This section provides a complete list of the JWT OAuth properties you can configure in the connection string for this provider.


PropertyDescription
OAuthJWTCertThe JWT Certificate store.
OAuthJWTCertTypeThe type of key store containing the JWT Certificate.
OAuthJWTCertPasswordThe password for the OAuth JWT certificate.
OAuthJWTCertSubjectThe subject of the OAuth JWT certificate.
OAuthJWTIssuerThe issuer of the Java Web Token.
OAuthJWTSubjectThe user subject for which the application is requesting delegated access.
CSV Connector for CData Sync

OAuthJWTCert

The JWT Certificate store.

Remarks

The name of the certificate store for the client certificate.

The OAuthJWTCertType field specifies the type of the certificate store specified by OAuthJWTCert. If the store is password protected, specify the password in OAuthJWTCertPassword.

OAuthJWTCert is used in conjunction with the OAuthJWTCertSubject field in order to specify client certificates. If OAuthJWTCert has a value, and OAuthJWTCertSubject is set, a search for a certificate is initiated. Please refer to the OAuthJWTCertSubject field for details.

Designations of certificate stores are platform-dependent.

The following are designations of the most common User and Machine certificate stores in Windows:

MYA certificate store holding personal certificates with their associated private keys.
CACertifying authority certificates.
ROOTRoot certificates.
SPCSoftware publisher certificates.

In Java, the certificate store normally is a file containing certificates and optional private keys.

When the certificate store type is PFXFile, this property must be set to the name of the file. When the type is PFXBlob, the property must be set to the binary contents of a PFX file (i.e. PKCS12 certificate store).

CSV Connector for CData Sync

OAuthJWTCertType

The type of key store containing the JWT Certificate.

Remarks

This property can take one of the following values:

USERFor Windows, this specifies that the certificate store is a certificate store owned by the current user. Note: This store type is not available in Java.
MACHINEFor Windows, this specifies that the certificate store is a machine store. Note: this store type is not available in Java.
PFXFILEThe certificate store is the name of a PFX (PKCS12) file containing certificates.
PFXBLOBThe certificate store is a string (base-64-encoded) representing a certificate store in PFX (PKCS12) format.
JKSFILEThe certificate store is the name of a Java key store (JKS) file containing certificates. Note: this store type is only available in Java.
JKSBLOBThe certificate store is a string (base-64-encoded) representing a certificate store in Java key store (JKS) format. Note: this store type is only available in Java.
PEMKEY_FILEThe certificate store is the name of a PEM-encoded file that contains a private key and an optional certificate.
PEMKEY_BLOBThe certificate store is a string (base64-encoded) that contains a private key and an optional certificate.
PUBLIC_KEY_FILEThe certificate store is the name of a file that contains a PEM- or DER-encoded public key certificate.
PUBLIC_KEY_BLOBThe certificate store is a string (base-64-encoded) that contains a PEM- or DER-encoded public key certificate.
SSHPUBLIC_KEY_FILEThe certificate store is the name of a file that contains an SSH-style public key.
SSHPUBLIC_KEY_BLOBThe certificate store is a string (base-64-encoded) that contains an SSH-style public key.
P7BFILEThe certificate store is the name of a PKCS7 file containing certificates.
PPKFILEThe certificate store is the name of a file that contains a PPK (PuTTY Private Key).
XMLFILEThe certificate store is the name of a file that contains a certificate in XML format.
XMLBLOBThe certificate store is a string that contains a certificate in XML format.
GOOGLEJSONThe certificate store is the name of a JSON file containing the service account information. Only valid when connecting to a Google service.
GOOGLEJSONBLOBThe certificate store is a string that contains the service account JSON. Only valid when connecting to a Google service.

CSV Connector for CData Sync

OAuthJWTCertPassword

The password for the OAuth JWT certificate.

Remarks

If the certificate store is of a type that requires a password, this property is used to specify that password in order to open the certificate store.

This is not required when using the GOOGLEJSON OAuthJWTCertType. Google JSON keys are not encrypted.

CSV Connector for CData Sync

OAuthJWTCertSubject

The subject of the OAuth JWT certificate.

Remarks

When loading a certificate the subject is used to locate the certificate in the store.

If an exact match is not found, the store is searched for subjects containing the value of the property.

If a match is still not found, the property is set to an empty string, and no certificate is selected.

The special value "*" picks the first certificate in the certificate store.

The certificate subject is a comma separated list of distinguished name fields and values. For instance "CN=www.server.com, OU=test, C=US, [email protected]". Common fields and their meanings are displayed below.

FieldMeaning
CNCommon Name. This is commonly a host name like www.server.com.
OOrganization
OUOrganizational Unit
LLocality
SState
CCountry
EEmail Address

If a field value contains a comma it must be quoted.

CSV Connector for CData Sync

OAuthJWTIssuer

The issuer of the Java Web Token.

Remarks

The issuer of the Java Web Token. This is typically either the Client Id or Email Address of the OAuth Application.

This is not required when using the GOOGLEJSON OAuthJWTCertType. Google JSON keys contain a copy of the issuer account.

CSV Connector for CData Sync

OAuthJWTSubject

The user subject for which the application is requesting delegated access.

Remarks

The user subject for which the application is requesting delegated access. Typically, the user account name or email address.

CSV Connector for CData Sync

Kerberos

This section provides a complete list of the Kerberos properties you can configure in the connection string for this provider.


PropertyDescription
KerberosKDCThe Kerberos Key Distribution Center (KDC) service used to authenticate the user.
KerberosRealmThe Kerberos Realm used to authenticate the user.
KerberosSPNThe service principal name (SPN) for the Kerberos Domain Controller.
KerberosKeytabFileThe Keytab file containing your pairs of Kerberos principals and encrypted keys.
KerberosServiceRealmThe Kerberos realm of the service.
KerberosServiceKDCThe Kerberos KDC of the service.
KerberosTicketCacheThe full file path to an MIT Kerberos credential cache file.
CSV Connector for CData Sync

KerberosKDC

The Kerberos Key Distribution Center (KDC) service used to authenticate the user.

Remarks

The Kerberos properties are used when using SPNEGO or Windows Authentication. The Sync App will request session tickets and temporary session keys from the Kerberos KDC service. The Kerberos KDC service is conventionally colocated with the domain controller.

If Kerberos KDC is not specified, the Sync App will attempt to detect these properties automatically from the following locations:

  • KRB5 Config File (krb5.ini/krb5.conf): If the KRB5_CONFIG environment variable is set and the file exists, the Sync App will obtain the KDC from the specified file. Otherwise, it will attempt to read from the default MIT location based on the OS: C:\ProgramData\MIT\Kerberos5\krb5.ini (Windows) or /etc/krb5.conf (Linux).
  • Domain Name and Host: If the Kerberos Realm and Kerberos KDC could not be inferred from another location, the Sync App will infer them from the configured domain name and host.

CSV Connector for CData Sync

KerberosRealm

The Kerberos Realm used to authenticate the user.

Remarks

The Kerberos properties are used when using SPNEGO or Windows Authentication. The Kerberos Realm is used to authenticate the user with the Kerberos Key Distribution Service (KDC). The Kerberos Realm can be configured by an administrator to be any string, but conventionally it is based on the domain name.

If Kerberos Realm is not specified, the Sync App will attempt to detect these properties automatically from the following locations:

  • KRB5 Config File (krb5.ini/krb5.conf): If the KRB5_CONFIG environment variable is set and the file exists, the Sync App will obtain the default realm from the specified file. Otherwise, it will attempt to read from the default MIT location based on the OS: C:\ProgramData\MIT\Kerberos5\krb5.ini (Windows) or /etc/krb5.conf (Linux)
  • Domain Name and Host: If the Kerberos Realm and Kerberos KDC could not be inferred from another location, the Sync App will infer them from the user-configured domain name and host. This might work in some Windows environments.

CSV Connector for CData Sync

KerberosSPN

The service principal name (SPN) for the Kerberos Domain Controller.

Remarks

If the SPN on the Kerberos Domain Controller is not the same as the URL that you are authenticating to, use this property to set the SPN.

CSV Connector for CData Sync

KerberosKeytabFile

The Keytab file containing your pairs of Kerberos principals and encrypted keys.

Remarks

The Keytab file containing your pairs of Kerberos principals and encrypted keys.

CSV Connector for CData Sync

KerberosServiceRealm

The Kerberos realm of the service.

Remarks

The KerberosServiceRealm is the specify the service Kerberos realm when using cross-realm Kerberos authentication.

In most cases, a single realm and KDC machine are used to perform the Kerberos authentication and this property is not required.

This property is available for complex setups where a different realm and KDC machine are used to obtain an authentication ticket (AS request) and a service ticket (TGS request).

CSV Connector for CData Sync

KerberosServiceKDC

The Kerberos KDC of the service.

Remarks

The KerberosServiceKDC is used to specify the service Kerberos KDC when using cross-realm Kerberos authentication.

In most cases, a single realm and KDC machine are used to perform the Kerberos authentication and this property is not required.

This property is available for complex setups where a different realm and KDC machine are used to obtain an authentication ticket (AS request) and a service ticket (TGS request).

CSV Connector for CData Sync

KerberosTicketCache

The full file path to an MIT Kerberos credential cache file.

Remarks

This property can be set if you wish to use a credential cache file that was created using the MIT Kerberos Ticket Manager or kinit command.

CSV Connector for CData Sync

SSL

This section provides a complete list of the SSL properties you can configure in the connection string for this provider.


PropertyDescription
SSLClientCertThe TLS/SSL client certificate store for SSL Client Authentication (2-way SSL).
SSLClientCertTypeThe type of key store containing the TLS/SSL client certificate.
SSLClientCertPasswordThe password for the TLS/SSL client certificate.
SSLClientCertSubjectThe subject of the TLS/SSL client certificate.
SSLModeThe authentication mechanism to be used when connecting to the FTP or FTPS server.
SSLServerCertThe certificate to be accepted from the server when connecting using TLS/SSL.
CSV Connector for CData Sync

SSLClientCert

The TLS/SSL client certificate store for SSL Client Authentication (2-way SSL).

Remarks

The name of the certificate store for the client certificate.

The SSLClientCertType field specifies the type of the certificate store specified by SSLClientCert. If the store is password protected, specify the password in SSLClientCertPassword.

SSLClientCert is used in conjunction with the SSLClientCertSubject field in order to specify client certificates. If SSLClientCert has a value, and SSLClientCertSubject is set, a search for a certificate is initiated. See SSLClientCertSubject for more information.

Designations of certificate stores are platform-dependent.

The following are designations of the most common User and Machine certificate stores in Windows:

MYA certificate store holding personal certificates with their associated private keys.
CACertifying authority certificates.
ROOTRoot certificates.
SPCSoftware publisher certificates.

In Java, the certificate store normally is a file containing certificates and optional private keys.

When the certificate store type is PFXFile, this property must be set to the name of the file. When the type is PFXBlob, the property must be set to the binary contents of a PFX file (for example, PKCS12 certificate store).

CSV Connector for CData Sync

SSLClientCertType

The type of key store containing the TLS/SSL client certificate.

Remarks

This property can take one of the following values:

USER - defaultFor Windows, this specifies that the certificate store is a certificate store owned by the current user. Note that this store type is not available in Java.
MACHINEFor Windows, this specifies that the certificate store is a machine store. Note that this store type is not available in Java.
PFXFILEThe certificate store is the name of a PFX (PKCS12) file containing certificates.
PFXBLOBThe certificate store is a string (base-64-encoded) representing a certificate store in PFX (PKCS12) format.
JKSFILEThe certificate store is the name of a Java key store (JKS) file containing certificates. Note that this store type is only available in Java.
JKSBLOBThe certificate store is a string (base-64-encoded) representing a certificate store in JKS format. Note that this store type is only available in Java.
PEMKEY_FILEThe certificate store is the name of a PEM-encoded file that contains a private key and an optional certificate.
PEMKEY_BLOBThe certificate store is a string (base64-encoded) that contains a private key and an optional certificate.
PUBLIC_KEY_FILEThe certificate store is the name of a file that contains a PEM- or DER-encoded public key certificate.
PUBLIC_KEY_BLOBThe certificate store is a string (base-64-encoded) that contains a PEM- or DER-encoded public key certificate.
SSHPUBLIC_KEY_FILEThe certificate store is the name of a file that contains an SSH-style public key.
SSHPUBLIC_KEY_BLOBThe certificate store is a string (base-64-encoded) that contains an SSH-style public key.
P7BFILEThe certificate store is the name of a PKCS7 file containing certificates.
PPKFILEThe certificate store is the name of a file that contains a PuTTY Private Key (PPK).
XMLFILEThe certificate store is the name of a file that contains a certificate in XML format.
XMLBLOBThe certificate store is a string that contains a certificate in XML format.

CSV Connector for CData Sync

SSLClientCertPassword

The password for the TLS/SSL client certificate.

Remarks

If the certificate store is of a type that requires a password, this property is used to specify that password to open the certificate store.

CSV Connector for CData Sync

SSLClientCertSubject

The subject of the TLS/SSL client certificate.

Remarks

When loading a certificate the subject is used to locate the certificate in the store.

If an exact match is not found, the store is searched for subjects containing the value of the property. If a match is still not found, the property is set to an empty string, and no certificate is selected.

The special value "*" picks the first certificate in the certificate store.

The certificate subject is a comma separated list of distinguished name fields and values. For example, "CN=www.server.com, OU=test, C=US, [email protected]". The common fields and their meanings are shown below.

FieldMeaning
CNCommon Name. This is commonly a host name like www.server.com.
OOrganization
OUOrganizational Unit
LLocality
SState
CCountry
EEmail Address

If a field value contains a comma, it must be quoted.

CSV Connector for CData Sync

SSLMode

The authentication mechanism to be used when connecting to the FTP or FTPS server.

Remarks

If SSLMode is set to NONE, default plaintext authentication is used to log in to the server. If SSLMode is set to IMPLICIT, the SSL negotiation will start immediately after the connection is established. If SSLMode is set to EXPLICIT, the Sync App will first connect in plaintext, and then explicitly start SSL negotiation through a protocol command such as STARTTLS. If SSLMode is set to AUTOMATIC, if the remote port is set to the standard plaintext port of the protocol (where applicable), the component will behave the same as if SSLMode is set to EXPLICIT. In all other cases, SSL negotiation will be IMPLICIT.

  • AUTOMATIC
  • NONE
  • IMPLICIT
  • EXPLICIT

CSV Connector for CData Sync

SSLServerCert

The certificate to be accepted from the server when connecting using TLS/SSL.

Remarks

If using a TLS/SSL connection, this property can be used to specify the TLS/SSL certificate to be accepted from the server. Any other certificate that is not trusted by the machine is rejected.

This property can take the following forms:

Description Example
A full PEM Certificate (example shortened for brevity) -----BEGIN CERTIFICATE----- MIIChTCCAe4CAQAwDQYJKoZIhv......Qw== -----END CERTIFICATE-----
A path to a local file containing the certificate C:\cert.cer
The public key (example shortened for brevity) -----BEGIN RSA PUBLIC KEY----- MIGfMA0GCSq......AQAB -----END RSA PUBLIC KEY-----
The MD5 Thumbprint (hex values can also be either space or colon separated) ecadbdda5a1529c58a1e9e09828d70e4
The SHA1 Thumbprint (hex values can also be either space or colon separated) 34a929226ae0819f2ec14b4a3d904f801cbb150d

If not specified, any certificate trusted by the machine is accepted.

Use '*' to signify to accept all certificates. Note that this is not recommended due to security concerns.

CSV Connector for CData Sync

SSH

This section provides a complete list of the SSH properties you can configure in the connection string for this provider.


PropertyDescription
SSHAuthModeThe authentication method to be used to log on to an SFTP server.
SSHClientCertA private key to be used for authenticating the user.
SSHClientCertPasswordThe password of the SSHClientCert key if it has one.
SSHClientCertSubjectThe subject of the SSH client certificate.
SSHClientCertTypeThe type of SSHClientCert private key.
SSHUserThe SSH user.
SSHPasswordThe SSH password.
CSV Connector for CData Sync

SSHAuthMode

The authentication method to be used to log on to an SFTP server.

Remarks

  • None: No authentication will be performed. The current User value is ignored, and the connection will be logged in as anonymous.
  • Password: The Sync App will use the values of User and Password to authenticate the user.
  • Public_Key: The Sync App will use the values of User and SSHClientCert to authenticate the user. SSHClientCert must have a private key available for this authentication method to succeed.

CSV Connector for CData Sync

SSHClientCert

A private key to be used for authenticating the user.

Remarks

SSHClientCert must contain a valid private key in order to use public key authentication. A public key is optional, if one is not included then the Sync App generates it from the private key. The Sync App sends the public key to the server and the connection is allowed if the user has authorized the public key.

The SSHClientCertType field specifies the type of the key store specified by SSHClientCert. If the store is password protected, specify the password in SSHClientCertPassword.

Some types of key stores are containers which may include multiple keys. By default the Sync App will select the first key in the store, but you can specify a specific key using SSHClientCertSubject.

CSV Connector for CData Sync

SSHClientCertPassword

The password of the SSHClientCert key if it has one.

Remarks

This property is only used when authenticating to SFTP servers with SSHAuthMode set to PublicKey and SSHClientCert set to a private key.

CSV Connector for CData Sync

SSHClientCertSubject

The subject of the SSH client certificate.

Remarks

When loading a certificate the subject is used to locate the certificate in the store.

If an exact match is not found, the store is searched for subjects containing the value of the property.

If a match is still not found, the property is set to an empty string, and no certificate is selected.

The special value "*" picks the first certificate in the certificate store.

The certificate subject is a comma separated list of distinguished name fields and values. For instance "CN=www.server.com, OU=test, C=US, [email protected]". Common fields and their meanings are displayed below.

FieldMeaning
CNCommon Name. This is commonly a host name like www.server.com.
OOrganization
OUOrganizational Unit
LLocality
SState
CCountry
EEmail Address

If a field value contains a comma it must be quoted.

CSV Connector for CData Sync

SSHClientCertType

The type of SSHClientCert private key.

Remarks

This property can take one of the following values:

TypesDescriptionAllowed Blob Values
MACHINE/USER Blob values are not supported.
JKSFILE/JKSBLOB base64-only
PFXFILE/PFXBLOBA PKCS12-format (.pfx) file. Must contain both a certificate and a private key.base64-only
PEMKEY_FILE/PEMKEY_BLOBA PEM-format file. Must contain an RSA, DSA, or OPENSSH private key. Can optionally contain a certificate matching the private key.base64 or plain text. Newlines may be replaced with spaces when providing the blob as text.
PPKFILE/PPKBLOBA PuTTY-format private key created using the puttygen tool.base64-only
XMLFILE/XMLBLOBAn XML key in the format generated by the .NET RSA class: RSA.ToXmlString(true).base64 or plain text.

CSV Connector for CData Sync

SSHUser

The SSH user.

Remarks

The SSH user.

CSV Connector for CData Sync

SSHPassword

The SSH password.

Remarks

The SSH password.

CSV Connector for CData Sync

Firewall

This section provides a complete list of the Firewall properties you can configure in the connection string for this provider.


PropertyDescription
FirewallTypeThe protocol used by a proxy-based firewall.
FirewallServerThe name or IP address of a proxy-based firewall.
FirewallPortThe TCP port for a proxy-based firewall.
FirewallUserThe user name to use to authenticate with a proxy-based firewall.
FirewallPasswordA password used to authenticate to a proxy-based firewall.
CSV Connector for CData Sync

FirewallType

The protocol used by a proxy-based firewall.

Remarks

This property specifies the protocol that the Sync App will use to tunnel traffic through the FirewallServer proxy. Note that by default, the Sync App connects to the system proxy; to disable this behavior and connect to one of the following proxy types, set ProxyAutoDetect to false.

Type Default Port Description
TUNNEL 80 When this is set, the Sync App opens a connection to CSV and traffic flows back and forth through the proxy.
SOCKS4 1080 When this is set, the Sync App sends data through the SOCKS 4 proxy specified by FirewallServer and FirewallPort and passes the FirewallUser value to the proxy, which determines if the connection request should be granted.
SOCKS5 1080 When this is set, the Sync App sends data through the SOCKS 5 proxy specified by FirewallServer and FirewallPort. If your proxy requires authentication, set FirewallUser and FirewallPassword to credentials the proxy recognizes.

To connect to HTTP proxies, use ProxyServer and ProxyPort. To authenticate to HTTP proxies, use ProxyAuthScheme, ProxyUser, and ProxyPassword.

CSV Connector for CData Sync

FirewallServer

The name or IP address of a proxy-based firewall.

Remarks

This property specifies the IP address, DNS name, or host name of a proxy allowing traversal of a firewall. The protocol is specified by FirewallType: Use FirewallServer with this property to connect through SOCKS or do tunneling. Use ProxyServer to connect to an HTTP proxy.

Note that the Sync App uses the system proxy by default. To use a different proxy, set ProxyAutoDetect to false.

CSV Connector for CData Sync

FirewallPort

The TCP port for a proxy-based firewall.

Remarks

This specifies the TCP port for a proxy allowing traversal of a firewall. Use FirewallServer to specify the name or IP address. Specify the protocol with FirewallType.

CSV Connector for CData Sync

FirewallUser

The user name to use to authenticate with a proxy-based firewall.

Remarks

The FirewallUser and FirewallPassword properties are used to authenticate against the proxy specified in FirewallServer and FirewallPort, following the authentication method specified in FirewallType.

CSV Connector for CData Sync

FirewallPassword

A password used to authenticate to a proxy-based firewall.

Remarks

This property is passed to the proxy specified by FirewallServer and FirewallPort, following the authentication method specified by FirewallType.

CSV Connector for CData Sync

Proxy

This section provides a complete list of the Proxy properties you can configure in the connection string for this provider.


PropertyDescription
ProxyAutoDetectThis indicates whether to use the system proxy settings or not. This takes precedence over other proxy settings, so you'll need to set ProxyAutoDetect to FALSE in order use custom proxy settings.
ProxyServerThe hostname or IP address of a proxy to route HTTP traffic through.
ProxyPortThe TCP port the ProxyServer proxy is running on.
ProxyAuthSchemeThe authentication type to use to authenticate to the ProxyServer proxy.
ProxyUserA user name to be used to authenticate to the ProxyServer proxy.
ProxyPasswordA password to be used to authenticate to the ProxyServer proxy.
ProxySSLTypeThe SSL type to use when connecting to the ProxyServer proxy.
ProxyExceptionsA semicolon separated list of destination hostnames or IPs that are exempt from connecting through the ProxyServer .
CSV Connector for CData Sync

ProxyAutoDetect

This indicates whether to use the system proxy settings or not. This takes precedence over other proxy settings, so you'll need to set ProxyAutoDetect to FALSE in order use custom proxy settings.

Remarks

This takes precedence over other proxy settings, so you'll need to set ProxyAutoDetect to FALSE in order use custom proxy settings.

To connect to an HTTP proxy, see ProxyServer. For other proxies, such as SOCKS or tunneling, see FirewallType.

CSV Connector for CData Sync

ProxyServer

The hostname or IP address of a proxy to route HTTP traffic through.

Remarks

The hostname or IP address of a proxy to route HTTP traffic through. The Sync App can use the HTTP, Windows (NTLM), or Kerberos authentication types to authenticate to an HTTP proxy.

If you need to connect through a SOCKS proxy or tunnel the connection, see FirewallType.

By default, the Sync App uses the system proxy. If you need to use another proxy, set ProxyAutoDetect to false.

CSV Connector for CData Sync

ProxyPort

The TCP port the ProxyServer proxy is running on.

Remarks

The port the HTTP proxy is running on that you want to redirect HTTP traffic through. Specify the HTTP proxy in ProxyServer. For other proxy types, see FirewallType.

CSV Connector for CData Sync

ProxyAuthScheme

The authentication type to use to authenticate to the ProxyServer proxy.

Remarks

This value specifies the authentication type to use to authenticate to the HTTP proxy specified by ProxyServer and ProxyPort.

Note that the Sync App will use the system proxy settings by default, without further configuration needed; if you want to connect to another proxy, you will need to set ProxyAutoDetect to false, in addition to ProxyServer and ProxyPort. To authenticate, set ProxyAuthScheme and set ProxyUser and ProxyPassword, if needed.

The authentication type can be one of the following:

  • BASIC: The Sync App performs HTTP BASIC authentication.
  • DIGEST: The Sync App performs HTTP DIGEST authentication.
  • NEGOTIATE: The Sync App retrieves an NTLM or Kerberos token based on the applicable protocol for authentication.
  • PROPRIETARY: The Sync App does not generate an NTLM or Kerberos token. You must supply this token in the Authorization header of the HTTP request.

If you need to use another authentication type, such as SOCKS 5 authentication, see FirewallType.

CSV Connector for CData Sync

ProxyUser

A user name to be used to authenticate to the ProxyServer proxy.

Remarks

The ProxyUser and ProxyPassword options are used to connect and authenticate against the HTTP proxy specified in ProxyServer.

You can select one of the available authentication types in ProxyAuthScheme. If you are using HTTP authentication, set this to the user name of a user recognized by the HTTP proxy. If you are using Windows or Kerberos authentication, set this property to a user name in one of the following formats:

user@domain
domain\user

CSV Connector for CData Sync

ProxyPassword

A password to be used to authenticate to the ProxyServer proxy.

Remarks

This property is used to authenticate to an HTTP proxy server that supports NTLM (Windows), Kerberos, or HTTP authentication. To specify the HTTP proxy, you can set ProxyServer and ProxyPort. To specify the authentication type, set ProxyAuthScheme.

If you are using HTTP authentication, additionally set ProxyUser and ProxyPassword to HTTP proxy.

If you are using NTLM authentication, set ProxyUser and ProxyPassword to your Windows password. You may also need these to complete Kerberos authentication.

For SOCKS 5 authentication or tunneling, see FirewallType.

By default, the Sync App uses the system proxy. If you want to connect to another proxy, set ProxyAutoDetect to false.

CSV Connector for CData Sync

ProxySSLType

The SSL type to use when connecting to the ProxyServer proxy.

Remarks

This property determines when to use SSL for the connection to an HTTP proxy specified by ProxyServer. This value can be AUTO, ALWAYS, NEVER, or TUNNEL. The applicable values are the following:

AUTODefault setting. If the URL is an HTTPS URL, the Sync App will use the TUNNEL option. If the URL is an HTTP URL, the component will use the NEVER option.
ALWAYSThe connection is always SSL enabled.
NEVERThe connection is not SSL enabled.
TUNNELThe connection is through a tunneling proxy. The proxy server opens a connection to the remote host and traffic flows back and forth through the proxy.

CSV Connector for CData Sync

ProxyExceptions

A semicolon separated list of destination hostnames or IPs that are exempt from connecting through the ProxyServer .

Remarks

The ProxyServer is used for all addresses, except for addresses defined in this property. Use semicolons to separate entries.

Note that the Sync App uses the system proxy settings by default, without further configuration needed; if you want to explicitly configure proxy exceptions for this connection, you need to set ProxyAutoDetect = false, and configure ProxyServer and ProxyPort. To authenticate, set ProxyAuthScheme and set ProxyUser and ProxyPassword, if needed.

CSV Connector for CData Sync

Logging

This section provides a complete list of the Logging properties you can configure in the connection string for this provider.


PropertyDescription
LogModulesCore modules to be included in the log file.
CSV Connector for CData Sync

LogModules

Core modules to be included in the log file.

Remarks

Only the modules specified (separated by ';') will be included in the log file. By default all modules are included.

See the Logging page for an overview.

CSV Connector for CData Sync

Schema

This section provides a complete list of the Schema properties you can configure in the connection string for this provider.


PropertyDescription
LocationA path to the directory that contains the schema files defining tables, views, and stored procedures.
BrowsableSchemasThis property restricts the schemas reported to a subset of the available schemas. For example, BrowsableSchemas=SchemaA,SchemaB,SchemaC.
TablesThis property restricts the tables reported to a subset of the available tables. For example, Tables=TableA,TableB,TableC.
ViewsRestricts the views reported to a subset of the available tables. For example, Views=ViewA,ViewB,ViewC.
SchemaIniLocationA path to the directory that contains the schema.ini file.
AggregateFilesWhen set to true, the provider will aggregate into a single table called AggregatedFiles all the files located in the URI directory which have the same schema.
MetadataDiscoveryURIUsed together with AggregateFiles , this property specifies a specific file to read the schema of the AggregatedFiles result set.
TypeDetectionSchemeDetermines how to determine the data types of columns.
ColumnCountThe number of columns to detect when dynamically determining columns for the table.
RowScanDepthThe number of rows to scan when dynamically determining columns for the table.
CSV Connector for CData Sync

Location

A path to the directory that contains the schema files defining tables, views, and stored procedures.

Remarks

The path to a directory which contains the schema files for the Sync App (.rsd files for tables and views, .rsb files for stored procedures). The folder location can be a relative path from the location of the executable. The Location property is only needed if you want to customize definitions (for example, change a column name, ignore a column, and so on) or extend the data model with new tables, views, or stored procedures.

If left unspecified, the default location is "%APPDATA%\\CData\\CSV Data Provider\\Schema" with %APPDATA% being set to the user's configuration directory:

CSV Connector for CData Sync

BrowsableSchemas

This property restricts the schemas reported to a subset of the available schemas. For example, BrowsableSchemas=SchemaA,SchemaB,SchemaC.

Remarks

Listing the schemas from databases can be expensive. Providing a list of schemas in the connection string improves the performance.

CSV Connector for CData Sync

Tables

This property restricts the tables reported to a subset of the available tables. For example, Tables=TableA,TableB,TableC.

Remarks

Listing the tables from some databases can be expensive. Providing a list of tables in the connection string improves the performance of the Sync App.

This property can also be used as an alternative to automatically listing views if you already know which ones you want to work with and there would otherwise be too many to work with.

Specify the tables you want in a comma-separated list. Each table should be a valid SQL identifier with any special characters escaped using square brackets, double-quotes or backticks. For example, Tables=TableA,[TableB/WithSlash],WithCatalog.WithSchema.`TableC With Space`.

Note that when connecting to a data source with multiple schemas or catalogs, you will need to provide the fully qualified name of the table in this property, as in the last example here, to avoid ambiguity between tables that exist in multiple catalogs or schemas.

CSV Connector for CData Sync

Views

Restricts the views reported to a subset of the available tables. For example, Views=ViewA,ViewB,ViewC.

Remarks

Listing the views from some databases can be expensive. Providing a list of views in the connection string improves the performance of the Sync App.

This property can also be used as an alternative to automatically listing views if you already know which ones you want to work with and there would otherwise be too many to work with.

Specify the views you want in a comma-separated list. Each view should be a valid SQL identifier with any special characters escaped using square brackets, double-quotes or backticks. For example, Views=ViewA,[ViewB/WithSlash],WithCatalog.WithSchema.`ViewC With Space`.

Note that when connecting to a data source with multiple schemas or catalogs, you will need to provide the fully qualified name of the table in this property, as in the last example here, to avoid ambiguity between tables that exist in multiple catalogs or schemas.

CSV Connector for CData Sync

SchemaIniLocation

A path to the directory that contains the schema.ini file.

Remarks

A path to the directory that contains the schema.ini file. Might additionally be used to specify a different name for the schema.ini file.

CSV Connector for CData Sync

AggregateFiles

When set to true, the provider will aggregate into a single table called AggregatedFiles all the files located in the URI directory which have the same schema.

Remarks

By default, the first file in the folder is used to define the schema, however MetadataDiscoveryURI can be specified to use a different file instead.

Take for example the following CSV contents.

File 1

ItemID,Name,NumInStock
1,Peanuts - Salted,76
2,Peanuts - Unsalted,43
3,Raisins,26

File 2

ItemID,Name,NumInStock
4,Pretzels - Original,55
5,Pretzels - Chocolate,35
6,Toffee,44

The resulting aggregate table is shown below. Note that only the columns present in the defined schema are used in the aggregate.

AggregateFiles

ItemID,Name,NumInStock
1,Peanuts - Salted,76
2,Peanuts - Unsalted,43
3,Raisins,26
4,Pretzels - Original,55
5,Pretzels - Chocolate,35
6,Toffee,44

CSV Connector for CData Sync

MetadataDiscoveryURI

Used together with AggregateFiles , this property specifies a specific file to read the schema of the AggregatedFiles result set.

Remarks

Used together with AggregateFiles, this property specifies a specific file to read the schema of the AggregatedFiles result set.

CSV Connector for CData Sync

TypeDetectionScheme

Determines how to determine the data types of columns.

Remarks

NoneSetting TypeDetectionScheme to None will return all columns as the string type.
RowScanSetting TypeDetectionScheme to RowScan will scan rows to heuristically determine the data type. The RowScanDepth determines the number of rows to be scanned.
ColumnCountSetting TypeDetectionScheme to ColumnCount will control the number for columns to detect and will return all columns as the string type. The ColumnCount property determines the number of columns.

CSV Connector for CData Sync

ColumnCount

The number of columns to detect when dynamically determining columns for the table.

Remarks

The number of columns to detect when dynamically determining columns for the table. Columns are dynamically determined when a schema (RSD) file is not available for the table, such as when using GenerateSchemaFiles. To specify the number of columns set the ColumnCount connection property.

CSV Connector for CData Sync

RowScanDepth

The number of rows to scan when dynamically determining columns for the table.

Remarks

The number of rows to scan when dynamically determining columns for the table. Columns are dynamically determined when a schema (RSD) file is not available for the table, such as when using GenerateSchemaFiles.

Higher values will result in a longer request, but will be more accurate.

Setting this value to 0 (zero) will parse the entire CSV document.

CSV Connector for CData Sync

Data Formatting

This section provides a complete list of the Data Formatting properties you can configure in the connection string for this provider.


PropertyDescription
IncludeColumnHeadersWhether to get column names from the first line of the specified files.
FMTThe format to be used to parse all text files.
ExtendedPropertiesThe Microsoft Jet OLE DB 4.0-compatible extended properties for text files.
RowDelimiterThe character which will be used to detect the end of a CSV row.
SkipTopSkips the amount of rows specified starting from the top.
IgnoreBlankRowsIndicates whether to skip the empty rows.
IncludeEmptyHeadersWhether to include empty value for a column name within column header.
SkipHeaderCommentsIf set to true, skips rows at the top of the file beginning with #.
CharsetSpecifies the session character set for encoding and decoding character data transferred to and from the CSV file. The default value is UTF-8.
QuoteEscapeCharacterDetermines the character which will be used to escape quotes.
QuoteCharacterDetermines the character which will be used to quote values in CSV file.
TrimSpacesSet to True if you want the provider to trim preceeding and trailing spaces in a cell containing a quoted value.
PushEmptyValuesAsNullIndicates whether to read the empty values as empty or as null.
NullValuesA comma separated list which will be replaced with nulls if there are found in the CSV file.
PathSeparatorDetermines the character which will be used to replace the file separator.
IgnoreIncompleteRowsIndicates whether to ignore incomplete rows.
MaxCellLengthMax length a cell can hold, after passing this number the cell content will get truncated. If value is -1 then we don't limit the cell content length.
CSV Connector for CData Sync

IncludeColumnHeaders

Whether to get column names from the first line of the specified files.

Remarks

When this property is set to True, the Sync App will derive column names for each table from the first row of each file. When this property is set to False, column names are simply the column numbers; that is, if column names have not been defined in Schema.ini.

As with Microsoft Jet OLE DB 4.0, this property can also be specified in ExtendedProperties. The IncludeColumnHeaders value specified in ExtendedProperties overrides this property.

The following connection string parses .csv and .log files as CSV without headers:

DataSource=C:\mycsvlogs;IncludeColumnHeaders=False;Include Files='CSV,LOG'

CSV Connector for CData Sync

FMT

The format to be used to parse all text files.

Remarks

When this connection property is set, the Sync App will parse all text files in the URI according to the specified file format. The text file format can also be specified in ExtendedProperties, as with the Microsoft Jet OLE DB 4.0 ExtendedProperties for text files. The format specified in ExtendedProperties overrides the format set as a stand-alone connection property. The Format property in Schema.ini overrides the file format set in the connection string.

The FMT can be set to one of the following values:

  • CsvDelimited: The Sync App separates each field by commas.
  • TabDelimited: The Sync App separates each field by tabs.
  • FixedLength: The Sync App counts a specified number of characters to separate each field. If this format is specified, the width of each column must be defined in Schema.ini.

The following connection string parses all text files in the folder specified in the URI as tab-delimited values with headers:

URI=C:\mytsv;FMT=TabDelimited

If the property is set to anything other than the values specified above, the literal character of the specified input will be read as the delimiter, for example:

URI=C:\mypipdelimitedfile;FMT=||

CSV Connector for CData Sync

ExtendedProperties

The Microsoft Jet OLE DB 4.0-compatible extended properties for text files.

Remarks

The Microsoft Jet OLE DB 4.0-compatible extended properties for text files. You can specify the format of text files in this property. When processing local files, the format specified for an individual file in Schema.ini overrides the format specified in ExtendedProperties.

The following example can be used to parse all text files in the URI folder as tab-delimited values with headers: ExtendedProperties='text;FMT=TabDelimited'.

Parse .csv and .log files as CSV without headers:

ExtendedProperties='text;IncludeColumnHeaders=False';Include Files='CSV,LOG'
To make the connection string -- which is itself delimited -- easier to read, you can specify IncludeColumnHeaders and FMT. These stand-alone properties are overriden by ExtendedProperties.

CSV Connector for CData Sync

RowDelimiter

The character which will be used to detect the end of a CSV row.

Remarks

It is not necessary to specify this property if your CSV file has \r, \n, \r\n, \n\r as row delimiters. It is possible to specify a HEX string as row delimiter (Ex: RowDelimiter=0x01).

CSV Connector for CData Sync

SkipTop

Skips the amount of rows specified starting from the top.

Remarks

Skips the amount of rows specified starting from the top.

CSV Connector for CData Sync

IgnoreBlankRows

Indicates whether to skip the empty rows.

Remarks

Indicates whether to skip the empty rows.

CSV Connector for CData Sync

IncludeEmptyHeaders

Whether to include empty value for a column name within column header.

Remarks

When this property is set to False, the Sync App will not include columns which do not have a value within column header. When set to True, the Sync App will derive column names from the column numbers. This will be only for columns without header value. If a column has a header value, it will remain the same.

CSV Connector for CData Sync

SkipHeaderComments

If set to true, skips rows at the top of the file beginning with #.

Remarks

This will skip rows starting with # until a row is found that does not start with #. Subsequent rows will be read regardless of whether they begin with #.

CSV Connector for CData Sync

Charset

Specifies the session character set for encoding and decoding character data transferred to and from the CSV file. The default value is UTF-8.

Remarks

Specifies the session character set for encoding and decoding character data transferred to and from the CSV file. The default value is UTF-8.

CSV Connector for CData Sync

QuoteEscapeCharacter

Determines the character which will be used to escape quotes.

Remarks

Determines the character which will be used to escape quotes.

CSV Connector for CData Sync

QuoteCharacter

Determines the character which will be used to quote values in CSV file.

Remarks

Determines the character which will be used to quote values in CSV file.

Note: This property works only for CSV files. Set this property to "NONE" if you want to insert fields in a CSV file without quoting them.

CSV Connector for CData Sync

TrimSpaces

Set to True if you want the provider to trim preceeding and trailing spaces in a cell containing a quoted value.

Remarks

Set to True if you want the provider to trim preceeding and trailing spaces in a cell containing a quoted value. If set to False and the first character in a cell is not the quote character, the cell will be treated as a literal unquoted value.

CSV Connector for CData Sync

PushEmptyValuesAsNull

Indicates whether to read the empty values as empty or as null.

Remarks

Indicates whether to read the empty values as empty or as null.

CSV Connector for CData Sync

NullValues

A comma separated list which will be replaced with nulls if there are found in the CSV file.

Remarks

A comma separated list which will be replaced with nulls if there are found in the CSV file. Example: "NaN,\N,N/A". If any of the specified values is found in a CSV row, it will be pushed as null.

CSV Connector for CData Sync

PathSeparator

Determines the character which will be used to replace the file separator.

Remarks

Determines the character which will be used to replace the file separator. If there is a CSV file located in "Test/CSVFiles/Test.csv" and if this property is set to "_", then the table name for this file would be "Test_CSVFiles_Test.csv".

CSV Connector for CData Sync

IgnoreIncompleteRows

Indicates whether to ignore incomplete rows.

Remarks

Indicates whether to ignore the rows that do not match the headers.

CSV Connector for CData Sync

MaxCellLength

Max length a cell can hold, after passing this number the cell content will get truncated. If value is -1 then we don't limit the cell content length.

Remarks

Max length a cell can hold, after passing this number the cell content will get truncated. If value is -1 then we don't limit the cell content length.

CSV Connector for CData Sync

Miscellaneous

This section provides a complete list of the Miscellaneous properties you can configure in the connection string for this provider.


PropertyDescription
BatchNamingConventionDetermines the naming convention of batch files.
ClientCultureThis property can be used to specify the format of data (e.g., currency values) that is accepted by the client application. This property can be used when the client application does not support the machine's culture settings. For example, Microsoft Access requires 'en-US'.
CreateBatchFolderWhether to create a folder or not when InsertMode is set to FilePerBatch.
CultureThis setting can be used to specify culture settings that determine how the provider interprets certain data types that are passed into the provider. For example, setting Culture='de-DE' will output German formats even on an American machine.
CustomHeadersOther headers as determined by the user (optional).
CustomUrlParamsThe custom query string to be included in the request.
DirectoryRetrievalDepthLimit the subfolders recursively scanned when IncludeSubdirectories is enabled.
ExcludeFileExtensionsSet to true if file extensions should be excluded from table names.
ExcludeFilesComma-separated list of file extensions to exclude from the set of the files modeled as tables.
GenerateSchemaFilesIndicates the user preference as to when schemas should be generated and saved.
IncludeDropboxTeamResourcesIndicates if you want to include Dropbox team files and folders.
IncludeFilesComma-separated list of file extensions to include into the set of the files modeled as tables.
IncludeSubdirectoriesWhether to read files from nested folders. In the case of a name collision, table names are prefixed by the underscore-separated folder names.
InsertModeSpecifies the mode for inserting data into CSV files.
MaxRowsLimits the number of rows returned rows when no aggregation or group by is used in the query. This helps avoid performance issues at design time.
OtherThese hidden properties are used only in specific use cases.
PagesizeThe maximum number of results to return per page from CSV.
PseudoColumnsThis property indicates whether or not to include pseudo columns as columns to the table.
TimeoutThe value in seconds until the timeout error is thrown, canceling the operation.
TruncateOnInsertsSet to True if you want the provider to truncate on every (batch) insert.
UserDefinedViewsA filepath pointing to the JSON configuration file containing your custom views.
UseRowNumbersSet this to true if you are deleting or updating in CSV and you do not want to specify a custom schema. This will create a new column with the name RowNumber which will be used as key for that table.
CSV Connector for CData Sync

BatchNamingConvention

Determines the naming convention of batch files.

Remarks

Determines the naming convention of batch files.

  • Timestamp_BatchNumber: The file name formatted as yyyyMMddhhmmssSSS_batchNumber, where the timestamp marks the beginning of the transaction.
  • TableName_BatchNumber: The file name formatted as TableName_batchNumber.csv.

CSV Connector for CData Sync

ClientCulture

This property can be used to specify the format of data (e.g., currency values) that is accepted by the client application. This property can be used when the client application does not support the machine's culture settings. For example, Microsoft Access requires 'en-US'.

Remarks

This option affects the format of Sync App output. To specify the format that defines how input should be interpreted, use the Culture option. By default the Sync App uses the current locale settings of the machine to interpret input and format output.

CSV Connector for CData Sync

CreateBatchFolder

Whether to create a folder or not when InsertMode is set to FilePerBatch.

Remarks

Whether to create a folder or not when InsertMode is set to FilePerBatch.

CSV Connector for CData Sync

Culture

This setting can be used to specify culture settings that determine how the provider interprets certain data types that are passed into the provider. For example, setting Culture='de-DE' will output German formats even on an American machine.

Remarks

This property affects the Sync App input. To interpret values in a different cultural format, use the Client Culture property. By default the Sync App uses the current locale settings of the machine to interpret input and format output.

CSV Connector for CData Sync

CustomHeaders

Other headers as determined by the user (optional).

Remarks

This property can be set to a string of headers to be appended to the HTTP request headers created from other properties, like ContentType, From, and so on.

The headers must be of the format "header: value" as described in the HTTP specifications. Header lines should be separated by the carriage return and line feed (CRLF) characters.

Use this property with caution. If this property contains invalid headers, HTTP requests may fail.

This property is useful for fine-tuning the functionality of the Sync App to integrate with specialized or nonstandard APIs.

CSV Connector for CData Sync

CustomUrlParams

The custom query string to be included in the request.

Remarks

The CustomUrlParams allow you to specify custom query string parameters that are included with the HTTP request. The parameters must be encoded as a query string in the form field1=value1&field2=value2&field3=value3. The values in the query string must be URL encoded.

CSV Connector for CData Sync

DirectoryRetrievalDepth

Limit the subfolders recursively scanned when IncludeSubdirectories is enabled.

Remarks

When IncludeSubdirectories is enabled, DirectoryRetrievalDepth specifies how many subfolders will be recursively scanned before stopping. -1 specifies that all subfolders are scanned.

CSV Connector for CData Sync

ExcludeFileExtensions

Set to true if file extensions should be excluded from table names.

Remarks

Set to true if file extensions should be excluded from table names. For example, if set to True, this will make table `users.csv` appear as `users`.

CSV Connector for CData Sync

ExcludeFiles

Comma-separated list of file extensions to exclude from the set of the files modeled as tables.

Remarks

It is also possible to specify datetime filters. We currently support CreatedDate and ModifiedDate. All extension filters are evaluated in disjunction (using OR operator), and then the resulting filter is evaluated in conjunction (using AND operator) with the datetime filters.

Examples:

ExcludeFiles="TXT,CreatedDate<='2020-11-26T07:39:34-05:00'"
ExcludeFiles="TXT,ModifiedDate<=DATETIMEFROMPARTS(2020, 11, 26, 7, 40, 50, 000)"
ExcludeFiles="ModifiedDate>=DATETIMEFROMPARTS(2020, 11, 26, 7, 40, 49, 000),ModifiedDate<=CURRENT_TIMESTAMP()"

CSV Connector for CData Sync

GenerateSchemaFiles

Indicates the user preference as to when schemas should be generated and saved.

Remarks

This property outputs schemas to .rsd files in the path specified by Location.

Available settings are the following:

  • Never: A schema file will never be generated.
  • OnUse: A schema file will be generated the first time a table is referenced, provided the schema file for the table does not already exist.
  • OnStart: A schema file will be generated at connection time for any tables that do not currently have a schema file.
  • OnCreate: A schema file will be generated by when running a CREATE TABLE SQL query.

Columns defined in .rsd files take precedence over the definitions in Schema.ini. Note that if you want to regenerate a file, you will first need to delete it.

Generate Schemas with SQL

When you set GenerateSchemaFiles to OnUse, the Sync App generates schemas as you execute SELECT queries. Schemas are generated for each table referenced in the query.

When you set GenerateSchemaFiles to OnCreate, schemas are only generated when a CREATE TABLE query is executed.

Generate Schemas on Connection

Another way to use this property is to obtain schemas for every table in your database when you connect. To do so, set GenerateSchemaFiles to OnStart and connect.

CSV Connector for CData Sync

IncludeDropboxTeamResources

Indicates if you want to include Dropbox team files and folders.

Remarks

In order to access Dropbox team folders and files, please set this connection property to True.

CSV Connector for CData Sync

IncludeFiles

Comma-separated list of file extensions to include into the set of the files modeled as tables.

Remarks

Comma-separated list of file extensions to include into the set of the files modeled as tables. For example, IncludeFiles=TXT,TAB. The default is CSV, TAB, and TXT.

A 'NOEXT' value can be specified to include files without an extension.

The following archive types are also supported (currently only when AggregateFiles is true): ZIP, TAR, and GZ.

When archive files are found, they will be downloaded to the local machine so the Sync App can extract and parse the contained files. Note: Files contained within an archive must match an extension listed in IncludeFiles to be included in the set of files modeled as tables.

File masks can be specified using an asterisk (*) to provide enhanced filtering capabilities; e.g. IncludeFiles=2020*.csv,TXT.

Files specified in Schema.ini are honored in addition to the files included by this property.

It is also possible to specify datetime filters. We currently support CreatedDate and ModifiedDate. All extension filters are evaluated in disjunction (using OR operator), and then the resulting filter is evaluated in conjunction (using AND operator) with the datetime filters.

Examples:

IncludeFiles="TXT,CreatedDate<='2020-11-26T07:39:34-05:00'"
IncludeFiles="TXT,ModifiedDate<=DATETIMEFROMPARTS(2020, 11, 26, 7, 40, 50, 000)"
IncludeFiles="ModifiedDate>=DATETIMEFROMPARTS(2020, 11, 26, 7, 40, 49, 000),ModifiedDate<=CURRENT_TIMESTAMP()"

CSV Connector for CData Sync

IncludeSubdirectories

Whether to read files from nested folders. In the case of a name collision, table names are prefixed by the underscore-separated folder names.

Remarks

Whether to read files from nested folders. When accessing local CSV, the Sync App honors Schema.ini defined in subfolders. Table names are prefixed by each nested folder name separated by underscores only in the case of a table name conflict. For example,

Root\subfolder1\tableARoot\subfolder1\subfolder2\tableA
subfolder1_tableAsubfolder1_subfolder2_tableA

When defining a Schema.ini for local CSV folders, table names do not need to be prefixed in the section names. This allows you to move the folder or use the Sync App alongside the OLEDB Jet Driver.

CSV Connector for CData Sync

InsertMode

Specifies the mode for inserting data into CSV files.

Remarks

There are two modes available for inserting data to CSV file:

  • FilePerBatch: A new CSV file will be created for every batch. The name of the file will have the format "yyyyMMddhhmmssSSS_batchId" where the date time represents the beginning of the transaction.
  • SingleFile: In this mode everything will be inserted in a single CSV file.

CSV Connector for CData Sync

MaxRows

Limits the number of rows returned rows when no aggregation or group by is used in the query. This helps avoid performance issues at design time.

Remarks

Limits the number of rows returned rows when no aggregation or group by is used in the query. This helps avoid performance issues at design time.

CSV Connector for CData Sync

Other

These hidden properties are used only in specific use cases.

Remarks

The properties listed below are available for specific use cases. Normal driver use cases and functionality should not require these properties.

Specify multiple properties in a semicolon-separated list.

Integration and Formatting

DefaultColumnSizeSets the default length of string fields when the data source does not provide column length in the metadata. The default value is 2000.
ConvertDateTimeToGMTDetermines whether to convert date-time values to GMT, instead of the local time of the machine.
RecordToFile=filenameRecords the underlying socket data transfer to the specified file.

CSV Connector for CData Sync

Pagesize

The maximum number of results to return per page from CSV.

Remarks

The Pagesize property affects the maximum number of results to return per page from CSV. Setting a higher value may result in better performance at the cost of additional memory allocated per page consumed.

CSV Connector for CData Sync

PseudoColumns

This property indicates whether or not to include pseudo columns as columns to the table.

Remarks

This setting is particularly helpful in Entity Framework, which does not allow you to set a value for a pseudo column unless it is a table column. The value of this connection setting is of the format "Table1=Column1, Table1=Column2, Table2=Column3". You can use the "*" character to include all tables and all columns; for example, "*=*".

CSV Connector for CData Sync

Timeout

The value in seconds until the timeout error is thrown, canceling the operation.

Remarks

If Timeout = 0, operations do not time out. The operations run until they complete successfully or until they encounter an error condition.

If Timeout expires and the operation is not yet complete, the Sync App throws an exception.

CSV Connector for CData Sync

TruncateOnInserts

Set to True if you want the provider to truncate on every (batch) insert.

Remarks

Set to True if you want the provider to truncate on every (batch) insert.

CSV Connector for CData Sync

UserDefinedViews

A filepath pointing to the JSON configuration file containing your custom views.

Remarks

User Defined Views are defined in a JSON-formatted configuration file called UserDefinedViews.json. The Sync App automatically detects the views specified in this file.

You can also have multiple view definitions and control them using the UserDefinedViews connection property. When you use this property, only the specified views are seen by the Sync App.

This User Defined View configuration file is formatted as follows:

  • Each root element defines the name of a view.
  • Each root element contains a child element, called query, which contains the custom SQL query for the view.

For example:

{
	"MyView": {
		"query": "SELECT * FROM NorthwindOData WHERE MyColumn = 'value'"
	},
	"MyView2": {
		"query": "SELECT * FROM MyTable WHERE Id IN (1,2,3)"
	}
}
Use the UserDefinedViews connection property to specify the location of your JSON configuration file. For example:
"UserDefinedViews", "C:\\Users\\yourusername\\Desktop\\tmp\\UserDefinedViews.json"

CSV Connector for CData Sync

UseRowNumbers

Set this to true if you are deleting or updating in CSV and you do not want to specify a custom schema. This will create a new column with the name RowNumber which will be used as key for that table.

Remarks

Set this to true if you are deleting or updating in CSV and you do not want to specify a custom schema. This will create a new column with the name RowNumber which will be used as key for that table.

Copyright (c) 2023 CData Software, Inc. - All rights reserved.
Build 22.0.8462