ODBC Driver for CSV

Build 23.0.8839

CSV データソースへの接続

CSV への接続

以下は、本製品 のデフォルトのデータモデリング設定を使用したCSV ファイルまたはストリームへの接続文字列の例です。

サービスプロバイダ URI 形式 接続例
ローカル Single File Path (One table)

file://localPath

Directory Path (one table per file)

file://localPath

URI=C:/folder1;
HTTP または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 または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://myfilesystem@accountName.dfs.core.windows.net/remotepath

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

URI=abfs://myfilesystem@myAccount.dfs.core.windows.net/folder1; AzureAccessKey=myKey;

AzureDataLakeStoreGen2 with SSL abfss://myfilesystem/remotePath

abfss://myfilesystem@accountName.dfs.core.windows.net/remotepath

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

URI=abfss://myfilesystem@myAccount.dfs.core.windows.net/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

動的なスキーマ検出

次のプロパティを設定して、本製品 が接続時に自動的にCSV をテーブルとしてモデル化する方法を制御します。

  • IncludeColumnHeaders:指定したファイルの一行目からカラム名を取得するように設定します(デフォルト)。そうでない場合は、カラム名はカラム番号になります。
  • FMT:テキストファイルのパースに使用する形式に設定します。CsvDelimited(デフォルト)またはTabDelimited。
  • IncludeFiles:テーブルとしてモデル化されたファイル一式に含めるファイル拡張子のカンマ区切りリストに設定します。(デフォルトでは.txt、.tab、および.csv ファイルがモデル化されます。)
  • RowScanDepth:指定した深さまで行をスキャンして、データ型を自動的に決定するように設定します。

ローカルCSV で作業する場合は、Microsoft Jet ドライバーと互換性のあるSchema.ini ファイルを使用してカラムとデータ型を定義することもできます。Schema.ini の使用 を参照してください。

スキーマのカスタマイズ

カラムのデータ型およびスキーマのその他の側面をカスタマイズするには、スキーマを静的なコンフィギュレーションファイルに保存できます。コンフィギュレーションファイルはシンプルな形式となっており、簡単に拡張できます。本製品 スキーマの拡張について詳しくは、スキーマファイルの生成 を参照してください。

サブフォルダへのアクセス

次のプロパティを設定して、サブフォルダをビューとしてモデル化します。

  • IncludeSubdirectories:ネストされたフォルダからファイルやSchema.ini を読み出すように設定します。名前衝突が起こった場合は、テーブル名の前にアンダースコアで区切られたフォルダ名が付けられます。デフォルト値はfalse です。
  • DirectoryRetrievalDepthIncludeSubdirectories が設定されている場合に、再帰的にスキャンするサブフォルダの数を設定します。デフォルトでは、本製品 はすべてのサブフォルダをスキャンします。

IncludeSubdirectories が設定されている場合、自動的に検出されるテーブル名は以下の規則に従います。

ファイルパスRoot\subfolder1\tableARoot\subfolder1\subfolder2\tableA
テーブル名subfolder1_tableAsubfolder1_subfolder2_tableA

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 23.0.8839