Showing results for 
Search instead for 
Did you mean: 

Some questions about using csv2tcxml bulk loader

Gears Phenom Gears Phenom
Gears Phenom

Hello, I would like to clarify a few questions about using csv2tcxml:

1) Do I need to contact GTAC for use it? I filled out the file csv2tcxml_config.txt and tried to download the items.csv file from the examples but I did not succeed, an error occurs:

*** ERROR: Mandatory source_site value [-XXXXXXXXXX] is missing or invalid in ./
csv2tcxml_config.txt and command line input. So, terminating the program.

As far as I understood from this topic, I need to get from GTAC migration site id for migration purpose:

2) I would like to understand whether I should generate UIDs, as in the following scheme:

Generate UIDs.png

Or when converting a csv file into a tcxml, does the utility generate them themselves?

a) In the usage example, it turns out that the UIDs will be generated:

To read the input CSV file and generate a puid-based TC XML file for items:

perl csv2tcxml.perl items.csv

b) But later in the documentation in the section Prepare Teamcenter for bulk load import -> Process for bulk loading Teamcenter data I found the following:

Use the APIs TIE_get_preconstructed_uids and TIE_get_hashed_uid to generate Teamcenter
UIDs for composing the TC XML file containing legacy data.

int TIE_get_preconstructed_uids
int numRequestedUids, (I) Number of UIDs to construct
int* numConstructedUids, (O) Number of UIDs constructed
char*** constructedUids (OF) Number of numConstructedUids
int TIE_get_hashed_uid
int ownSiteId, (I) Site Id of Legacy system
const char* hashKey, (I) Hash Key
char** hashedUID (OF) Valid Teamcenter UID for given hash key

c) and here's what else:

TC XML file with GSID references
Bulk loader supports importing low-level (LL) TC XML files containing global stable ID (GSID)
references (GSIdentity elements). GSIDs are used for object look-up and the bulk load import
handles creation of Teamcenter UIDs for the legacy objects. This relieves the custom mapping
solution from invoking a Teamcenter API for UID creation and identity management.

So I'm a bit confused, do I need to generate a UID?


Re: Some questions about using csv2tcxml bulk loader

Solution Partner Esteemed Contributor Solution Partner Esteemed Contributor
Solution Partner Esteemed Contributor
Yes, you have to call GTAC to get the Site Id.

You have to get the UID's for existing objects in Teamcenter that you want to attach to only. The generator for csv2tcxml generates UID's but uses a different formula so attaching objects to existing objects requires you add the UID's. For importing all new objects then you don't have to worry about it. Hope that clears it up.

Randy Ellsworth, Teamcenter Architect, Applied CAx, LLC
NX 11 | SW 2016 | Creo 4 | TcUA 11.4
Evaluating: AW 3.4

Re: Some questions about using csv2tcxml bulk loader

Gears Phenom Gears Phenom
Gears Phenom

Hello Randy! Thanks for the quick response! He helped me to understand that I was doing everything right.