Cancel
Showing results for 
Search instead for 
Did you mean: 

Re: csv2tcxml/TCXML data migration in TC11.2.x

Pioneer
Pioneer

@Jamie_Griffis

 

I am not creating any BOM's only items and datasets.

 

Can you create items and datasets at the same time or do you have to do them seperately?

 

I think I have the config correct and tried running the csv2tcxml.perl script to do the conversion but I am getting an error.

 

Attached are my CSV file, the log file and a screen shot of the CMD session.

 

The error says:  ERROR     : Header column count [0] mismatching row column count [10]

 

Do I have something set up wrong?

 

Also, some documentation I have says to set the GMS_tcxml_string_seperator to a semicolon but that config variable is not in my csv2tcxml_config file. Do I need to set that?

 

 Capture.JPG

Highlighted

Re: csv2tcxml/TCXML data migration in TC11.2.x

Gears Phenom Gears Phenom
Gears Phenom

@curt0724 - Looking at your csv file I see a potential issue. It shows your Revision is set to ISSUED? Shouldn't that be 1,2,3 or A,B,C?

 

You should be able to create both item and dataset as long as the item isn't already created in TC and you do not use the item=exist switch during conversion. Again, each version of TC runs a little differently and it is hard to keep it all straight, so you might have to do it as 2 seperate loads.

 

The default seperator is a comma and you are using that in your Item Name which could be causing your issue. First I'd try putting it in the csv2tcxml_file to set it. Look for this following section:

 

# Separator used in TCXML to split VLA attribute values.
# values: any string as separator
GMS_tcxml_string_separator|;

 

 

But if that doesn't work, to set the semicolon seperator you will run the following command in a TC CMD prompt. But make sure you set it back to comma or it will cause other issues in TC. 

preferences_manager -u=<dba account> -p=<password> -mode=import -preference=GMS_tcxml_string_separator -values=";" -scope=site -action=OVERRIDE

 

Jamie Griffis, Teamcenter ArchitectApplied CAx, LLC

Jamie Griffis | Teamcenter Architect | Applied CAx, LLC

Re: csv2tcxml/TCXML data migration in TC11.2.x

Pioneer
Pioneer

Thank you!

Re: csv2tcxml/TCXML data migration in TC11.2.x

Valued Contributor
Valued Contributor

Hi Jamie,

 

Facing below error for tcxml

 

C:\SPLM\Teamcenter11\tcdata\csv2tcxml_perl>tcxml_import -u=infodba -p=infodba -g=dba -file=items111.csv.xml -bulk_load -site=-75*******
Executing lowlevel import
         In bulkload mode
The import operation has completed with errors. Please see  items111.csv_importer.log for details.
*** Import Error(s):
     11042: XML file fails schema validation

 

Import Log file entries
                       Fast Import Log File Header  

**********************************************************************

Teamcenter version :  Teamcenter V11000.2.5.50_20171201.00
XSLT-FileName is   :  Mapping_of_copy_stable_id.xsl
Syslog-FileName    : \Temp\tcxml_import3538a85a.syslog
Input File Name    :  Part.csv.xml
Import mode        :  Low-level Bulkload
Source site-id     :  -75*******
**********************************************************************

TIEFastImportSAXHandler Error: [no declaration found for element 'TCXML'] encountered in xml at line [2] and column [46].
Import exit with error
no declaration found for element 'TCXML'
ElemId    ClassName                     Uid                 Status         Comments
--------------------------------------------------------------------------------------

------- Processing Org/Admin Object -------

Import exit with error
Failed during Preprocessing of input Xml File

 

Note: Generate bmide schema and also config for csv2tcxml

  1. bmide_generatetcplmxmlschema -u=infodba -p=***** -g=dba -schema_type=llschema
  2. tcperl csv2tcxml.perl install -u=infodba -p=***** -g=dba

 

sample CSV entries

!Item:item_id|ItemRevision:item_revision_id|Item:object_name;ItemRevision:object_name|Item:object_desc;ItemRevision:object_desc|owning_user|owning_group
1111111|A|1111111|1111111|infodba|dba

 

XML from csv:

<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<TCXML format="low_level" authKey="17418558">

  <Header author="csv2tcxml" date="2019-03-04" elemId="id13" originatingSite="-75******" time="18:11:26">
    <TraverseRootRefs></TraverseRootRefs>
    <OptionSet elemId="id14" name="SiteConsolidationDefault"/>
  </Header>
  <Group name="dba" island_id="0" elemId="id2" />
  <ImanType island_id="0" elemId="id6" type_class="ImanRelation" type_name="IMAN_master_form" />
  <User island_id="0" elemId="id1" user_id="infodba" />

