- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2016 07:30 PM
I created a Data sources using JDBC(Mysql).
While loading a table that included a LongBlog field, there is a "Character reference "" is an invalid XML character." error.
Other table without blob field can be imported as well.
Can some one help me......
By the way, the first row's Blog item is saved in [sys_attachment] table, but there is no data in ImportSet table.
May be something happend on creating relationship between [sys_attachment] table and ImportSet table.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2016 10:32 PM
Hi Liu,
There is a doc link here which mentions the sys_attachment table:
..
Mapping Binary or BLOB Fields
ServiceNow uses a special process to import binary and binary large object (BLOB) data from JDBC data sources. All binary data is automatically converted into a record in the Attachment [sys_attachment] table before the transformation occurs.
..
To have a transform map access the attachment, use the GlideRecord programming API in an onAfter script.
The script needs to run in an onAfterevent because the target.sys_id object is only available after the data is placed in the import set table. For example, to map the resulting attachment to the target transform record, you can use the following script.
Having said that I am uncertain if LongBlobs are supported - they can be up to 4GB in size - and I only see Blobs mentioned in the ServiceNow docs.
Best Regards
Tony
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2016 10:59 PM
Hi Tony
Thank you for you suggestion.
I'll try BLOB later.