Object/Class

com.snowplowanalytics.iglu.schemaddl

Migration

Related Docs: class Migration | package schemaddl

Permalink

object Migration extends Serializable

Linear Supertypes
Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Migration
  2. Serializable
  3. Serializable
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. case class SchemaDiff(added: PropertyList, modified: PropertyList, removed: Set[String]) extends Product with Serializable

    Permalink

    This class represents differences between two Schemas

    This class represents differences between two Schemas

    Nothing except added is used now

    added

    list of properties sorted by their appearance in JSON Schemas

    modified

    list of properties changed in target Schema; if some property was added in successive Schema and modified after that, it should appear in added

    removed

    set of keys removed in target Schema

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def buildAdditionMigrations(schemas: List[IgluSchema]): ValidMigrationMap

    Permalink

    Build ValidMigrationMap, a map of source Schema to it's migrations, where all source Schemas belong to a single model-revision Schema criterion

    Build ValidMigrationMap, a map of source Schema to it's migrations, where all source Schemas belong to a single model-revision Schema criterion

    schemas

    source Schemas belong to a single model-revision criterion

    returns

    migration map of each Schema to list of all available migrations

  6. def buildMigration(sourceSchema: IgluSchema, successiveSchemas: List[IgluSchema]): Validation[String, Migration]

    Permalink

    Build migration from a sourceSchema to the last schema in list of successiveSchemas This method requires all intermediate schemas because we need to keep an order of properties

    Build migration from a sourceSchema to the last schema in list of successiveSchemas This method requires all intermediate schemas because we need to keep an order of properties

    sourceSchema

    schema from which we need to generate migration

    successiveSchemas

    list of schemas, though which we need to generate migration, with destination in the end of list

    returns

    migraion object with data about source, target and diff

  7. def buildMigrationMap(allSchemas: List[IgluSchema]): ValidMigrationMap

    Permalink

    Map all Schemas (sources) to all its targets through all its migration path Then build all migrations of sources to targets through its migration path

    Map all Schemas (sources) to all its targets through all its migration path Then build all migrations of sources to targets through its migration path

    allSchemas

    list of found Schemas, probably with different names, models and revisions

    returns

    migration map of each Schema to list of all available migrations

  8. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. def diffMaps(source: PropertyList, successive: List[PropertyList]): SchemaDiff

    Permalink

    Generate diff from source list of properties to target though sequence of intermediate

    Generate diff from source list of properties to target though sequence of intermediate

    source

    source list of JSON Schema properties

    successive

    non-empty list of successive JSON Schema properties including target

    returns

    diff between two Schmea

  10. def distinctSchemas(schemas: List[IgluSchema]): Map[RevisionGroup, List[IgluSchema]]

    Permalink

    Map schemas by their Schema Criterion m-r-* If any field except ADDITION differs, two schemas are unrelated Examples: com.acme/event/1-0-* -> 1-0-0, 1-0-1, 1-0-2 com.acme/config/1-0-* -> 1-0-0, 1-0-1, 1-0-2 com.acme/config/1-1-* -> 1-1-0, 1-1-1

    Map schemas by their Schema Criterion m-r-* If any field except ADDITION differs, two schemas are unrelated Examples: com.acme/event/1-0-* -> 1-0-0, 1-0-1, 1-0-2 com.acme/config/1-0-* -> 1-0-0, 1-0-1, 1-0-2 com.acme/config/1-1-* -> 1-1-0, 1-1-1

    schemas

    list of schemas to be distincted

    returns

    map of schemas grouped by their common REVISION

  11. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  12. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  13. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. def getAddedKeys(source: PropertyList, successive: List[PropertyList]): List[String]

    Permalink

    Get list of new properties in order they appear in subsequent Schemas

    Get list of new properties in order they appear in subsequent Schemas

    source

    original Schema

    successive

    all subsequent Schemas

    returns

    possibly empty list of keys in correct order

  15. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  16. def getModifiedProperties(source: PropertyList, target: PropertyList, addedKeys: List[String]): PropertyList

    Permalink

    Get list of JSON Schema properties modified between two versions

    Get list of JSON Schema properties modified between two versions

    source

    original list of JSON Schema properties

    target

    final list of JSON Schema properties

    addedKeys

    keys to be excluded from this diff, added properties should be included in SchemaDiff separately

    returns

    list of properties changed in target Schema

  17. def getOrdering(migrationMap: ValidMigrationMap): Map[RevisionGroup, Validation[String, List[String]]]

    Permalink

    Get ordering for subsequent properties This will not include columns from 1-0-0, but only added in subsequent Schema additions

    Get ordering for subsequent properties This will not include columns from 1-0-0, but only added in subsequent Schema additions

    migrationMap

    map of each Schema to list of all available migrations

    returns

    map of revision criterion to list with all added columns

  18. def getSubmap[K, V](keys: List[K], original: Map[K, V]): ListMap[K, V]

    Permalink

    Get submap by keys

    Get submap by keys

    keys

    ordered list of submap keys

    original

    original Map

    returns

    sorted Map of new properties

  19. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  20. def initSegments[A](xs: List[A]): List[List[A]]

    Permalink

    Return list of non-empty initial segments of sequence [1,2,3,4] -> [1,2,3], [1,2], [1

    Return list of non-empty initial segments of sequence [1,2,3,4] -> [1,2,3], [1,2], [1

    xs

    original sequence

    returns

    list of non-empty initial segments ordered by descendence

  21. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  22. def mapSchemasToTargets(schemas: List[IgluSchema]): List[(IgluSchema, List[List[IgluSchema]])]

    Permalink

    Map each single Schema to List of subsequent Schemas 1-0-0 -> [1-0-1, 1-0-2], [1-0-1, 1-0-2, 1-0-3 1-0-1 -> [1-0-2, 1-0-3 1-0-2 -> 1-0-3

    Map each single Schema to List of subsequent Schemas 1-0-0 -> [1-0-1, 1-0-2], [1-0-1, 1-0-2, 1-0-3 1-0-1 -> [1-0-2, 1-0-3 1-0-2 -> 1-0-3

    schemas

    list of self-describing schemas

    returns

    list of pairs of schema and its targets

  23. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  24. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  25. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  26. implicit val schemaOrdering: Order[IgluSchema]

    Permalink
  27. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  28. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  29. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped