Fraska Portal

Exploring the WebSphere Commerce world

Approaching the data load with Scriptella

Posted by on in Data Load
  • Font size: Larger Smaller
  • Hits: 2614
  • 11 Comments
  • Subscribe to this entry
  • Print

How to handle the Data Load process- without customize OOB WCS component- when CSV source data is complex and unstructured

In some cases the WCS Data Load could be really painful if the source data- typically deriving from .CSV files- is quite different from Commerce's one.

A simple example:

Source

SourceProducts.csv

ProductNumber;Category;Name;Description
AAA-111;Trousers;Product A;This is the product A
BBB-222;Trousers>Shorts;Product B;This is the product B
CCC-333;Trousers>Jeans;Product C;This is the product C
...

Looking- in particular- at the category field we can imagine- according to the WCS CSV suggested format- above classification could create some trouble.

 

WCS advisable  format

The data load of the products should run loading first WCS_CSV_1- in order to create the categories- thanWCS_CSV_2 to create the products with the correct relationships with the categories.

WCS_CSV_1: creation of the categories

CatalogGroup,,,,,,,,,,
GroupIdentifier,TopGroup,ParentGroupIdentifier,Sequence,Name
Trousers;1;;;Trousers
Shorts;;Trousers;;Shorts
Jeans;;Trousers;;Jeans

WCS_CSV_2: definition of the products and relationships with the categories

CatalogEntry,,,,,
PartNumber,ParentGroupIdentifier,Name,ShortDescription
AAA-111;Trousers;Product A;This is the product A
BBB-222;Shorts;Product B;This is the product B
CCC-333;Jeans;Product C;This is the product C

 

It seems we cannot use SourceProducts.csv AS IS.

If we want to avoid the customization of WCS Data Load we need to find a way to create WCS_CSV_1 and WCS_CSV_2 starting from SourceProducts.csv.

A suitable solution could be create a Java Client or Ant script, load the source CSV files in temporary tables, elaborate the data, export the CSV files in the format suggested by WCS and finally load the CSV with WCS data load.


To make our life simpler we could adopt the library Scriptella:
http://scriptella.javaforge.com/

 

 

 

 

Rate this blog entry:
0

Comments

Leave your comment

Guest
Guest Monday, 15 July 2019

Most Popular Post

WebSphere Commerce, the curious life of a front-end catalog request
Core
Rate this blog entry:
5
WebSphere Commerce, the SOLR extension index
Administration
Rate this blog entry:
4
WebSphere Commerce, Data Load and SOLR Delta Index
Data Load
Rate this blog entry:
0

Latest Blogs

WebSphere Commerce, CommandLevelAuthorizationCache
Cache
Rate this blog entry:
0
WebSphere Commerce v8, toolkit exception, ClassNotFound db2
Administration
Rate this blog entry:
1
WebSphere Commerce, ATP migration
Store
Rate this blog entry:
0
WebSphere Commerce, the curious life of a front-end catalog request
Core
Rate this blog entry:
5
WebSphere Commerce, Performance analysis of few European stores
Performance
Rate this blog entry:
0