Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The Database Server Connector can be configured using the Rest API. It requires the following entities to be created:

  • Credential
  • Connection
  • Connector
  • Seed

Below are the examples of how to create the Connection and the Seed. For the Connector, please check this page.

Easy Heading Free
navigationTitleOn this Page
wrapNavigationTexttrue
navigationExpandOptionexpand-all-by-default

Create Credential


Field

Required

Default

Multiple

NotesExample
typeYes-No

The value must be "dbconnectordb-server".

"dbconnectordb-server"

descriptionYes-NoName of the credential object.

"Database ServerCredentialDBConnector"

propertiesYes-NoConfiguration object
"credentialType"yes-NoIt can be basic or Kerberos"basic"
"user"yes-NoThe authorized user"username"
"password"yes-NoUser password"encrypted:8DBA..."

Example

Code Block
themeRDark
titlePOST aspire/_api/credentials
{
    "type": "<Connector Type>db-server",
    "description": "<Connector Name>db-server Credential",
    "properties": {
		  
       "credentialType": "basic",
       "user": "username",
       "password": "encrypted:8DBA..."     
    }
}

Update Credential


Field

Required

Default

Multiple

NotesExample
idYes-NoID of the credential to update."2f2876692a5ca234-d163e328-4e354d40-ad17bb2a-6bbfe9df37782df3e550b065"
descriptionYes-NoName of the credential object.

"Database ServerCredentialDBConnector Credential"

propertiesYes-NoConfiguration object
"credentialType"Yes-NoIt can be basic or Kerberos."kerberos"
"kerberosUser"Yes-NoKerberos username."username"
"keytabFile"Yes-NoPath to the Keytab file."C:\\keytabFilePath"
"externalClasspath"No-NoThe path of the folder where other needed files are located."C:\\externamClasspath"
"hadoopResourceFiles"No-NoThe path to Hadoop files[ ]

Example 

Code Block
themeRDark
titlePUT aspire/_api/credentials/2a5ca234-e328-4d40-bb2a-2df3e550b065
{
    "id": "2a5ca234-e328-4d40-bb2a-2df3e550b065",
  "type": "db-server",
  "description": "<ConnectorDBConnector Name> Credential",
  "throttlePolicy": null,
  "properties": {
		
  
    "credentialType": "kerberos",
    "kerberosUser": "username",
    "keytabFile": "C:\\keytabFilePath",
    "externalClasspath": "C:\\externamClasspath",
    "hadoopResourceFiles": []
  }
}

Create Connection


[ ] IDs routing policies that this connection will use.Configuration object

Field

Required

Default

Multiple

Notes

Example

typeYes-No

The value must be dbconnectorbe db-server

"db-server"dbconnector

descriptionYes-NoName of the connection object.

"MyDatabase ServerConnection"

throttlePolicycredentialNoYes-NoID of the throttle policy that applies to this connection objectcredential."f5587cee-9116-4011-b3a9-6b235b333a1b"routingPolicies
propertiesYes-NoConfiguration object
"serverUrl"Yes-NoThe connection stream of the ["313de87c-3cb9-4fe0-a2cb-17f75ce7d0c7", "b4d2579f-1a0a-4a8b-9fd4-d42780003b36"]propertiesYes-Noserver."Server_URL"
"jdbcDriverJar"Yes-NoThe path to the driver (.jar)"odbc.jar"
"specClass"YesfalseNoSelect this option in case the driver name is non-standard. false
"specClassPath"YesfalseNoSelect this option in case additional drivers need to be uploaded, and add the path of the folder which contains the additional drivers.false
"stopOnScanError"YestrueNoThe scan will be stopped as soon as an error occurs during scanning.false
"prefetchSize"No10No The number of items to be loaded in memory at a time.10
"indexContainers"NotrueNo Indexes the metadata from the databases and tables.true
"extractRowCount"NofalseNoIncludes the number of rows of the table.false
"addSchema"NofalseNoIncludes the tables structure.false
"useTableQuery"NofalseNoA specific query to extract additional data. false
"addResultSet"NofalseNoAdds the content of the tables to the job.false
"extractRows"NofalseNo Indexes all the rows in a table.false

Example

Code Block
themeRDark
titlePOST aspire/_api/connections
{
    "type": "<Connector Type>db-server",
    "description": "<Connector Name>DBserver Test Connector",
    "properties": {          
      "serverUrl": "Server_URL",
      "jdbcDriverJar": "odbc.jar",
      "specClass": false,
      "specClassPath": false,
      "stopOnScanError": false,
      "prefetchSize": 10,
      "indexContainers": true,
      "extractRowCount": false,
      "addSchema": false,
      "useTableQuery": false,
      "addResultSet": false,
      "extractRows": false
     }
}
Info

Please keep in mind that you necessarily need to select  Index DBs and tables or Enable row extraction for the connector to work properly. Please remember that both options are exclusive, so you will not be able to use the two of them at the same time.

