Uploaded image for project: 'Atlas'
  1. Atlas
  2. ATLAS-2717

Data Migration: Importing Entity with Attribute of Classification Type from pre-v1.0

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.0.0, trunk
    • 1.0.0
    • atlas-core
    • None

    Description

      Background

      In versions prior to v1.0, it was possible to have entity types that contained attributes with classification as their type.

      In v1.0 creation of such types is not supported.

      The impact is that data migration fails during AtlasTypesDef (atlas-migration-typesdef.json attached_)_ import with this error:

      org.apache.atlas.exception.AtlasBaseException: createComplexTraitTypeTestprayivofx4.complexTrait: invalid attribute type. Attribute cannot be of type classification
      

      Solution

      Given the type mentioned is no longer supported, the solution would be to build a new type that mimics the old type so that data is moved correctly.

      Approach:

      • Create a AtlasStructDef with a classification name prefixed with legacy.
      • Use the new type as the type of the attribute.
      • During edge import, modify the edge label such that it is pointing to a struct rather than a classification.

       

      Attachments

        1. ATLAS-2717-Handling-legacy-types-that-reference-clas.patch
          56 kB
          Ashutosh Mestry
        2. atlas-migration-typesdef.json
          248 kB
          Ashutosh Mestry

        Issue Links

          Activity

            People

              amestry Ashutosh Mestry
              amestry Ashutosh Mestry
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: