[ https://issues.apache.org/jira/browse/SQOOP-1581?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14169547#comment-14169547
]
Qian Xu commented on SQOOP-1581:
--------------------------------
[~jarcec] Your point makes sense. It is simple to make the change. Consequentially programmer
should implement a {{ConnectorToIntializer.getSchema()}} that always returns {{null}}, if
{{FROM}} schema is expected to be used in {{Loader}}
By the way, the {{FROM}} side extracts data and creates Sqoop objects. How can the {{TO}}
side loads these objects without knowing its schema. I cannot imagine such an use case, that
{{Loader}} requires a {{TO}} schema.
> Sqoop2: LoaderContext has the wrong Schema
> ------------------------------------------
>
> Key: SQOOP-1581
> URL: https://issues.apache.org/jira/browse/SQOOP-1581
> Project: Sqoop
> Issue Type: Bug
> Affects Versions: from/to
> Reporter: Abraham Elmahrek
> Assignee: Qian Xu
> Fix For: 1.99.4
>
> Attachments: SQOOP-1581.patch
>
>
> {code}
> if (!isTest) {
> // Using the TO schema since the IDF returns data in TO schema
> schema = ConfigurationUtils.getConnectorSchema(Direction.TO, conf);
> ...
> }
> // Create loader context
> LoaderContext loaderContext = new LoaderContext(subContext, reader, schema);
> {code}
> In some cases, the matcher will use the FROM schema. The loader should provide the FROM
schema in this case.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
|