Update Connection


Field

Required

Default

Multiple

Notes

Example

idYes-No
Id
ID of the connection to update"89d6632a-a296-426c-adb0-d442adcab4b0",
typeYes-NoType of the connection"db-server"
descriptionNo-NoName of the connection object.

"My

Image Removed

DBServer Connection"

throttlePolicyNo-No
Id
ID of the throttle policy that applies to this connection object."f5587cee-9116-4011-b3a9-6b235b333a1b"
properties
routingPolicies
Yes-No
[ ]
Configuration object
"serverUrl"Yes-NoThe
ids
connection stream of the
routing policies that this connection will use.["313de87c-3cb9-4fe0-a2cb-17f75ce7d0c7", "b4d2579f-1a0a-4a8b-9fd4-d42780003b36"]propertiesYes-NoConfiguration object

Example

server."Server_URL"
"jdbcDriverJar"Yes-NoThe path to the driver (.jar)"odbc.jar"
"specClass"No-NoSelect this option in case the driver name is non-standard. false
"specClassPath"No-NoSelect this option in case additional drivers need to be uploaded, and add the path of the folder which contains the additional drivers.false
"stopOnScanError"YesfalseNoThe scan will be stopped as soon as an error occurs during scanning.false
"prefetchSize"Yes10No The number of items to be loaded in memory at a time.25
"indexContainers"NofalseNo Indexes the metadata from the databases and tables.true
"extractRowCount"NofalseNoIncludes the number of rows of the table.false
"addSchema"NofalseNoIncludes the tables structure.false
"useTableQuery"NofalseNoA specific query to extract additional data. false
"addResultSet"NofalseNoAdds the content of the tables to the job.false
"extractRows"NofalseNo Indexes all the rows in a table.false

Example

