Class BaseFeatureBuilder
- java.lang.Object
-
- com.c12e.cortex.profiles.featurecatalog.featurebuilder.BaseFeatureBuilder
-
- All Implemented Interfaces:
FeatureBuilder
- Direct Known Subclasses:
ArrayFeatureBuilder
,FloatFeatureBuilder
,IntFeatureBuilder
,StringFeatureBuilder
,UnknownFeatureBuilder
public abstract class BaseFeatureBuilder extends java.lang.Object implements FeatureBuilder
Base implementation of a FeatureBuilder that provides setters forFeature
attributes, and
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DEFAULT_PROFILE_GROUP
-
Constructor Summary
Constructors Constructor Description BaseFeatureBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.c12e.cortex.phoenix.Feature
build()
Build and creates an instantiatedFeature
instance.java.lang.Long
getRecordCount()
void
inferFromSample(@NotNull org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> sampleDf, @NotNull java.lang.String fieldName)
ComputesFeature
attributes from the provided sample data, specificallyFeature#uniqueCount
andFeature#pctNull
.void
setDescription(java.lang.String description)
void
setFieldName(@NotNull java.lang.String fieldName)
void
setMaxValue(java.lang.Double maxValue)
void
setMeanValue(java.lang.Double meanValue)
void
setMinValue(java.lang.Double minValue)
void
setNotes(java.lang.String notes)
void
setObservations(java.lang.String observations)
void
setPctDom(java.lang.Float pctDom)
void
setPctNull(java.lang.Float pctNull)
void
setProfileGroup(@NotNull java.lang.String profileGroup)
void
setProject(@NotNull java.lang.String project)
void
setRecordCount(java.lang.Long recordCount)
void
setSourceName(@NotNull java.lang.String sourceName)
void
setStdDev(java.lang.Double stdDev)
void
setUniqueCount(java.lang.Long uniqueCount)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.c12e.cortex.profiles.featurecatalog.featurebuilder.FeatureBuilder
getDataType, getFeatureType
-
-
-
-
Field Detail
-
DEFAULT_PROFILE_GROUP
public static final java.lang.String DEFAULT_PROFILE_GROUP
- See Also:
- Constant Field Values
-
-
Method Detail
-
inferFromSample
public void inferFromSample(@NotNull @NotNull org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> sampleDf, @NotNull @NotNull java.lang.String fieldName)
ComputesFeature
attributes from the provided sample data, specificallyFeature#uniqueCount
andFeature#pctNull
.- Specified by:
inferFromSample
in interfaceFeatureBuilder
- Parameters:
sampleDf
- sample data to infer the Feature properties fromfieldName
- name of the field in the Dataset
-
build
public com.c12e.cortex.phoenix.Feature build()
Description copied from interface:FeatureBuilder
Build and creates an instantiatedFeature
instance.- Specified by:
build
in interfaceFeatureBuilder
- Returns:
- instantiated feature
-
setFieldName
public void setFieldName(@NotNull @NotNull java.lang.String fieldName)
-
setProfileGroup
public void setProfileGroup(@NotNull @NotNull java.lang.String profileGroup)
-
setMinValue
public void setMinValue(java.lang.Double minValue)
-
setMaxValue
public void setMaxValue(java.lang.Double maxValue)
-
setMeanValue
public void setMeanValue(java.lang.Double meanValue)
-
setStdDev
public void setStdDev(java.lang.Double stdDev)
-
setPctNull
public void setPctNull(java.lang.Float pctNull)
-
setDescription
public void setDescription(java.lang.String description)
-
setNotes
public void setNotes(java.lang.String notes)
-
setObservations
public void setObservations(java.lang.String observations)
-
setUniqueCount
public void setUniqueCount(java.lang.Long uniqueCount)
-
setPctDom
public void setPctDom(java.lang.Float pctDom)
-
getRecordCount
public java.lang.Long getRecordCount()
-
setRecordCount
public void setRecordCount(java.lang.Long recordCount)
-
setProject
public void setProject(@NotNull @NotNull java.lang.String project)
-
setSourceName
public void setSourceName(@NotNull @NotNull java.lang.String sourceName)
-
-