Cancel
Showing results for 
Search instead for 
Did you mean: 

Re: CSV2TCXML - Bulk Loader for BOM Uploads

Solution Partner Creator Solution Partner Creator
Solution Partner Creator

Hi Jamie,

 

I'm currently working in a migration use-case for a customer like the one you are referring to. First I need to migrate Solidworks CAD data and then I have to attach Non-CAD datasets as well as generate marketing  BOMs using items generated through csv2tcxml and items generated through Solidworks integration.

 

I created a PUID lookup file and I toggled the switch puid_lookup_file to search the existing PUIDs in the csv2tcxml_config file; however, the xml file generated has the good PUIDs for items generated through the csv2tcxml converter and wrong PUIDs for  items generated by other methods (Manual or through Solidworks integration).

 

This is the BOM.csv file that I'm using as input

 

!parent_item|parent_rev|child_item|child_rev|PSOccurrence:seq_no|PSOccurrence:qty_value
SINC-454788|1|SINC-358975|B|10|1
SINC-454788|1|SINC-006052|A|20|1
SINC-454788|1|SINC-6010218|01|30|1
SINC-454788|1|SINC-253050|A|40|1
SINC-454788|1|SINC-100177|A|50|1
SINC-454788|1|SINC-250723-1|A|60|1
SINC-454788|1|SINC-250307|A|70|1
SINC-454788|1|SINC-250308|A|80|1
SINC-454788|1|SINC-019002|A||REF

 

Below the list of Items created through the csv2tcxml conversion

SINC-006052

SINC-6010218

SINC-019002

 

and this is the list of items created  through solidworks integration

SINC-358975

SINC-253050

SINC-100177

SINC-250723-1

SINC-250307

SINC-250308

 

I'm providing in the puid lookup file  the items and puids listed below (In bold the ones created through the csv2tcxml converter) 

 

i1CAAMJp4HUxrD|SINC-358975!
eHAaimmo_0jGvB|SINC-006052!
1_HgBYyb_0jFVD|SINC-6010218!
CFGAAMJp4HUxrD|SINC-253050!
ikMAAMJp4HUxrD|SINC-100177!
SkNAAIv64HUxrD|SINC-250723-1!
ycMAAMJp4HUxrD|SINC-250307!
DpPAAQl14HUxrD|SINC-250308!
_7OLkBOu_0TYNA|SINC-019002!

 

However the BOM.csv.xml file generated the PUIDs for items created by other methods(Manual of through SW integration) don't match. Below a portion of the xml file generated.

 

<PSOccurrence alternate_etc_ref="" child_bv="" child_item="KkqEp$vs_0jJFC" 

<PSOccurrence alternate_etc_ref="" child_bv="" child_item="eHAaimmo_0jGvB"

<PSOccurrence alternate_etc_ref="" child_bv="" child_item="1_HgBYyb_0jFVD"

<PSOccurrence alternate_etc_ref="" child_bv="" child_item="vBND5F0P_0jnPC"

<PSOccurrence alternate_etc_ref="" child_bv="" child_item="iOHuvBcW_0jzUB"

<PSOccurrence alternate_etc_ref="" child_bv="" child_item="erA9CYxd_0zNCA"

<PSOccurrence alternate_etc_ref="" child_bv="" child_item="vvTr5FZn_0D0vD"

PSOccurrence alternate_etc_ref="" child_bv="" child_item="vvTr5FZn_0D0fA"

<PSOccurrence alternate_etc_ref="" child_bv="" child_item="_7OLkBOu_0TYNA"

 

It seems that the csv2tcxml converter is not considering the puid lookup file provided. I'm attaching the config file. Do you know what am  I doing wrong here? btw I'm on TC 11.4.

 

Thanks,

Re: CSV2TCXML - Bulk Loader for BOM Uploads

Gears Phenom Gears Phenom
Gears Phenom

@rmontero - where is the puid lookup text file stored? In the same folder as the csv2tcxml_config.txt where you are running perl from? 

 

One other thing I would try is to uncomment the query_db to see if it will pull back the correct PUID's. 

# query object's puid from database by attributes. Currently only supports ItemRevision
# query_db|1

Jamie Griffis | PLM Solution Architect | Engineering USA

Re: CSV2TCXML - Bulk Loader for BOM Uploads

Solution Partner Creator Solution Partner Creator
Solution Partner Creator

Hi @Jamie_Griffis , thanks for your reply. Yes, the file is in the same folder as the csv2tcxml_config.txt.

I toggled the "query_db" switch to ON, and effectively  the correct PUIDs were populated into the xml file; however, the downside of using this switch slow down significantly  the csv2tcxml conversion time.

 

I activated the debug option in the csv2tcxml_config.txt, so the  *csv.gsid and *.csv.gsid.out files remain after the conversion. After reviewing the ".gsid" files, instead of using the puid_lookup file with the format per data exchange documentation, see  below.

 

puid-value|item_id-value!

puid-value|item_id-value!A

 

I used  this one( which is the *.csv.gsid.out format)

 

Puid-value,item_id 

Puid-value, item_id!item_rev_id

 

After applying this change in the puid_lookup file format, all puids are being populated  from the puid_lookup file into the xml file appropriately. Also, the conversion time is considerably decreased. I'm validating  with GTAC whether this is an error in the documentation or if is it related to the environment configuration of the customer.

 

 

Enabling the csv2tcxml converter for BOM and datasets bulk upload is the most common migration scenario...I hope this help you guys with your  data migration projects.

 

Regards,