<!-- 1111111 -->
  <Anchor acl_bits="0" creation_date="2019-03-04T18:11:25Z" island_id="1" elemId="id8" keep_limit="3" last_mod_date="2019-03-04T18:11:28Z" last_mod_user="#id1" lsd="2019-03-04T18:11:25Z" owning_group="#id2" owning_site="" owning_user="#id1" puid="o9V6$IH6_gxpXA" />
  <Form acl_bits="0" creation_date="2019-03-04T18:11:25Z" data_file="lFlBSCDQ_ghhKA" island_id="1" elemId="id5" form_file="NA" last_mod_date="2019-03-04T18:11:28Z" last_mod_user="#id1" lsd="2019-03-04T18:11:25Z" object_application="Teamcenter" object_name="1111111" object_type="Item Master" owning_group="#id2" owning_site="" owning_user="#id1" puid="EWGtb4mN_gBLgC" revision_limit="1" revision_number="0" />
  <Form acl_bits="0" creation_date="2019-03-04T18:11:25Z" data_file="q2CfKU44_gxNAC" island_id="1" elemId="id11" form_file="NA" last_mod_date="2019-03-04T18:11:28Z" last_mod_user="#id1" lsd="2019-03-04T18:11:25Z" object_application="Teamcenter" object_name="1111111/A" object_type="ItemRevision Master" owning_group="#id2" owning_site="" owning_user="#id1" puid="3oXOJjGz_ghAcA" revision_limit="1" revision_number="0" />
  <ImanRelation island_id="1" elemId="id7" fnd0CopyStableId="UpJ9l70r_gxHsC" lsd="2019-03-04T18:11:25Z" owning_site="" primary_object="mvSMApfN_gxDOB" puid="UpJ9l70r_gxHsC" relation_type="#id6" secondary_object="EWGtb4mN_gBLgC" />
  <ImanRelation island_id="1" elemId="id12" fnd0CopyStableId="zex6E23k_gRS7B" lsd="2019-03-04T18:11:25Z" owning_site="" primary_object="cIk2vR9g_gxmGA" puid="zex6E23k_gRS7B" relation_type="#id6" secondary_object="3oXOJjGz_ghAcA" />
  <Item acl_bits="0" configuration_object_tag="" creation_date="2019-03-04T18:11:25Z" island_id="1" elemId="id3" item_id="1111111" last_mod_date="2019-03-04T18:11:28Z" last_mod_user="#id1" lsd="2019-03-04T18:11:25Z" object_application="Teamcenter" object_desc="1111111" object_name="1111111" object_type="Item" owning_group="#id2" owning_site="" owning_user="#id1" puid="mvSMApfN_gxDOB" revision_limit="1" revision_number="0" uom_tag="" />
  <ItemMaster acl_bits="0" creation_date="2019-03-04T18:11:25Z" island_id="1" elemId="id4" last_mod_date="2019-03-04T18:11:28Z" last_mod_user="#id1" lsd="2019-03-04T18:11:25Z" owning_group="#id2" owning_site="" owning_user="#id1" puid="lFlBSCDQ_ghhKA" />
  <ItemRevision acl_bits="0" creation_date="2019-03-04T18:11:25Z" island_id="1" elemId="id9" item_revision_id="A" items_tag="mvSMApfN_gxDOB" last_mod_date="2019-03-04T18:11:28Z" last_mod_user="#id1" lsd="2019-03-04T18:11:25Z" object_application="Teamcenter" object_desc="1111111" object_name="1111111" object_type="ItemRevision" owning_group="#id2" owning_site="" owning_user="#id1" puid="cIk2vR9g_gxmGA" revision_limit="1" revision_number="0" sequence_anchor="o9V6$IH6_gxpXA" sequence_id="1" sequence_limit="0" />
  <ItemVersionMaster acl_bits="0" creation_date="2019-03-04T18:11:25Z" island_id="1" elemId="id10" last_mod_date="2019-03-04T18:11:28Z" last_mod_user="#id1" lsd="2019-03-04T18:11:25Z" owning_group="#id2" owning_site="" owning_user="#id1" puid="q2CfKU44_gxNAC" />

</TCXML>

 

Please suggest.

Thanks

Shekhar

Re: csv2tcxml/TCXML data migration in TC11.2.x

Gears Phenom Gears Phenom
Gears Phenom

@OmprakashR - What version of TC? What version of csv2tcxml.perl (open the perl and find the version)? Can you share your csv2tcxml_config file as well? 

Jamie Griffis | Teamcenter Architect | Applied CAx, LLC

Re: csv2tcxml/TCXML data migration in TC11.2.x

Valued Contributor
Valued Contributor

Hi Jamie,

 

TC version is TC 11.4

csv2tcxml.perl is v26.4  09/21/17

attached is csv2tcxml_config file.

 

thanks

 

Re: csv2tcxml/TCXML data migration in TC11.2.x

Gears Phenom Gears Phenom
Gears Phenom

@OmprakashR - that all looks good. It is hard to know where your error ends in the first message. Is this statement part of the error or not? If not, please do these steps. 

 

Note: Generate bmide schema and also config for csv2tcxml

  1. bmide_generatetcplmxmlschema -u=infodba -p=***** -g=dba -schema_type=llschema
  2. tcperl csv2tcxml.perl install -u=infodba -p=***** -g=dba

 

Whenever you deploy a change to your BMIDE template, you must do these 2 steps. It could cause problems because it doesn't know your schema changes. I'd also suggest downloading the latest TC11.x patch and getting the newer csv2tcxml.perl (but always keep a copy of the original). I've used newer versions of the perl without issue but make sure it is extracted from the csv2tcxml_perl folder only. What happens when you do all this? What errors?

Jamie Griffis | Teamcenter Architect | Applied CAx, LLC

Re: csv2tcxml/TCXML data migration in TC11.2.x

Valued Contributor
Valued Contributor

Tried 11.5 and 11.6 csv2tcxml.perl , same problem.

 

thanks

 

Re: csv2tcxml/TCXML data migration in TC11.2.x

Gears Phenom Gears Phenom
Gears Phenom

@OmprakashR - do you have a syslog from the load attempt that you can share? Can you give me your basic steps from start to finish? Also, can you run the tcxml_import without the site switch in the cmd line, it should be in your csv2tcxml_config file. 

Jamie Griffis | Teamcenter Architect | Applied CAx, LLC

Re: csv2tcxml/TCXML data migration in TC11.2.x

Valued Contributor
Valued Contributor

Hi,

 

Steps i am performing:

  1. tcperl csv2tcxml.perl items111.csv
  2. tcxml_import -u=infodba -p=***** -g=dba -file=items111.csv.xml -bulk_load -site=-75*******

Step 2 also tried without site argument same error:*** Import Error(s):
     11042: XML file fails schema validation

 

Syslog is not showing any error about tcxml