case class Attribute(name: String, type: String = "string", array: Option[Boolean] = None, required: Boolean = true, privacy: PrivacyLevel = 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, script: Option[String] = None, foreignKey: Option[String] = None, ignore: Option[Boolean] = 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 and as received in the file
- array
: Is it an array ?
- required
: Should this attribute always be present in the source
- privacy
: Should this attribute be applied a privacy transformation 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 (valid for JSON and XML files only)
- position
: Valid only when file format is POSITION
- default
: Default value for this attribute when it is not present.
- tags
: Tags associated with this attribute
- trim
: Should we trim the attribute value ?
- script
: Scripted field : SQL request on renamed column
- Alphabetic
- By Inheritance
- Attribute
- Serializable
- Serializable
- Product
- Equals
- LazyLogging
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
Attribute(name: String, type: String = "string", array: Option[Boolean] = None, required: Boolean = true, privacy: PrivacyLevel = 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, script: Option[String] = None, foreignKey: Option[String] = None, ignore: Option[Boolean] = None)
- name
: Attribute name as defined in the source dataset and as received in the file
- array
: Is it an array ?
- required
: Should this attribute always be present in the source
- privacy
: Should this attribute be applied a privacy transformation 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 (valid for JSON and XML files only)
- position
: Valid only when file format is POSITION
- default
: Default value for this attribute when it is not present.
- tags
: Tags associated with this attribute
- trim
: Should we trim the attribute value ?
- script
: Scripted field : SQL request on renamed column
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- val array: Option[Boolean]
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- val attributes: Option[List[Attribute]]
-
def
checkValidity(schemaHandler: SchemaHandler): Either[List[String], Boolean]
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
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
- val comment: Option[String]
- val default: Option[String]
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
- val foreignKey: Option[String]
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
getFinalName(): String
- returns
renamed column if defined, source name otherwise
- Annotations
- @JsonIgnore()
-
def
getMetricType(schemaHandler: SchemaHandler): MetricType
- Annotations
- @JsonIgnore()
- def getPrivacy(): PrivacyLevel
- val ignore: Option[Boolean]
- def isArray(): Boolean
- def isIgnore(): Boolean
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isRequired(): Boolean
-
lazy val
logger: Logger
- Attributes
- protected
- Definition Classes
- LazyLogging
- Annotations
- @transient()
- def mapping(schemaHandler: SchemaHandler): String
- val metricType: Option[MetricType]
- val name: String
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- val position: Option[Position]
-
def
primitiveSparkType(schemaHandler: SchemaHandler): DataType
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
- val privacy: PrivacyLevel
- val rename: Option[String]
- val required: Boolean
- val script: Option[String]
-
def
sparkType(schemaHandler: SchemaHandler): DataType
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
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
- val tags: Option[Set[String]]
-
def
toString(): String
- Definition Classes
- Attribute → AnyRef → Any
- def tpe(schemaHandler: SchemaHandler): Option[Type]
- val trim: Option[Trim]
- val type: String
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()