----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/60857/#review180610 -----------------------------------------------------------
repository/src/main/java/org/apache/atlas/repository/impexp/ImportTransforms.java Lines 64 (patched) <https://reviews.apache.org/r/60857/#comment255813> Wouldn't this cause the sub-type's transformations be overwritten by superType's transformations? For example, consider the following transformations: superType.attr1 subType1.intAttr1 subType2.strAttr2 Wouldn't transformations subType1.intAttr and subType2.strAttr2 be replaced with superType.attr1? I guess the following change would be needed: replace getTransforms().put(s, attribtueTransformMap) with equivalant of getTransforms().get(s).putAll(attribtueTransformMap). - Madhan Neethiraj On July 14, 2017, 6 p.m., Ashutosh Mestry wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/60857/ > ----------------------------------------------------------- > > (Updated July 14, 2017, 6 p.m.) > > > Review request for atlas, Ayub Pathan and Madhan Neethiraj. > > > Bugs: ATLAS-1950 > https://issues.apache.org/jira/browse/ATLAS-1950 > > > Repository: atlas > > > Description > ------- > > **Background** > Existing import transforms expects that the user specify each type and > attribute name that needs to be transformed. This may cause large number of > transform enumerating individual types to be specified. Specifying individual > transforms may be tedious and perhaps error prone. > > **Solution** > This feature improves on that case by allowing user to specify super types. > That way the sub types of that type will automatically get the transform(s) > applied. > > **Implementation** > User can now specify transforms like: > > ```javascript > { > "options": { > "transforms": "{ \"Asset\": { \"qualifiedName\": [ > \"replace:@cl1:@cl2\" ] } }" > } > } > ``` > > At runtime, the subtypes of this type are enumerated. The attribute and > tranform map of the super type are now associated with all the sub-types. > > > Diffs > ----- > > > repository/src/main/java/org/apache/atlas/repository/impexp/ImportService.java > 92217178 > > repository/src/main/java/org/apache/atlas/repository/impexp/ImportTransforms.java > 63e53c50 > > repository/src/test/java/org/apache/atlas/repository/impexp/ImportServiceTest.java > de8e7ef3 > > > Diff: https://reviews.apache.org/r/60857/diff/1/ > > > Testing > ------- > > **Unit tests** > Unit test verifying this behavior were added. > > **Functional tests** > Regular imports were run. > > > Thanks, > > Ashutosh Mestry > >
