{"id":64178,"date":"2023-11-16T15:33:48","date_gmt":"2023-11-16T07:33:48","guid":{"rendered":"https:\/\/oihelp.corporate.ifs.com\/help\/?page_id=64178"},"modified":"2024-06-21T15:18:42","modified_gmt":"2024-06-21T07:18:42","slug":"relational-adaptor-features","status":"publish","type":"page","link":"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/primers\/datasources\/relational-adaptor-features\/","title":{"rendered":"Relational Adaptor Features"},"content":{"rendered":"\n<p class=\"intro-text\">The Relational Adaptor allows data from Oracle, SQL Server, and ODBC databases to be transformed into time series data.\u00a0<\/p>\n<h2 class=\"page-subheading\">Relational Adaptor Settings<\/h2>\n<p class=\"intro-text\">The following table lists the adaptor's parameters, along with the <em>name<\/em>\u00a0and\u00a0<em>type<\/em>\u00a0to be used in the Import\/Export spreadsheet.<\/p>\n<p class=\"left-bar\">Related: <a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/primers\/datasources\/writing-queries-for-the-relational-adaptor\/\">Writing Queries for the Relational Adaptor<\/a><\/p>\n<table>\n<thead>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\" width=\"200\"><strong>Parameter<\/strong><\/td>\n<td><strong>Description and example<\/strong><\/td>\n<td><strong>Name<\/strong><\/td>\n<td><strong>Type<\/strong><\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\"><strong><span style=\"color: #800080;\">Connection Type<\/span><\/strong><\/td>\n<td>The type of connection to use to connect to the target relational database. Options: Microsoft SQL Server, Oracle, ODBC, OLEDB.<\/td>\n<td>ConnectionType<\/td>\n<td>String<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\"><strong><span style=\"color: #800080;\">Provider<\/span><\/strong><\/td>\n<td>The OLEDB provider to use for connecting to the target database when the connection type is set to OLEDB.\u00a0Applies to OLEDB only.\u00a0<\/td>\n<td>Provider<\/td>\n<td>String<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\"><strong><span style=\"color: #800080;\">Server<\/span><\/strong><\/td>\n<td>Name of the server to connect to. For Oracle connections, this value can contain the relevant TNS. For ODBC connections, this value is expected to specify the DSN to use.<\/td>\n<td>Server<\/td>\n<td>String<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\"><strong><span style=\"color: #800080;\">Database\u00a0<\/span><\/strong><\/td>\n<td>Name of the database to connect to. This parameter is not required for all database connection types.<\/td>\n<td>Database<\/td>\n<td>String<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\"><strong><span style=\"color: #800080;\">Use Trusted Connection<\/span><\/strong><\/td>\n<td>When this option is selected, a trusted connection will be used to connect to the relational database. Otherwise, the user ID and password must be provided for the connection. Options: True, False.<\/td>\n<td>UseTrustedConnection<\/td>\n<td>Boolean<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\"><strong><span style=\"color: #800080;\">User ID<\/span><\/strong><\/td>\n<td>User ID to use to connect to the target relational database. If trusted connection is used, this value will be ignored and may be left blank.<\/td>\n<td>UserId<\/td>\n<td>String<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\"><strong><span style=\"color: #800080;\">Password<\/span><\/strong><\/td>\n<td>Password to use to connect to the target relational database. If trusted connection is used, this value will be ignored and may be left blank.<\/td>\n<td>Password<\/td>\n<td>EncryptedString<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\"><strong><span style=\"color: #800080;\">Allow Duplicate Timestamps<\/span><\/strong><\/td>\n<td>Whether this data source supports returning multiple values for a given timestamp.\u00a0If this value is set to false and the query returns 2 or more values with the same timestamps, the adaptor will return only 1 of the values and discard other values with the same timestamp. If set to true, the adaptor will return all values even if they have the same timestamp.\u00a0Options: True, False.<\/td>\n<td>AllowDuplicateTimestamps<\/td>\n<td>Boolean<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\"><strong><span style=\"color: #800080;\">Allow Write<\/span><\/strong><\/td>\n<td>Whether this data source should allow IFS OI Server client applications to write data to tags in the relational database. This must be set to true if you want the datasource to handle Put requests to save values in the database. Options: True, False.<\/td>\n<td>AllowWrite<\/td>\n<td>Boolean<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\"><strong><span style=\"color: #800080;\">Tag Name Column<\/span><\/strong><\/td>\n<td>Name of the column containing the name for associated tags. Used by the available tags query and also by single point and historical queries.<\/td>\n<td>TagNameColumn<\/td>\n<td>String<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\"><strong><span style=\"color: #800080;\">Tag Name Column Type<\/span><\/strong><\/td>\n<td>Type of the tag name column. This setting is used to determine what type of query parameter should be generated for filtering tag names. Options: Unicode, NonUnicode<\/td>\n<td>TagNameColumnType<\/td>\n<td>String<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\"><strong><span style=\"color: #800080;\">Wide Tag Name Link<\/span><\/strong><\/td>\n<td>For wide queries, tag names are generated by concatenating the row name and column name of the tag\u2019s value, with a joining string between. This parameter specifies the joining string to use when creating wide tag names. <em>This option was added in version 4.5.3.<\/em><\/td>\n<td>WideTagNameLink<\/td>\n<td>String<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\"><strong><span style=\"color: #800080;\">Tag Description Column<\/span><\/strong><\/td>\n<td>For narrow queries, the name of the column containing the description for associated tags. For wide queries, the columns whose name ends with this text will be treated as the columns containing the descriptions, if the remainder matches another column\u2019s name. If not specified, no description will be displayed in the user interface. Used only by tag discovery query.<\/td>\n<td>TagDescriptionColumn<\/td>\n<td>String<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\"><strong><span style=\"color: #800080;\">Tag Unit Column<\/span><\/strong><\/td>\n<td>For narrow queries, the name of the column containing the units for associated tags. For wide queries, the columns whose names end with this text will be treated as the columns containing the units, if the remainder matches another column\u2019s name. If not specified, no units will be displayed in the user interface. Used only by tag discovery query.<\/td>\n<td>TagUnitColumn<\/td>\n<td>String<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\"><strong><span style=\"color: #800080;\">Tag Maximum Value Column<\/span><\/strong><\/td>\n<td>For narrow queries, the name of the column containing the maximum value for associated tags. For wide queries, the columns whose names end with this text will be treated as the columns containing the maximum values, if the remainder matches another column\u2019s name. If not specified, no maximum value will be displayed in the user interface. Used only by tag discovery query.<\/td>\n<td>TagMaximumValueColumn<\/td>\n<td>String<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\"><strong><span style=\"color: #800080;\">Tag Minimum Value Column<\/span><\/strong><\/td>\n<td>For narrow queries, the name of the column containing the minimum value for associated tags. For wide queries, the columns whose names end with this text will be treated as the columns containing the minimum values, if the remainder matches another column\u2019s name. If not specified, no minimum value will be displayed in the user interface. Used only by tag discovery query.<\/td>\n<td>TagMinimumValueColumn<\/td>\n<td>String<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\"><strong><span style=\"color: #800080;\">Data Timestamp Column<\/span><\/strong><\/td>\n<td>Name of the column containing the timestamp of fetched data points. Used by single point and historical queries.<\/td>\n<td>DataTimestampColumn<\/td>\n<td>String<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\"><strong><span style=\"color: #800080;\">Data Value Column<\/span><\/strong><\/td>\n<td>Name of the column containing the value of fetched data points. Used by single point and historical Narrow queries; Wide queries ignore this value.<\/td>\n<td>DataValueColumn<\/td>\n<td>String<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\"><strong><span style=\"color: #800080;\">Data Confidence Column<\/span><\/strong><\/td>\n<td>Name of the column containing the confidence of fetched data points. Used by single point and historical queries.<\/td>\n<td>DataConfidenceColumn<\/td>\n<td>String<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\"><strong><span style=\"color: #800080;\">Query Type<\/span><\/strong><\/td>\n<td>Type of the configured queries which determines how the adaptor will handle the configured queries and statements. This value also determines what kind of keywords will be available. Options: Narrow, Wide.<\/td>\n<td>QueryType<\/td>\n<td>String<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\"><strong><span style=\"color: #800080;\">Available Tags Query<\/span><\/strong><\/td>\n<td>SQL query which returns the list of available tags.<\/td>\n<td>AvailableTagsQuery<\/td>\n<td>String<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\"><strong><span style=\"color: #800080;\">Single Point Raw Query<\/span><\/strong><\/td>\n<td>SQL query which returns the raw values for the given tags at a timestamp. This query should be written to return, at minimum, the single value on or immediately before the given timestamp or no rows.<\/td>\n<td>SinglePointRawQuery<\/td>\n<td>String<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\"><strong><span style=\"color: #800080;\">Use Single Point Last Known Value Query<\/span><\/strong><\/td>\n<td>When this option is selected, the configured Single Point Last Known Value Query will be used for resolving single-point requests with the Last Known Value sampling method. Otherwise, the Single Point Raw Query will be used and additional, built-in calculations will be performed to produce last known values. Options: True, False.<\/td>\n<td>UseSinglePointLastKnownValueQuery<\/td>\n<td>Boolean<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\"><strong><span style=\"color: #800080;\">Single Point Last Known Value Query<\/span><\/strong><\/td>\n<td>The SQL query which returns the last known value for the given tags at a timestamp. If this query is not defined, raw queries will be executed and sampling will be done by the adaptor.<\/td>\n<td>SinglePointLastKnownValueQuery<\/td>\n<td>String<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\"><strong><span style=\"color: #800080;\">Use Single Point Average Query<\/span><\/strong><\/td>\n<td>When this option is selected, the configured Single Point Average Query will be used for resolving single-point requests with the Average sampling method. Otherwise, the Single Point Raw Query will be used and additional, built-in calculations will be performed to produce average values. Options: True, False.<\/td>\n<td>UseSinglePointAverageQuery<\/td>\n<td>Boolean<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\"><strong><span style=\"color: #800080;\">Single Point Average Query\u00a0<\/span><\/strong><\/td>\n<td>The SQL query which returns the calculated average values for the given tags at a timestamp. If this query is not defined, raw queries will be executed and sampling will be done by the adaptor.<\/td>\n<td>SinglePointAverageQuery<\/td>\n<td>String<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\"><strong><span style=\"color: #800080;\">Use Single Point Linear Interpolate Query<\/span><\/strong><\/td>\n<td>When this option is selected, the configured Single Point Linear Interpolate Query will be used for resolving single-point requests with the Linear Interpolate sampling method. Otherwise, the Single Point Raw Query will be used and additional, built-in calculations will be performed to produce linear interpolate values. Options: True, False.<\/td>\n<td>UseSinglePointLinearInterpolateQuery<\/td>\n<td>Boolean<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\"><strong><span style=\"color: #800080;\">Single Point Linear Interpolate Query<\/span><\/strong><\/td>\n<td>The SQL query which returns a calculated linear interpolated value for the given tags at a timestamp. If this query is not defined, \u00a0raw queries will be executed and sampling will be done by the adaptor.<\/td>\n<td>SinglePointLinearInterpolateQuery<\/td>\n<td>String<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\"><strong><span style=\"color: #800080;\">Historical Raw Query<\/span><\/strong><\/td>\n<td>The SQL query which returns the raw values for the given tags within the time range.<\/td>\n<td>HistoricalRawQuery<\/td>\n<td>String<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\"><strong><span style=\"color: #800080;\">Use Historical Last Known Value Query<\/span><\/strong><\/td>\n<td>When this option is selected, the configured Historical Last Known Value Query will be used for resolving historical requests with the Last Known Value sampling method. Otherwise, the Historical Raw Query will be used and additional, built-in calculations will be performed to produce last known values. Options: True, False.<\/td>\n<td>UseHistoricalLastKnownValueQuery<\/td>\n<td>Boolean<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\"><strong><span style=\"color: #800080;\">Historical Last Known Value Query<\/span><\/strong><\/td>\n<td>SQL query which returns the last known values for the given tags within the time range. If this query is not defined then the raw queries will be executed and sampling will be done by the adaptor.<\/td>\n<td>HistoricalLastKnownValueQuery<\/td>\n<td>String<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\"><strong><span style=\"color: #800080;\">Use Historical Average Query<\/span><\/strong><\/td>\n<td>When this option is selected, the configured Historical Average Query will be used for resolving historical requests with the Average sampling method. Otherwise, the Historical Raw Query will be used and additional, built-in calculations will be performed to produce average values. Options: True, False.<\/td>\n<td>UseHistoricalAverageQuery<\/td>\n<td>Boolean<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\"><strong><span style=\"color: #800080;\">Historical Average Query<\/span><\/strong><\/td>\n<td>The SQL query which returns the calculated average values for the given tags within the time range. If this query is not defined, the raw queries will be executed and sampling will be done by the adaptor.<\/td>\n<td>HistoricalAverageQuery<\/td>\n<td>String<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\"><strong><span style=\"color: #800080;\">Use Historical Linear Interpolate Query<\/span><\/strong><\/td>\n<td>When this option is selected, the configured Historical Linear Interpolate Query will be used for resolving historical requests with the Linear Interpolate sampling method. Otherwise, the Historical Raw Query will be used and additional, built-in calculations will be performed to produce linear interpolate values. Options: True, False.<\/td>\n<td>UseHistoricalLinearInterpolateQuery<\/td>\n<td>Boolean<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\"><strong><span style=\"color: #800080;\">Historical Linear Interpolate Query<\/span><\/strong><\/td>\n<td>The SQL query which returns the calculated linear interpolated values for the given tags within the time range. If this query is not defined, raw queries will be executed and sampling will be done by the adaptor.<\/td>\n<td>HistoricalLinearInterpolateQuery<\/td>\n<td>String<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\"><strong><span style=\"color: #800080;\">Put Select Query<\/span><\/strong><\/td>\n<td>When Allow Write is enabled, this SQL statement will be executed to determine whether a row for the given timestamp already exists in the target database. If this query does not return any rows, an insert operation will be performed; otherwise an update operation will be done.\u00a0<\/td>\n<td>PutSelectQuery<\/td>\n<td>String<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\"><strong><span style=\"color: #800080;\">Put Insert Statement<\/span><\/strong><\/td>\n<td>When Allow Write is enabled, this SQL statement will be executed to insert new rows in the target database.<\/td>\n<td>PutInsertStatement<\/td>\n<td>String<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\"><strong><span style=\"color: #800080;\">Put Update Statement<\/span><\/strong><\/td>\n<td>When Allow Write is enabled, this SQL statement will be executed to update the value of existing rows in the target database.<\/td>\n<td>PutUpdateStatement<\/td>\n<td>String<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The Relational Adaptor allows data from Oracle, SQL Server, and ODBC databases to be transformed into time series data.\u00a0<\/p>\n<p class=\"continue-reading-button\"> <a class=\"continue-reading-link\" href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/primers\/datasources\/relational-adaptor-features\/\">Read more<i class=\"crycon-right-dir\"><\/i><\/a><\/p>\n","protected":false},"author":1,"featured_media":4352,"parent":3668,"menu_order":19,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":"","_members_access_role":[],"_members_access_error":""},"categories":[9],"tags":[320],"class_list":["post-64178","page","type-page","status-publish","has-post-thumbnail","hentry","category-tech-ref","tag-relational-adaptor","Product-srv"],"_links":{"self":[{"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/pages\/64178","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/comments?post=64178"}],"version-history":[{"count":3,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/pages\/64178\/revisions"}],"predecessor-version":[{"id":67518,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/pages\/64178\/revisions\/67518"}],"up":[{"embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/pages\/3668"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/media\/4352"}],"wp:attachment":[{"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/media?parent=64178"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/categories?post=64178"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/tags?post=64178"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}