HomeGuidesRecipesAPI
HomeGuidesAPILog In

Data source connection and connection types

How to Connect a Data Source in Manage

  1. Open the Data Source tab in ‘Manage’ and click the ‘New Data Source’ button

  1. Enter the ‘Data Source Name’ in the textbox given, select the ‘Connection Type’ from the drop-down list and enter the ‘Connection String’ for the specified ‘Connection Type’. For more information, refer to Data Source Connection Types below:

  1. Click the ‘Test Connection Button’ to check whether the connection has been established:

  1. Click ‘Save’ button.

Data Source Connection Types

Infiniti uses connection strings to establish a connection to an external data system. There are several data sources from which the data can be can be read and used by Infiniti – CSV, ODBC, OLEDB, Oracle, Web Service, XML, Infiniti, RSS Feed

CSV

The CSV connection type enable the connection to a CSV (.csv) or Text (.txt) file. The format for the connection string is:

csv = data-source-path; fields = field-name1, field-name2,….; hdr = header-row-number; delimiter = delimiter-character; skipheaderrows = number; skipfooterrows= number; widths = width-of-field-1, width-of-field-2,….;
Connection String ParametersDescription
csvPath to the text or csv file
fieldsNames of the fields in the order they appear in the file.
hdrSpecifies the row which is to be considered as the header to retrieve the names of each columns
widthsSets column widths if the text file data source has a fixed width format. Use -1 for a variable width data source
delimiterSet a custom field delimiter. When this value is not supplied the default comma delimiter will be used.
skipheaderrowsIf the text file contains header rows that need to be skipped. State the number of rows to ignore from the top of the CSV file.
skipfooterrowsIf the text file contains footer rows that need to be skipped.

The parameters .csv and fields/hdr are mandatory and the remaining are optional in a .csv connection string.

Example Connection Strings:##

csv=c:\temp\book1.csv;fields=Name,CategoryId;hdr=1;delimiter=|
csv=c:\temp\book1.txt;fields=Name,CategoryId;widths=10,5
csv=c:\temp\book1.csv;fields=Name,CategoryId;skipheaderrows=2;skipfooterrows=2

Example CSV with header and footer rows:##


CLIENT REPORT 01-01-2012
ID,fName,surnam
01,Ben,Smit
03,Sally,Jon
END OF FILE


In recent versions, if the hdr=1 (e.g. first row is header row) attribute is part of the connection string, the field names will be picked up from the txt file and the 'fields' attribute can be left out.

OLEDB

The OLEDB connection type enables the connection to which only support web authentication data sources such as SQL server data sources. The format for the connection string is:

Provider=provider-name;Persist Security Info=True/False;User ID=user-ID;Initial Catalog=SQL-Database-name;Data Source=server-name;password=login-password
Connection String ParametersDescription
ProviderSpecifies the Database provider
Security InfoThe security information.
User IDLogin ID
PasswordLogin Password
Data SourceThe server name
Initial CatalogThe SQL database name

Example Connection Strings##

Provider=SQLOLEDB.1;Persist Security Info=False;User ID=infinitiID;Initial Catalog=Sample Data;Data Source=intelledoxXYZ;password=infinitipassword

OLEDB connections usually require a username and password, these credentials can be part of the connection string or more securely, the username and password fields can be used on the data source screen properties hiding the password from plain view.

Web Service

The Web Service connection type enables the connection to web services which allows users to access the attributes of a function.

The format for the connection string is:
http://webservice link

Example Connection Strings##

http://intelledoxXYZ/sampledata/service1.asmx

XML

The ODBC connection type enables the connection to an XML data source. The format for the connection string is:

xsd=xsd-file-path; xml=xml-file-path;
Connection String ParametersDescription
xsdPath to the xsd file
xmlPath to the xml file

Example Connection Strings##

xsd=C:\temp\Books.xsd; xml=C:\temp\Books.xml;

Infiniti

The Infiniti connection type enables the connection to the internal Infiniti data source that the instance of Infiniti is currently using. A connection string is not required for this data source type as this is already known.

RSS Feed

The RSS Feed connection type enables the connection to an RSS Feed. The connection string must be a URL that points to the RSS feed, usually an XML file. The format for the connection string is a URL, as below.

SQL Server

The SQL Server Database Action Delivers Data to SQL Server via a Stored Procedure via OLEDB.

JSON

Infiniti supports the JSON file format for data sources.

JSON Data Source

The connection string format has a "schema" and a "json" part to it. "schema" points to the schema file in draft v4 syntax and "json" points to your data file. (eg "schema=c:\temp\products.schema.json;json=c:\temp\products.json" )

Data object Name is not used and any value can be entered.

Display fields start with a "$" which just indicates the root of the data, "[]" indicates that this item is repeated.

Filter fields are any path that is not the repeat path itself (ends with "[]").

JSON data sources only support the hierarchical setup for nested repeating items.

Infiniti supports JSON schema draft v4.

REST

For more information see our REST section.

ContentLibraryDataConnector

For more information see How to set up a content library file as a data source.