Versions Compared

Key

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


HTML
<style>
.release-box {
	height: 30px; 
	width: 100px; 
	padding-top: 8px;
	text-align: center; 
	border-radius: 5px; 
	font-weight: bold; 
	background-color: #8efeb3;  
	border-color: #FCE28A;
}

.release-box:hover {
  	cursor: hand;
    cursor: pointer;
    opacity: .9; 
}
</style>
<meta name="robots" content="noindex">

<div class="release-box">
<a href="https://docs.perspectium.com/display/krypton" style="text-decoration: none; color: #FFFFFF; display: block;">
Krypton
</a>
</div>



You can configure your DataSync Agent to share data from ServiceNow or Salesforce to a PostgreSQL database by changing some additional configurations in your agent.xml file


Prerequisites


(warning) First, you will need to Install the DataSync Agent.

(warning) You will also need to create a ServiceNow dynamic share/bulk share.

(warning) Make sure to stop running your DataSync Agent before making any Agent configuration changes.

(warning) Finally, you will need to create a database in PostgreSQL that will store data replicated via the DataSync Agent.


Procedure

To set up your DataSync Agent to share application data to a PostgreSQL database, follow these steps:


UI Steps
sizesmall


UI Step

Add the latest PostgreSQL JDBC driver to your DataSync Agent's extlib directory.


UI Step

Follow the steps to Install the DataSync Agent or the DataSync Agent for Salesforce and make sure that your agent.xml file is configured correctly.


UI Step

Navigate to the directory where you saved your agent.xml file when installing your DataSync Agent.


UI Step

Open your agent.xml file in a text editing application. Then, locate the <task> directive(s) within your <subscribe> directive, and update the following database-related directives:

DirectiveValue to enterRequired?
<database_type>postgresqlYes
<database_server>

URL/IP address for your PostgreSQL database

Yes
<database_port>5432Yes
<database_user>Username used to access your PostgreSQL databaseYes
<database_password>Password used to access your PostgreSQL databaseYes
<database_parms>

Optional database parameters for the connection string used to connect to PostgreSQL.

For example, if you want to use the schema psp_schema, you would specify:

<database_parms>currentSchema=psp_schema</database_parms>  

No



UI Step

Still within the <subscribe> → <task> directive(s), nest the following directive:

Directive

Description

<skip_database_creation/>

Bypasses the dynamic creation of the replicated database

(info) NOTE: This directive is added for a PostgreSQL replication scenario with the DataSync Agent, as you must create the database used for replication in PostgreSQL before configuring your DataSync Agent

Your agent.xml file should look similar to the example shown below:

Code Block
languagexml
themeEclipse
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<config>
    <agent>
       	<share>
     	</share>  
     	<subscribe>
     	<task instances="1">
            <task_name>test_postgresql_subscribe</task_name>
            <message_connection password="encrypted:vlOtU71yu8N/EFIJH85SSBtaIt7qEEfvqiqft9VZyYE=" user="exampleuser" queue="psp.out.replicator.example">https://example.perspectium.net</message_connection>
            <instance_connection password="encrypted:vlOtU71yu8N/EFIJH85SSBtaIt7qEEfvqiqft9VZyYE=" user="example.user">https://myinstance.service-now.com</instance_connection>
            <handler>com.perspectium.replicator.sql.SQLSubscriber</handler>
            <decryption_key>The cow jumped over the moon</decryption_key>
            <database_type>postgresql</database_type>
            <database_server>localhost</database_server>
            <database_port>5432</database_port>
            <database_user>exampleuser</database_user>
            <database_password>examplepassword</database_password>
            <database>psp_db</database>
         </task>
      </subscribe>
      <max_reads_per_connect>4000</max_reads_per_connect>
      <polling_interval>5</polling_interval>
   </agent>
</config>



UI Step

Save the changes you made to your agent.xml file and close the file.


UI Step

After configuring your agent.xml file to support replication to your PostgreSQL database, start running your DataSync Agent again.