[ 
https://issues.apache.org/jira/browse/SQOOP-2252?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14486448#comment-14486448
 ] 

Jarek Jarcec Cecho commented on SQOOP-2252:
-------------------------------------------

Allowing {{NULL}}s for every field is the current behavior, so adding a default 
value as {{NULL}} seems reasonable. I believe that the best behavior from Sqoop 
perspective would be to allow {{NULL}}s only if the source column allows 
{{NULL}} as [~gwenshap] mentioned and also propagate the default value from 
database itself rathe then prescribe {{NULL}}. Super-uber awesome would be an 
additional command line switch that would enable to override the default value 
for each column - something similar that we're doing with {{--map-column-java}} 
and {{--map-column-hive}}. Having said that, I think that the current patch is 
reasonable and hence +1. I'll create separate JIRA for the behavior that I've 
described above.

> Add default to Avro Schema
> --------------------------
>
>                 Key: SQOOP-2252
>                 URL: https://issues.apache.org/jira/browse/SQOOP-2252
>             Project: Sqoop
>          Issue Type: Improvement
>          Components: tools
>    Affects Versions: 1.4.5, 1.4.6
>            Reporter: Andrew Stevenson
>            Priority: Minor
>         Attachments: SQOOP-2252.txt
>
>
> Currently no default value is set on the avro schemas. Setting a default 
> value is required for schema evolution.
> I currently have to rewrite the schema to be a union on [null: type] rather 
> than [type:nulll] and add null as a default in other to update kite datasets.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to