@Component @UserDocumentation(title="Commands for OLAP Data Cube Management", description="These commands provide CRUD for cubes") public class LensCubeCommands extends ConceptualTableCrudCommand<XCube>
DATE_FMT, DATE_PARSER| Constructor and Description |
|---|
LensCubeCommands() |
| Modifier and Type | Method and Description |
|---|---|
String |
createCube(File path)
Creates the cube.
|
String |
describeCube(String name)
Describe cube.
|
APIResult |
doUpdate(String name,
String path) |
String |
dropCube(String name)
Drop cube.
|
List<String> |
getAll() |
String |
getLatest(String cube,
String timeDim)
Cube latest date
|
String |
showCubes()
Show cubes.
|
String |
showJoinChains(String table) |
String |
showQueryableFields(String table,
boolean flattened) |
String |
updateCube(String name,
File path)
Update cube.
|
getAllFields, getAllJoinChainscreate, describe, drop, getSingleObjectName, showAll, updateafterReturningInvocation, afterThrowingInvocation, beforeInvocation, formatDate, formatJson, getClient, getClientWrapper, getOrDefaultQueryHandleString, getValidPath, removePrefixBeforeURI, setClient@CliCommand(value="show cubes",
help="show list of cubes in current database")
public String showCubes()
@CliCommand(value="create cube",
help="Create a new Cube, taking spec from <path-to-cube-spec-file>")
public String createCube(@CliOption(key={"","path"},mandatory=true,help="<path-to-cube-spec-file>") @NonNull
File path)
path - the cube spec@CliCommand(value="describe cube",
help="describe cube with name <cube_name>")
public String describeCube(@CliOption(key={"","name"},mandatory=true,help="<cube_name>")
String name)
name - the cube name@CliCommand(value="update cube",
help="update cube <cube_name> with spec from <path-to-cube-spec-file>")
public String updateCube(@CliOption(key={"","name"},mandatory=true,help="<cube_name>")
String name,
@CliOption(key={"","path"},mandatory=true,help="<path-to-cube-spec-file>") @NonNull
File path)
name - cube namepath - path to new spec file@CliCommand(value="drop cube",
help="drop cube <cube_name>")
public String dropCube(@CliOption(key={"","name"},mandatory=true,help="<cube_name>")
String name)
name - the cube@CliCommand(value="cube latestdate",
help="get latest date of data available in cube <cube_name> for time dimension <time_dimension_name>. Instead of time dimension, partition column can be directly passed as <time_dimension>")
public String getLatest(@CliOption(key={"","name"},mandatory=true,help="<cube_name>")
String cube,
@CliOption(key={"","time_dimension"},mandatory=true,help="<time_dimension>")
String timeDim)
cube - cube nametimeDim - time dimension name@CliCommand(value="cube show fields",
help="Show queryable fields of the given cube <cube_name>. Optionally specify <flattened> to include chained fields")
public String showQueryableFields(@CliOption(key={"","name"},mandatory=true,help="<cube_name>")
String table,
@CliOption(key="flattened",mandatory=false,unspecifiedDefaultValue="false",specifiedDefaultValue="true",help="<flattened>")
boolean flattened)
@CliCommand(value="cube show joinchains",
help="Show joinchains of the given cube <cube_name>. ")
public String showJoinChains(@CliOption(key={"","name"},mandatory=true,help="<cube_name>")
String table)
public List<String> getAll()
getAll in class LensCRUDCommand<XCube>Copyright © 2014–2018 Apache Software Foundation. All rights reserved.