File-Delimited Data Source
Adding a Delimited File Data Source
A file-delimited data source is a file or set of files with value separators.
If the file does not have a header row, the column names are determined automatically.
If this data source is exported from a staging machine and imported to a production machine, the path for the logs directory might change from C:\<staging>\logs to C:\<production>\logs. Then, only the path to the root directory in the file data source needs to be modified after the data source is imported, and none of the queries to this data source need to be modified. After the root path is modified, it is your responsibility to re-introspect your data to ensure the existence of all the files. If the file structure of the new location is different from the old one, it entails adding/deleting/changing some of the files.
To add a file-delimited data source
|
1.
|
Right-click at a location in the Studio resource tree where you want this data source to reside, and select New Data Source. |
|
2.
|
In the New Physical Data Source dialog, select File-Delimited. |
|
4.
|
Type a name for the data source. |
|
5.
|
Select one of the following: |
|
6.
|
If the file is on the local file system, Select Browse and navigate to the root directory of the files for this data source. |
With this option, you can select one, more, or all the files in a directory. You can also select all the directories and all the files of the same type in those directories. However, even if all the files in the directory are of the comma-separated values (CSV) type, detailed characteristics such as whether a header row exists must match.
|
7.
|
If the files are located at a URL, specify the URL.
|
|
FTP URL
|
HTTP, HTTPS and FTP are supported for reading the data. The file must be in text format and unzipped.
|
|
network location
|
The URL to a single file must be relative to the machine where TDV Server is running.
|
|
machine without a Web server
|
It must be mapped to the machine where TDV Server is running.
|
|
8.
|
Select Use Credentials if you want to specify user credentials here (rather than with system configuration) for connecting the data source.
|
|
Domain
|
User’s domain; for example, composite.
|
|
User Name
|
Name of the user.
|
|
Password
|
User’s password.
|
|
9.
|
Accept the default or specify the Character Set encoding type. |
|
10.
|
Accept the default or specify the delimiter from among the following supported options: |
, (comma)
: (colon)
; (semicolon)
. (period)
/ (forward slash)
\ (backward slash)
<TAB> (horizontal tab—ASCII code character 09 hexadecimal)
<SOH> (start of heading—ASCII code character 01 hexadecimal)
|
11.
|
Accept the default or specify a Text Qualifier for which the whole text in the file is enclosed. |
|
12.
|
Accept the default or specify the number of the row in the file where the data begins. |
|
13.
|
Select the Has Header Row check box if the file text has a header row. |
|
14.
|
Select Ignore trailing delimiter check box if each row can contain a trailing delimiter that you want to ignore. |
|
15.
|
Accept the default file extensions to filter the root directory for, or type in the file extension values for which you want to filter. Example of two filters: *.csv,*.txt (a space is allowed between two filters) |
Rules for the filters:
|
—
|
* (asterisk) means that any character in the filename occurs zero or more times. |
|
—
|
? (question mark) means that any character in the filename occurs exactly once. |
|
—
|
, (comma) is a separator between filters. |
|
—
|
\ (backslash) is an escape character to escape a filename that contains * (asterisk), ? (question mark), or , (comma). |
|
16.
|
Click one of these buttons: |
|
—
|
Create & Introspect—To proceed immediately with introspection. |
|
—
|
Create & Close—To create the data source; you can introspect at a later time. |
|
17.
|
Refer the User Guide, Chapter Retrieving Data Source Metadata for how to introspect now or later. |