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:
- Extraction: Export inspection records from legacy system with all date fields
- Validation Stage: Check for invalid dates (Feb 30, month > 12, etc.) and log exceptions
- Transformation Stage: Apply date format conversion using the script above
- Quality Check: Sample 5% of transformed records and verify date accuracy
- 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:
- Explicit Format Declaration: Always specify the exact format in the mapping file to prevent TC from attempting automatic detection
- Validation Rules: Set required/nullable flags based on business rules for each date field
- 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.