Details
-
Work Item
-
Resolution: Done
-
Major
-
None
-
All
-
GreenHopper Ranking:0|i2nqjn:
-
9223372036854775807
-
Small
Description
See :
https://github.com/Talend/component-runtime/blob/0bc6cf64eb5283ed6d4997fd1eba809a4bec54fa/component-studio/component-runtime-di/src/main/java/org/talend/sdk/component/runtime/di/record/DiRecordVisitor.java#L208-L213
It fill dynamic metadata column name by Schema.Entry.getName, that make a old jdbc tuj TDI44051_tJDBCInput_MySQL5_Dynamic_SpecialCharacter fail:
As query is "select 5 as col$", so the column label is "col$", and then tck convert it to follow tck rule "col_", that's ok, but then when fill dynamic column name, use tck entry name, not the expected "col$".
This is old tmysqlinput fill way(tjdbcinput follow it):
//rsmd is jdbc resultsetmetadata api:
dcm_<%=cid%>.setName(rsmd_<%=cid%>.getColumnLabel(i));
dcm_<%=cid%>.setDbName(rsmd_<%=cid%>.getColumnName(i));
This is tcompv0 process way, which use a special property to decide to use which api:
org.apache.avro.Schema dynamicFieldSchema_<%=cid%> = dynamicField_<%=cid%>.schema(); // set name if("true".equals(dynamicField_<%=cid%>.getProp("ENABLE_SPECIAL_TABLENAME"))){ dynamicMetadata_<%=cid%>.setName(dynamicField_<%=cid%>.getProp("talend.field.dbColumnName")); }else{ dynamicMetadata_<%=cid%>.setName(dynamicField_<%=cid%>.name()); }
Attachments
Issue Links
- is related to
-
TCOMP-2541 Improve performance on dynamic column
- Done