@Component @UserDocumentation(title="Creating schema with one command", description="") public class LensSchemaCommands extends Object implements org.springframework.shell.core.CommandMarker
Constructor and Description |
---|
LensSchemaCommands() |
@CliCommand(value={"schema","create schema"}, help="Parses the specified resource file and executes commands for creation/updation of schema. If <schema-type-filter> is provided, only schema types matching that will be worked upon. If <file-name-filter> is provided, then only those files that contain the filter value will be worked upon. \nExpected directory structure is \n.\n|-- storages\n| |-- storage1.xml\n| |-- storage2.xml\n|\n|-- dimensions\n| |-- dim1.xml\n| |-- dim2.xml\n|\n|-- cubes\n| |-- base\n| | |-- base_cube1.xml\n| | |-- base_cube2.xml\n| |\n| |-- derived\n| | |-- derived_cube1.xml\n| | |-- derived_cube2.xml\n| |\n| |-- independent_cube1.xml\n| |-- independent_cube2.xml\n|\n|-- dimensiontables\n| |-- dimtable1.xml\n| |-- dimtable2.xml\n|\n|-- dimtables\n| |-- dimtable3.xml\n| |-- dimtable4.xml\n|\n|-- facts\n |-- fact1.xml\n |-- fact2.xml\n| |\n| |-- virtual\n| | |-- virtual_fact1.xml\n| | |-- virtual_fact2.xml\n| |\n\n\nIf your cubes are divided between base and derived cubes,\nit makes sense to seperate into two directories, since derived cubes can\'t be created unless base cube exists.\nIn the other case you can keep them in the cubes directory itself.\nFor dimtables, you can keep your schema files in a directory named either dimtables or dimensiontables.\nEach of these directories is optional and the order of processing is top to bottom.\nCLI will let you know in case of any errors and proceed further without failing in between.") public void script(@CliOption(key={"","db"},help="<database-to-create-schema-in>",mandatory=true) String database, @CliOption(key={"","file","path"},help="<schema-directory>",mandatory=true) File schemaDirectory, @CliOption(key={"","type"},help="<schema-type-filter>") String type, @CliOption(key={"","name"},help="<file-name-filter>") String name)
Copyright © 2014–2018 Apache Software Foundation. All rights reserved.