Class

com.ebiznext.comet.schema.model

Attribute

Related Doc: package model

Permalink

case class Attribute(name: String, type: String = "string", array: Option[Boolean] = None, required: Boolean = true, privacy: Option[PrivacyLevel] = None, comment: Option[String] = None, rename: Option[String] = None, metricType: Option[MetricType] = None, attributes: Option[List[Attribute]] = None, position: Option[Position] = None, default: Option[String] = None, tags: Option[Set[String]] = None, trim: Option[Trim] = None) extends LazyLogging with Product with Serializable

A field in the schema. For struct fields, the field "attributes" contains all sub attributes

name

: Attribute name as defined in the source dataset

array

: Is it an array ?

required

: Should this attribute always be present in the source

privacy

: Should this attribute be applied a privacy transformaiton at ingestion time

comment

: free text for attribute description

rename

: If present, the attribute is renamed with this name

metricType

: If present, what kind of stat should be computed for this field

attributes

: List of sub-attributes

position

: Valid only where file format is POSITION

Linear Supertypes
Serializable, Serializable, Product, Equals, LazyLogging, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Attribute
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. LazyLogging
  7. AnyRef
  8. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Attribute(name: String, type: String = "string", array: Option[Boolean] = None, required: Boolean = true, privacy: Option[PrivacyLevel] = None, comment: Option[String] = None, rename: Option[String] = None, metricType: Option[MetricType] = None, attributes: Option[List[Attribute]] = None, position: Option[Position] = None, default: Option[String] = None, tags: Option[Set[String]] = None, trim: Option[Trim] = None)

    Permalink

    name

    : Attribute name as defined in the source dataset

    array

    : Is it an array ?

    required

    : Should this attribute always be present in the source

    privacy

    : Should this attribute be applied a privacy transformaiton at ingestion time

    comment

    : free text for attribute description

    rename

    : If present, the attribute is renamed with this name

    metricType

    : If present, what kind of stat should be computed for this field

    attributes

    : List of sub-attributes

    position

    : Valid only where file format is POSITION

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. val array: Option[Boolean]

    Permalink

    : Is it an array ?

  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. val attributes: Option[List[Attribute]]

    Permalink

    : List of sub-attributes

  7. def checkValidity(schemaHandler: SchemaHandler): Either[List[String], Boolean]

    Permalink

    Check attribute validity An attribute is valid if :

    Check attribute validity An attribute is valid if :

    • Its name is a valid identifier
    • its type is defined
    • When a privacy function is defined its primitive type is a string
    returns

    true if attribute is valid

  8. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. val comment: Option[String]

    Permalink

    : free text for attribute description

  10. val default: Option[String]

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

    Permalink
    Definition Classes
    AnyRef
  12. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  14. def getFinalName(): String

    Permalink

    returns

    renamed column if defined, source name otherwise

    Annotations
    @JsonIgnore()
  15. def getMetricType(schemaHandler: SchemaHandler): MetricType

    Permalink
    Annotations
    @JsonIgnore()
  16. def getPrivacy(): PrivacyLevel

    Permalink
  17. def isArray(): Boolean

    Permalink
  18. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  19. def isRequired(): Boolean

    Permalink
  20. lazy val logger: Logger

    Permalink
    Attributes
    protected
    Definition Classes
    LazyLogging
  21. def mapping(schemaHandler: SchemaHandler): String

    Permalink
  22. val metricType: Option[MetricType]

    Permalink

    : If present, what kind of stat should be computed for this field

  23. val name: String

    Permalink

    : Attribute name as defined in the source dataset

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

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

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

    Permalink
    Definition Classes
    AnyRef
  27. val position: Option[Position]

    Permalink

    : Valid only where file format is POSITION

  28. def primitiveSparkType(schemaHandler: SchemaHandler): DataType

    Permalink

    Spark Type if this attribute is a primitive type of array of primitive type

    Spark Type if this attribute is a primitive type of array of primitive type

    returns

    Primitive type if attribute is a leaf node or array of primitive type, None otherwise

  29. val privacy: Option[PrivacyLevel]

    Permalink

    : Should this attribute be applied a privacy transformaiton at ingestion time

  30. val rename: Option[String]

    Permalink

    : If present, the attribute is renamed with this name

  31. val required: Boolean

    Permalink

    : Should this attribute always be present in the source

  32. def sparkType(schemaHandler: SchemaHandler): DataType

    Permalink

    Go get recursively the Spark tree type of this object

    Go get recursively the Spark tree type of this object

    returns

    Spark type of this attribute

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

    Permalink
    Definition Classes
    AnyRef
  34. val tags: Option[Set[String]]

    Permalink
  35. def toString(): String

    Permalink
    Definition Classes
    Attribute → AnyRef → Any
  36. def tpe(schemaHandler: SchemaHandler): Option[Type]

    Permalink
  37. val trim: Option[Trim]

    Permalink
  38. val type: String

    Permalink
  39. final def wait(): Unit

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

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

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

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from LazyLogging

Inherited from AnyRef

Inherited from Any

Ungrouped