@Component @UserDocumentation(title="Commands for Dimension Tables Management", description="These commands provide CRUD for dimension tables, associated storages, and fact partitions") public class LensDimensionTableCommands extends LogicalTableCrudCommand<XDimensionTable> implements org.springframework.shell.core.CommandMarker
DATE_FMT, DATE_PARSER
Constructor and Description |
---|
LensDimensionTableCommands() |
Modifier and Type | Method and Description |
---|---|
String |
addNewDimStorage(String tableName,
File path)
Adds the new dim storage.
|
String |
addPartitionsToDimtable(String tableName,
String storageName,
File path)
Adds the partitions to dim table.
|
String |
addPartitionToDimtable(String tableName,
String storageName,
File path)
Adds the partition to dim table.
|
String |
createDimensionTable(File path)
Creates the dimension table.
|
String |
describeDimensionTable(String name)
Describe dimension table.
|
APIResult |
doAddStorage(String name,
String path) |
APIResult |
doDropAllStorages(String name) |
APIResult |
doDropStorage(String tableName,
String storageName) |
APIResult |
doUpdate(String name,
String path) |
String |
dropAllDimStorages(String tableName)
Drop all dim storages.
|
String |
dropAllPartitionsOfDim(String tableName,
String storageName,
String filter)
Drop all partitions of dim.
|
String |
dropDimensionTable(String name,
boolean cascade)
Drop dimension table.
|
String |
dropStorageFromDim(String tableName,
String storageName)
Drop storage from dim.
|
List<String> |
getAll() |
List<String> |
getAll(String dimesionName) |
String |
getAllPartitionsOfDimtable(String tableName,
String storageName,
String filter)
Gets the all partitions of dim.
|
List<String> |
getAllStorages(String name) |
String |
getDimStorages(String table)
Gets the dim storages.
|
String |
getStorageFromDim(String tableName,
String storage)
Gets the storage from dim.
|
String |
showDimensionTables(String dimensionName)
Show dimension tables.
|
String |
updateDimensionTable(String name,
File path)
Update dimension table.
|
String |
updatePartitionOfDimtable(String tableName,
String storageName,
File path) |
String |
updatePartitionsOfDimtable(String tableName,
String storageName,
String path) |
addPartition, addPartitions, addStorage, dropAllStorages, dropPartitions, dropStorage, getAllPartitions, getStorage, showAll, showAllStorages, updatePartition, updatePartitions
create, describe, drop, getSingleObjectName, showAll, update
afterReturningInvocation, afterThrowingInvocation, beforeInvocation, formatDate, formatJson, getClient, getClientWrapper, getOrDefaultQueryHandleString, getValidPath, removePrefixBeforeURI, setClient
@CliCommand(value="show dimtables", help="display list of dimtables in current database. If optionalis supplied, only facts belonging to dimension will be displayed") public String showDimensionTables(@CliOption(key={"","dimension_name"},mandatory=false,help=" ") String dimensionName)
@CliCommand(value="create dimtable", help="Create a new dimension table taking spec from") public String createDimensionTable(@CliOption(key={"","path"},mandatory=true,help=" ")@NonNull File path)
path
- Path to dim spec@CliCommand(value="describe dimtable", help="describe dimtable") public String describeDimensionTable(@CliOption(key={"","dimtable_name"},mandatory=true,help=" ") String name)
name
- the dim@CliCommand(value="update dimtable", help="update dimtabletaking spec from ") public String updateDimensionTable(@CliOption(key={"","dimtable_name"},mandatory=true,help=" ") String name, @CliOption(key={"","path"},mandatory=true,help=" ")@NonNull File path)
name
- the dimtable namepath
- the path to spec file@CliCommand(value="drop dimtable", help="drop dimtable. If is true, all the storage tables associated with the dimtable are also dropped. By default is false") public String dropDimensionTable(@CliOption(key={"","dimtable_name"},mandatory=true,help=" ") String name, @CliOption(key="cascade",mandatory=false,unspecifiedDefaultValue="false",help=" ") boolean cascade)
name
- the dimcascade
- the cascade@CliCommand(value="dimtable list storages", help="display list of storage associated to dimtable") public String getDimStorages(@CliOption(key={"","dimtable_name"},mandatory=true,help=" ") String table)
table
- the dim@CliCommand(value="dimtable add storage", help="adds a new storage to dimtable, taking storage spec from ") public String addNewDimStorage(@CliOption(key={"","dimtable_name"},mandatory=true,help=" ") String tableName, @CliOption(key={"","path"},mandatory=true,help=" ")@NonNull File path)
tableName
- dimtable namepath
- path to storage spec@CliCommand(value="dimtable get storage", help="describe storageof dimtable ") public String getStorageFromDim(@CliOption(key={"","dimtable_name"},mandatory=true,help=" ") String tableName, @CliOption(key={"","storage_name"},mandatory=true,help=" ") String storage)
tableName
- dimtable name@CliCommand(value="dimtable drop storage", help="drop storagefrom dimtable ") public String dropStorageFromDim(@CliOption(key={"","dimtable_name"},mandatory=true,help=" ") String tableName, @CliOption(key={"","storage_name"},mandatory=true,help=" ") String storageName)
tableName
- dimtable namestorageName
- storage name@CliCommand(value="dimtable drop all storages", help="drop all storages associated to dimension table") public String dropAllDimStorages(@CliOption(key={"","dimtable_name"},mandatory=true,help="") String tableName)
tableName
- the table@CliCommand(value="dimtable list partitions", help="get all partitions associated with dimtable, storage filtered by ") public String getAllPartitionsOfDimtable(@CliOption(key={"","dimtable_name"},mandatory=true,help=" ") String tableName, @CliOption(key={"","storage_name"},mandatory=true,help=" ") String storageName, @CliOption(key={"","filter"},mandatory=false,help=" ") String filter)
tableName
- dimtable namestorageName
- storage namefilter
- partition filter@CliCommand(value="dimtable drop partitions", help="drop all partitions associated with dimtable, storage filtered by ") public String dropAllPartitionsOfDim(@CliOption(key={"","dimtable_name"},mandatory=true,help=" ") String tableName, @CliOption(key={"","storage_name"},mandatory=true,help=" ") String storageName, @CliOption(key={"","filter"},mandatory=false,help=" ") String filter)
tableName
- dimtable namestorageName
- storage namefilter
- partition query filter@CliCommand(value="dimtable add single-partition", help="add single partition to dimtable\'s storage , reading spec from ") public String addPartitionToDimtable(@CliOption(key={"","dimtable_name"},mandatory=true,help=" ") String tableName, @CliOption(key={"","storage_name"},mandatory=true,help=" ") String storageName, @CliOption(key={"","path"},mandatory=true,help=" ")@NonNull File path)
tableName
- dimtable namestorageName
- storage namepath
- partition spec path@CliCommand(value="dimtable update single-partition", help="update single partition to dimtable\'s storage , reading spec from The partition has to exist to be eligible for updation.") public String updatePartitionOfDimtable(@CliOption(key={"","dimtable_name"},mandatory=true,help=" ") String tableName, @CliOption(key={"","storage_name"},mandatory=true,help=" ") String storageName, @CliOption(key={"","path"},mandatory=true,help=" ")@NonNull File path)
@CliCommand(value="dimtable add partitions", help="add multiple partition to dimtable\'s storage , reading partition list spec from ") public String addPartitionsToDimtable(@CliOption(key={"","dimtable_name"},mandatory=true,help=" ") String tableName, @CliOption(key={"","storage_name"},mandatory=true,help=" ") String storageName, @CliOption(key={"","path"},mandatory=true,help=" ")@NonNull File path)
tableName
- dimtable namestorageName
- storage namepath
- partition spec path@CliCommand(value="dimtable update partitions", help="update multiple partition to dimtable\'s storage , reading partition list spec from The partitions have to exist to be eligible for updation.") public String updatePartitionsOfDimtable(@CliOption(key={"","dimtable_name"},mandatory=true,help=" ") String tableName, @CliOption(key={"","storage_name"},mandatory=true,help=" ") String storageName, @CliOption(key={"","path"},mandatory=true,help=" ") String path)
public APIResult doDropStorage(String tableName, String storageName)
doDropStorage
in class LogicalTableCrudCommand<XDimensionTable>
public List<String> getAllStorages(String name)
getAllStorages
in class LogicalTableCrudCommand<XDimensionTable>
public APIResult doAddStorage(String name, String path)
doAddStorage
in class LogicalTableCrudCommand<XDimensionTable>
public APIResult doDropAllStorages(String name)
doDropAllStorages
in class LogicalTableCrudCommand<XDimensionTable>
public List<String> getAll()
getAll
in class LensCRUDCommand<XDimensionTable>
public APIResult doUpdate(String name, String path)
doUpdate
in class LensCRUDCommand<XDimensionTable>
Copyright © 2014–2016 Apache Software Foundation. All rights reserved.