@Component @UserDocumentation(title="Management of Facts", description="These command provide CRUD for facts, associated storages, and fact partitions") public class LensFactCommands extends PhysicalTableCrudCommand<XFactTable>
DATE_FMT, DATE_PARSER| Constructor and Description |
|---|
LensFactCommands() |
| Modifier and Type | Method and Description |
|---|---|
String |
addNewFactStorage(String tableName,
String path)
Adds the new fact storage.
|
String |
addPartitionsToFact(String tableName,
String storageName,
String path) |
String |
addPartitionToFact(String tableName,
String storageName,
String path)
Adds the partition to fact.
|
String |
createFact(String path)
Creates the fact.
|
String |
describeFactTable(String name)
Describe fact table.
|
APIResult |
doAddStorage(String name,
String path) |
APIResult |
doDropAllStorages(String name) |
APIResult |
doDropStorage(String tableName,
String storageName) |
APIResult |
doUpdate(String name,
String path) |
String |
dropAllFactStorages(String name)
Drop all fact storages.
|
String |
dropAllPartitionsOfFact(String tableName,
String storageName,
String filter)
Drop all partitions of fact.
|
String |
dropFact(String fact,
boolean cascade)
Drop fact.
|
String |
dropStorageFromFact(String tableName,
String storageName)
Drop storage from fact.
|
List<String> |
getAll() |
List<String> |
getAll(String cubeName) |
String |
getAllPartitionsOfFact(String tableName,
String storageName,
String filter)
Gets the all partitions of fact.
|
List<String> |
getAllStorages(String name) |
String |
getFactStorages(String tableName)
Gets the fact storages.
|
String |
getStorageFromFact(String tableName,
String storage)
Gets the storage from fact.
|
List<String> |
getTimelines(String factName,
String storageName,
String updatePeriod,
String timeDimension) |
String |
showFacts(String cubeName)
Show facts.
|
String |
updateFactTable(String name,
String specPath)
Update fact table.
|
addPartition, addPartitions, addStorage, dropAllStorages, dropPartitions, dropStorage, getAllPartitions, getStorage, showAll, showAllStoragescreate, describe, drop, getSingleObjectName, showAll, updateafterReturningInvocation, afterThrowingInvocation, beforeInvocation, formatDate, formatJson, getClient, getClientWrapper, getValidPath, setClient@CliCommand(value="show facts",
help="display list of fact tables in current database. If optional is supplied, only facts belonging to cube will be displayed")
public String showFacts(@CliOption(key={"","cube_name"},mandatory=false,help="")
String cubeName)
@CliCommand(value="create fact",
help="create a fact table with spec from ")
public String createFact(@CliOption(key={"","path"},mandatory=true,help="")
String path)
path - Path to fact spec@CliCommand(value="describe fact",
help="describe fact ")
public String describeFactTable(@CliOption(key={"","fact_name"},mandatory=true,help="")
String name)
name - the fact@CliCommand(value="update fact",
help="update fact taking spec from ")
public String updateFactTable(@CliOption(key={"","fact_name"},mandatory=true,help="")
String name,
@CliOption(key={"","path"},mandatory=true,help="")
String specPath)
name - fact name to be updatedspecPath - path to the file containing new spec of the fact@CliCommand(value="drop fact",
help="drops fact . If is true, all the storage tables associated with the fact are also dropped. By default is false")
public String dropFact(@CliOption(key={"","fact_name"},mandatory=true,help="")
String fact,
@CliOption(key="cascade",mandatory=false,unspecifiedDefaultValue="false",help="")
boolean cascade)
fact - the factcascade - the cascade@CliCommand(value="fact list storage",
help="display list of storages associated to fact ")
public String getFactStorages(@CliOption(key={"","fact_name"},mandatory=true,help="")
String tableName)
tableName - the fact@CliCommand(value="fact add storage",
help="adds a new storage to fact , taking storage spec from ")
public String addNewFactStorage(@CliOption(key={"","fact_name"},mandatory=true,help="")
String tableName,
@CliOption(key={"","path"},mandatory=true,help="")
String path)
tableName - the fact namepath - the path to storage spec@CliCommand(value="fact get storage",
help="describe storage of fact ")
public String getStorageFromFact(@CliOption(key={"","fact_name"},mandatory=true,help="")
String tableName,
@CliOption(key={"","storage_name"},mandatory=true,help="")
String storage)
tableName - fact table namestorage - storage spec path@CliCommand(value="fact drop storage",
help="drop storage from fact ")
public String dropStorageFromFact(@CliOption(key={"","fact_name"},mandatory=true,help="")
String tableName,
@CliOption(key={"","storage_name"},mandatory=true,help="")
String storageName)
tableName - the table namestorageName - the storage name@CliCommand(value="fact drop all storages",
help="drop all storages associated to fact ")
public String dropAllFactStorages(@CliOption(key={"","fact_name"},mandatory=true,help="")
String name)
name - the table@CliCommand(value="fact list partitions",
help="get all partitions associated with fact , storage filtered by ")
public String getAllPartitionsOfFact(@CliOption(key={"","fact_name"},mandatory=true,help="")
String tableName,
@CliOption(key={"","storage_name"},mandatory=true,help="")
String storageName,
@CliOption(key={"","filter"},mandatory=false,help="")
String filter)
tableName - fact namestorageName - storage namefilter - partition filter@CliCommand(value="fact drop partitions",
help="drop all partitions associated with fact , storage filtered by ")
public String dropAllPartitionsOfFact(@CliOption(key={"","fact_name"},mandatory=true,help="")
String tableName,
@CliOption(key={"","storage_name"},mandatory=true,help="")
String storageName,
@CliOption(key={"","filter"},mandatory=false,help="")
String filter)
tableName - fact namestorageName - storage namefilter - partition query filter@CliCommand(value="fact add single-partition",
help="add single partition to fact \'s storage , reading spec from ")
public String addPartitionToFact(@CliOption(key={"","fact_name"},mandatory=true,help="")
String tableName,
@CliOption(key={"","storage_name"},mandatory=true,help="")
String storageName,
@CliOption(key={"","path"},mandatory=true,help="")
String path)
tableName - fact namestorageName - storage namepath - partition spec path@CliCommand(value="fact add partitions",
help="add multiple partition to fact \'s storage , reading partition list spec from ")
public String addPartitionsToFact(@CliOption(key={"","fact_name"},mandatory=true,help="")
String tableName,
@CliOption(key={"","storage_name"},mandatory=true,help="")
String storageName,
@CliOption(key={"","path"},mandatory=true,help="")
String path)
@CliCommand(value="fact timelines",
help="get timelines for fact. Can optionally specify storage, update period and time dimension to filter by. Instead of time dimension, partition column can be directly passed as ")
public List<String> getTimelines(@CliOption(key={"","fact_name"},mandatory=true,help="")
String factName,
@CliOption(key="storage_name",mandatory=false,help="")
String storageName,
@CliOption(key="update_period",mandatory=false,help="")
String updatePeriod,
@CliOption(key="time_dimension",mandatory=false,help="")
String timeDimension)
public APIResult doDropStorage(String tableName, String storageName)
doDropStorage in class PhysicalTableCrudCommand<XFactTable>public List<String> getAllStorages(String name)
getAllStorages in class PhysicalTableCrudCommand<XFactTable>public APIResult doAddStorage(String name, String path)
doAddStorage in class PhysicalTableCrudCommand<XFactTable>public APIResult doDropAllStorages(String name)
doDropAllStorages in class PhysicalTableCrudCommand<XFactTable>public List<String> getAll()
getAll in class LensCRUDCommand<XFactTable>public APIResult doUpdate(String name, String path)
doUpdate in class LensCRUDCommand<XFactTable>Copyright © 2014–2015 Apache Software Foundation. All rights reserved.