Using ERBuilder console to generate documentation/ data dictionaries
ERBuilder includes from version 6.0 a command line interface to generate either a data dictionary or a documentation from the command line.
Generating reports from the command line can be useful when you want to automate the process of creating documentation and data dictionaries by adding the commands to a batch file.
For this, you will need to follow the steps described further in this topic.
- Open the command prompt by pressing WIN+R and type cmd in the text box.
- Change the path in your command prompt window to the path where ERBuilder console file is located. By default it is located in the ERBuilder installation folder “C:\Program Files (x86)\Soft-Builder\ERBuilder\”. For this use the “cd” command then press ENTER to run the “cd” command as follow:
- Now, you can call the ERBuilder console file. The command must be formatted as follows:
A. Documentation report command
Erbd.exe -documentation -name"your_connection_name" -out“specify output folder” -settingsfile"specify settings file path" -schema“specify schema name” -ignoreprocedures -ignoretriggers -ignoreconstraints -ignoreviews -ignoresequences
Parameter | How to use | Required |
---|---|---|
-documentation | This parameter specifies that the generated file is a documentation report. | Yes |
-name | Specify here the connection name to the database you want to use. The connection must be created before running the command. | Yes |
-out | Enter the path of the output folder where the report will be saved. | Yes |
-settingsfile | Set the path to the settings file that will be used for the generation process. The file is in extension .cfg. To get this file open ERBuilder then go to “Tools | Generate model documentation”. From here set the settings then click “Save settings”. |
No |
-schema | Specify the name of the schema. It’s used when you have a PostgreSQL, MS-SQL server or Redshift database. | No |
-ignoreprocedures | Use this parameter to exclude procedures from the generated documentation. | No |
-ignoretriggers | Use this parameter to exclude triggers from the generated documentation. | No |
-ignoreconstraints | Use this parameter to exclude constraints from the generated documentation. | No |
-ignoreviews | Use this parameter to exclude views from the generated documentation. | No |
-ignoresequences | Use this parameter to exclude sequences from the generated documentation. | No |
Example:
Erbd.exe -documentation -name "My_postgreSQL_connection" -out "F:\test_project\Documentation\" -settingsfile "F:\test_project\configuration file.cfg" -schema "Public" -ignoreconstraints
B. Data dictionary command
Erbd.exe -datadictionary -name"your_connection_name" -out“specify output folder” -settingsfile"specify settings file path" -schema“specify schema name” -exporttype “html or CSV” -metadata[metadatavalues]
Parameter | How to use | Required |
---|---|---|
-datadictionary | This parameter specifies that the generated file is a data dictionary. | Yes |
-name | Specify here the connection name to the database you want to use. The connection must be created before. | Yes |
-out | Enter the path of the output folder where the report will be saved. | Yes |
-schema | Specify the name of the schema. It’s used when you have a PostgreSQL, MS-SQL server or Redshift database. | No |
-exporttype | Choose which format your file will be generated in. you can export in HTML or CSV format. Example: -exporttype html. |
No, If the parameter is not specified the format will be HTML. |
-csvseparator | This parameter is used to specify the separator for the CSV file generated. Separator values are: “comma, semicolon, space, tab”. Example: -csvseparator semicolon |
No, Use only if you choose CSV as export type. |
-textdelimiter "single char" | Specify the text delimiter for the CSV file. Replace “single char” by a delimiter character you choose. | No, Use only if you choose CSV as export type. |
-metadata “metadatavalues” | This parameter is used to choose which metadata will be exported. Metadata values are:
tablename, tablecaption, fieldname, fieldcaption, fieldtype, notnull, primarykey, foreignkey, referencedtable, description. Example: -metadata tablename, fieldcaption |
No, If not specified, all the metadata will be exported in the report. |
Example:
Erbd.exe -datadictionary -name "My_PostgreSQL_connection" -schema "Public" -out "F:\test_project\Data dictionary” -exporttype html -metadata tablecaption,fieldcaption,fieldtype
Available in: Enterprise Edition.