Code Block
{
  "id": "b76ed996-2b0c-4ebc-8b0d-9a9e5821f2e3",
  "type": "db-server",
  "description": "DBServerConnector",
  "credential": "98e729c5-2a8b-4aee-aee0-c79ba38f32d3",
  "throttlePolicy": null,
  "properties": {
      "serverUrl": "Server_URL",
      "jdbcDriverJar": "odbc1.jar",
      "specClass": false,
      "specClassPath": false,
      "stopOnScanError": false,
      "prefetchSize": 25,
      "indexContainers": true,
      "extractRowCount": false,
      "addSchema": false,
      "useTableQuery": false,
      "addResultSet": false,
      "extractRows": false
  
Code Block
themeRDark
{
    "id": "89d6632a-a296-426c-adb0-d442adcab4b0",
    "description": "<Connector Name> Test Connector",
    "properties": {
        
    }
}

Create Connector Instance


For the creation of the Connector object using the Rest API, check this page.

Update Connector Instance


For the update of the Connector object using the Rest API, check this page.

Create Seed


Field

Required

Default

Multiple

Notes

Example

seedYes-No<seed description>"dbserver_seed"
typeYes-No

The value must be dbconnector.

dbconnector"db-server"

descriptionYes-NoName of the seed object.

"My Database Server Seed"

connectorYes-NoThe ID of the connector to be used with this seed. The connector type must match the seed type."82f7f0a4-8d28-47ce-8c9d-e3ca414b0d31"
connectionYes-NoThe ID of the connection to be used with this seed. The connection type must match the seed type."602d3700-28dd-4a6a-8b51-e4a663fe9ee6"
workflowsNo[ ]YesThe IDs of the workflows that will be executed for the documents crawled.["f8c414cb-1f5d-42ef-9cc9-5696c3f0bda4"]
throttlePolicyNo-NoID of the throttle policy that applies to this connection object."f5587cee-9116-4011-b3a9-6b235b333a1b"
routingPoliciesNo[ ]YesThe IDs of the routing policies that this seed will use.["313de87c-3cb9-4fe0-a2cb-17f75ce7d0c7", "b4d2579f-1a0a-4a8b-9fd4-d42780003b36"]
tagsNo[ ]YesThe tags of the seed. These can be used to filter the seed.["tag1", "tag2"]
propertiesYes-NoConfiguration object

Example 


"seed"Yes-NoID of the seed to crawl.
"excludeFile"Yes-NoIt can be used to filter the crawled databases and tables. Add the path to the .json file where the excluded items are placed."C:\\excluded.json"
"includeFile"Yes-NoIt can be used to filter the crawled databases and tables. Add the path to the .json file where the included items are placed."C:\\included.json"

Example 

Code Block
{
  "seed": "dbserver_seed",
  "type": "db-server",
  "description": "DBSeed",
  "connector": "a320a91c-2a48-4402-a5f1-c7d2fa913ba2",
  "connection": "b76ed996-2b0c-4ebc-8b0d-9a9e5821f2e3",
 
Code Block
themeRDark
titlePOST aspire/_api/seeds
{
    "type": "<Connector Type>",
    "seed": "directory",
    "connector": "82f7f0a4-8d28-47ce-8c9d-e3ca414b0d31",
    "description": "<connector>_Test_Seed",
    "throttlePolicy": "6b8b5f23-fc77-47a1-9b58-106577162e7b",
    "routingPolicies": ["313de87c-3cb9-4fe0-a2cb-17f75ce7d0c7", "b4d2579f-1a0a-4a8b-9fd4-d42780003b36"],
    "connection": "602d3700-28dd-4a6a-8b51-e4a663fe9ee6",
    "workflows": [
    "f8c414cbf51f5162-1f5dfaaf-42ef43dc-9cc9aa89-5696c3f0bda43b872160f504"
  ],
     "tags": ["tag1", "tag2"],
     "properties": {
    "seed": "dbserver_seed",
       
   "excludeFile": "C:\\excluded.json",
    "includeFile": "C:\\included.json"
  }
}

Update Seed


Field

Required

Default

Multiple

Notes

Example

IDYes-NoID of the seed to update."2f287669-d163-4e35-ad17-6bbfe9df3778"
seedNo-No<seed description>
descriptionNo-NoName of the seed object.

"MyDatabase ServerSeed"

connectorNo-NoThe ID of the connector to be used with this seed. The connector type must match the seed type."82f7f0a4-8d28-47ce-8c9d-e3ca414b0d31"
connectionNo-NoThe ID of the connection to be used with this seed. The connection type must match the seed type."602d3700-28dd-4a6a-8b51-e4a663fe9ee6"
workflowsNo[ ]YesThe IDs of the workflows that will be executed for the documents crawled.["f8c414cb-1f5d-42ef-9cc9-5696c3f0bda4"]
workflows.addNo[ ]YesThe IDs of the workflows to add.["f8c414cb-1f5d-42ef-9cc9-5696c3f0bda4"]
workflows.removeNo[ ]YesThe IDs of the workflows to remove.["f8c414cb-1f5d-42ef-9cc9-5696c3f0bda4"]
throttlePolicyNo-NoID of the throttle policy that applies to this connection object."f5587cee-9116-4011-b3a9-6b235b333a1b"
routingPoliciesNo[ ]YesThe IDs of the routing policies that this seed will use.["313de87c-3cb9-4fe0-a2cb-17f75ce7d0c7", "b4d2579f-1a0a-4a8b-9fd4-d42780003b36"]
routingPolicies.addNo[ ]YesThe IDs of the routingPolicies to add.["b4d2579f-1a0a-4a8b-9fd4-d42780003b36"]
routingPolicies.removeNo[ ]YesThe IDs of the routingPolicies to remove.["313de87c-3cb9-4fe0-a2cb-17f75ce7d0c7"]
tagsNo[ ]YesThe tags of the seed. These can be used to filter the seed["tag1", "tag3"]
tags.addNo[ ]YesThe tags to add["tag4"]
tags.removeNo[ ]YesThe tags to remove["tag2"]
propertiesYes-NoConfiguration object
"seed"Yes-NoID of the seed to crawl."2f287669-d163-4e35-ad17-6bbfe9df3778"
"excludeFile"Yes-NoIt can be used to filter the crawled databases and tables. Add the path to the .json file where the excluded items are placed."C:\\excluded_new.json"
"includeFile"Yes-NoIt can be used to filter the crawled databases and tables. Add the path to the .json file where the included items are placed."C:\\included_new.json"

Example 

Code Block
themeRDark
titlePUT aspire/_api/seeds/2f287669-d163-4e35-ad17-6bbfe9df3778
{
    "id": "2f287669-d163-4e35-ad17-6bbfe9df3778",
  "type": "db-server",
  "seed": "<seed example>dbserver_seed",
    "connector": "82f7f0a4a320a91c-8d282a48-47ce4402-8c9da5f1-e3ca414b0d31c7d2fa913ba2",
    "description": "<connector>_Test_SeedDBSeed",
    "throttlePolicy": "6b8b5f23-fc77-47a1-9b58-106577162e7b"null,
    "routingPoliciesconnection": ["313de87cb76ed996-3cb92b0c-4fe04ebc-a2cb8b0d-17f75ce7d0c79a9e5821f2e3",
  "b4d2579f-1a0a-4a8b-9fd4-d42780003b36"],workflows": [
    "connection": "602d3700-28dd-4a6a-8b51-e4a663fe9ee6",f51f5162-faaf-43dc-aa89-3b872160f504"
  ],
  "workflowstags": ["b255e950-1dac-46dc-8f86-1238b2fbdf27", "f8c414cb-1f5d-42ef-9cc9-5696c3f0bda4"],],
  "properties": {
    "tagsseed": ["tagdbserver_seed", "tag2"],
    "propertiesexcludeFile": {"exclude_new.json",
        
  "includeFile": "include_new.json"
  }
}