此内容没有您所选择的语言版本。
Chapter 2. Create a VDB Interactively
This sample shows how to use the VDB Builder command line interface to create a new dynamic VDB interactively. Use this sample as a starting point to create your own, more complex VDBs.
Note
You can use tab completion to see the available commands options, or use help commandName to see command details.
Figure 2.1. Code sample
Explanation of the Commands Used in this Example
- list
- shows all children at the CLI context. (The workspace in this example initially contains no children.)
- create-vdb SampleVDB
- create a VDB named SampleVDB.
- cd SampleVDB
- change directory to go into the SampleVDB.
- add-model Model1
- add a model named Model1 to the VDB.
- cd Model1
- navigate into the Model1 CLI context.
- add-table Table1
- add a table named Table1 within Model1.
- cd Table1
- navigate into the Table1 CLI context.
- show-summary
- shows a summary of the current cli context, (in this case it is Table1). Show summary will show the object properties, as well as its children.
- add-column Col1
- add column named Col1 within Table1.
- add-column Col2
- add column named Col2 within Table1.
- cd Col1
- navigates into column Col1.
- set-property datatypeName string
- this sets the Col1 datatype to string.
- cd ../Col2
- navigates up a level, then down into the Col2 column.
- set-property datatypeName string
- sets Col2 datatype to string.
- cd ..
- navigates up one level.
- show-children
- show the children of the current context Table1. Notice the child columns that were created.
- workspace
- navigates to the workspace root context.
- list
- list the workspace children. (It now contains the SampleVDB.)