public abstract class PhysicalTableDefinition extends Object
Modifier | Constructor and Description |
---|---|
protected |
PhysicalTableDefinition(TableName name,
ZonedTimeGrain timeGrain,
Set<FieldName> metricNames,
Set<? extends DimensionConfig> dimensionConfigs)
Constructor for sub-class to call.
|
protected |
PhysicalTableDefinition(TableName name,
ZonedTimeGrain timeGrain,
Set<FieldName> metricNames,
Set<? extends DimensionConfig> dimensionConfigs,
Map<String,String> logicalToPhysicalNames)
Constructor with provided logical to physical name mapping.
|
Modifier and Type | Method and Description |
---|---|
abstract ConfigPhysicalTable |
build(ResourceDictionaries dictionaries,
DataSourceMetadataService metadataService)
Given the resource dictionaries and a data source metadata service, build the corresponding physical table.
|
protected Set<Column> |
buildColumns(DimensionDictionary dimensionDictionary)
Helper method for sub-classes to convert dimension configs into dimension columns and create metric columns.
|
protected Map<String,String> |
buildLogicalToPhysicalNames(Set<? extends DimensionConfig> dimensionConfigs)
Builds the dimension logical name to physical name mapping from dimension configs.
|
abstract Set<TableName> |
getDependentTableNames()
Get the set of physical tables required to build the current physical table.
|
Set<? extends DimensionConfig> |
getDimensionConfigs() |
Map<String,String> |
getLogicalToPhysicalNames() |
Set<FieldName> |
getMetricNames() |
TableName |
getName() |
ZonedTimeGrain |
getTimeGrain() |
protected PhysicalTableDefinition(TableName name, ZonedTimeGrain timeGrain, Set<FieldName> metricNames, Set<? extends DimensionConfig> dimensionConfigs)
name
- Table name of the physical tabletimeGrain
- Zoned time grain of the tablemetricNames
- The Set of metric names on the tabledimensionConfigs
- Set of dimensions on the table as dimension configsprotected PhysicalTableDefinition(TableName name, ZonedTimeGrain timeGrain, Set<FieldName> metricNames, Set<? extends DimensionConfig> dimensionConfigs, Map<String,String> logicalToPhysicalNames)
name
- Table name of the physical tabletimeGrain
- Zoned time grain of the tablemetricNames
- The Set of metric names on the tabledimensionConfigs
- Set of dimensions on the table as dimension configslogicalToPhysicalNames
- A map from logical column names to physical column namespublic abstract Set<TableName> getDependentTableNames()
public abstract ConfigPhysicalTable build(ResourceDictionaries dictionaries, DataSourceMetadataService metadataService)
dictionaries
- Dictionary containing dimension dictionary and physical table dictionarymetadataService
- Service containing column available interval informationpublic TableName getName()
public ZonedTimeGrain getTimeGrain()
public Set<? extends DimensionConfig> getDimensionConfigs()
protected Map<String,String> buildLogicalToPhysicalNames(Set<? extends DimensionConfig> dimensionConfigs)
dimensionConfigs
- Dimension config containing both logical and physical namesprotected Set<Column> buildColumns(DimensionDictionary dimensionDictionary)
dimensionDictionary
- Dictionary for dimension name to dimension columnsCopyright © 2016–2018 Yahoo! Inc.. All rights reserved.