Export Exact Online Article Pictures

This article explains how to export pictures associated with specific articles to a database, Invantive Data Replicator or the file system.

Instructions

Execute the following steps:

  • Run Invantive Query Tool.
  • Log on.
  • Create an in-memory table with the (secured) pictures of the items stored in Exact Online:
create or replace table item_pictures@inmemorystorage
as
select itm.divisionlabel
,      itm.PictureName
,      itm.PictureThumbnailUrl
,      itm.PictureUrl 
,      tnl.imagesize
,      tnl.imagecontenttype
,      tnl.imagecontents
from   exactonlinerest..items itm
join   ThumbnailByUrl(itm.pictureurl) tnl
where  itm.PictureName is not null
  • To save the article pictures in the file system, retrieve the pictures and export them using Invantive Script:
local export documents in imagecontents to "c:\EXPORT-PATH" filename column picturename
  • You can also use a pre-defined Invantive Script variable as target folder as with every string in Invantive Script:
local define OUTPUT_PATH "c:\EXPORT-PATH"

local export documents in imagecontents to "${OUTPUT_PATH}\SUBFOLDER" filename column picturename
  • You can also use Invantive SQL to set the target folder using such an Invantive Script variable:
select 'c:' || '\' || 'EXPORT-PATH' my_folder

local define OUTPUT_PATH "${outcome:0,0}"

local export documents in imagecontents to "${OUTPUT_PATH}\SUBFOLDER" filename column picturename
  • To replicate the item pictures into a configured Data Replicator environment, use the following statements:
select /*+ ods(true) */ count(*)
from   item_pictures@inmemorystorage
  • To just create a table on SQL Server, please make sure you have an alias configured for the database and then run:
create or replace table my_pictures@sqlserver
as
select *
from   item_pictures@inmemorystorage