此内容没有您所选择的语言版本。

Chapter 5. Record Session Commands in a File


In this section you will learn how to use the VDB Builder CLI to record your session commands for later playback. You can use the command file to fully script the construction of your VDBs.

The recorded output is saved to a file specified in the VDB Builder’s global properties configuration file (RECORDING_FILE). In the example below, the output is written to ./mySession.txt:

Figure 5.1. Code sample

Explanation of the Commands Used in this Example

list
shows all children at the CLI workspace context. (The workspace in this example initially contains no VDBs.)
show-global
shows the VDB Builder global constants. One of the constants specifies the recording output file (RECORDING_FILE).
set-global RECORDING_FILE ./mySession.txt
this changes the name of the file where our session commands will be saved.
set-record on
starts recording all subsequent commands.
create-vdb SampleVDB
creates the VDB called SampleVDB.
cd SampleVDB
navigates into the SampleVDB directory.
add-model Model1
adds a model called Model1.
cd Model1
navigates into Model1.
add-table Table1
adds a table called Table1
cd Table1
navigates into Table1.
add-column Col1
adds a column called Col1.
add-column Col2
adds a column called Col2.
workspace
navigates to the workspace context.
set-record off
tells the system to stop recording commands.

This is what the recording looks like:

Figure 5.2. Code sample

返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat