Page History
Feature available in Helium 6.0.1 release
HTML |
---|
<style> .release-box { height: 30px; width: 100px; padding-top: 8px; text-align: center; border-radius: 5px; font-weight: bold; background-color: #DDA0DD; border-color: #FCE28A; } .release-box:hover { cursor: hand; cursor: pointer; opacity: .9; } </style> <html> <div class="release-box" id="release-box"> <a href="https://docs.perspectium.com/display/Helium" style="text-decoration: none; color: #FFFFFF; display: block;"> Helium </a> </div> <br> </html> |
Attachments are stored in ServiceNow in two separate tables, sys_attachment and sys_attachment_doc. The sys_attachment record holds information about the attachment (such as the file name and file size), while the sys_attachment_doc table contains the actual byte data of the attachment separated into different chunks so as to not have one record take up too much space in a table row. Thus, sending attachment(s) to your database with the DataSync Agent will store the attachment(s) in the two tables just as they are stored in ServiceNow.
However in this state, you're not able to view the attachments (i.e. if the attachment is a JPG, you cannot see the actual image itself) since the attachments are separated as indicated above. By including a SysAttachmentHandler in the DataSync Agent configuration, the attachment(s) will no longer be in the sys_attachment and sys_attachment_doc, but instead will be merged together and stored in a new table called attachments. This allows you to have the actual full complete attachments as if you downloaded them from your ServiceNow instance through the UI.
NOTE: Storing the attachments as complete records will lead to large table rows. Ensure your database has the space to save these large records.
The attachments table gets created to store the fully built attachments has the following structure:
Column | Data Type | Description | ||
---|---|---|---|---|
sys_id | varchar(40) | sys_id of the sys_attachment record If the attachment needs to be broken into chunks before storing into the database, this column will have the following format:
| ||
table_name | varchar(128) | Name of the table that the file is attached to | ||
file_name | varchar(128) | Name of the file | ||
content_type | varchar(128) | Type of file | ||
table_sys_id | varchar(32) | sys_id of the record the file is attached to | ||
position | bigint | Order of the attachment chunk if the attachment is broken into chunks before inserting into the database | ||
attachment | varchar(max) | Attachment byte data |
Prerequisites
First, you will need to set up one of the Perspectium DataSync Agents.
You should also stop running your DataSync Agent before making any Agent configuration changes.
Procedure
To set up merging of attachments, follow these steps:
UI Steps | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|