Details
Description
Since 1.1.20 version, TCK connectors can support columns'name not compliant with Avro. The schema API has been improved :
- https://jira.talendforge.org/browse/TCOMP-1702
- https://github.com/Talend/component-runtime/pull/428/files#diff-12de0bf2ba72d644ab489cdb21292066
Currently, when an @Option is binded to studio schema with @structure, and has a dedicated service to retrieve schema by 'Guess schema' button, the tck schema columns'name are copied into studio schema 'Column' & 'DB Column'.
We should now copy in 'DB Column' the name returned by TCK/Schema#getOriginalFieldName
As a symmetry, when the studio set the columns from its schema in the connector configuration, we should set 'DB Column' names and not 'Column' names. So, the connector will get the real and sanitize it if necessary and then compute column name and raw column name.
Example:
- Currently:
- Guess Schema => call a service => it retrieves "#COL-A", "#COL-B", "#COL-C" =sanitize=> ["COL_A", "COL_B", "COL_C"]
- Studio schema is (Columns, DB Columns) => [("COL_A", "COL_A") , ("COL_B", "COL_B") , ("COL_C", "COL_C")] => Columns equals DB Columns equals sanitized name
- Runtime : the connector List<String> option is set with sanitized names : ["COL_A", "COL_B", "COL_C"]
- Improvment:
- Guess Schema => call a service => it retrieves "#COL-A", "#COL-B", "#COL-C" =sanitize=> ["COL_A", "COL_B", "COL_C"]
- With
TCOMP-1702we store raw name : (SANITIZED, RAW) => ("COL_A", "#COL-A") , ("COL_B", "#COL-B") , ("COL_C", "#COL-C")
- With
- Studio schema should be (Columns, DB Columns) => ("COL_A", "#COL-A") , ("COL_B", "#COL-B"") , ("COL_C", "#COL-C")
- Runtime : the connector List<String> option is set with raw names : "#COL-A", "#COL-B", "#COL-C"
- Then two cases:
- As input : the connector will be able to create a schema with given name. Those names will be sanitized in name and stored in rawName
- As output : the connector will now the DB column wanted by the customer
- Then two cases:
- Guess Schema => call a service => it retrieves "#COL-A", "#COL-B", "#COL-C" =sanitize=> ["COL_A", "COL_B", "COL_C"]
Salesforce Properties
|
|
|
|
---|---|---|---|
00191875 | Web | Feature Request | 1 |
Attachments
Issue Links
- duplicates
-
TCOMP-1761 Support of complete schema definition
- Done