Dataedo enables importing database schema (tables, views and their columns) into its repository from external sources using Excel template.
What is it for
You can use it to document databases and data sources which are not supported by Dataedo:
- Not supported relational databases
- Mainframe computers
- Excel, csv or txt files
- Excel 2007 or later,
- Access to repository database with database console to run generated script.
Excel import works only with server repository.
How it works
Excel template generates SQL script that creates new documentation in the repository and adds tables and views specified in the table. The script must be then executed in Dataedo repository database (SQL Server).
- Download template (link below)
- Prepare/extract list of tables and columns of your data set (this is not covered in this tutorial)
- Remove sample rows from Excel template
- Specify documentation title in B2 cell
- Populate tables and columns in Excel table. All tables and columns should be pasted in the table as shown in an example. Each column is one row in the spreadsheet. Columns will be ordered in Dataedo in the same order as they appear in the spreadsheet.
- Documentation (B2) - Title of the documentation (top level element in Dataedo repository) that will be created. Each run creates new documentation.
- Schema - Table schema name. Can be left blank.
- Table name - Table name.
- Type - Type of object, table or view: TABLE/VIEW.
- Column name - Column name.
- Column title - Column title (optional). This field is later editable in Dataedo Editor.
- Data type - Data type including all required details. It is advised to specify string length in brackets - i.e. char(100). This is free text so any value (up to 250 characters) would be accepted.
- PK - Flag indicating whether the column is part of primary key. 1 - part of primary key, blank - otherwise.
- Nullable - Flag indicating whether the column is nullable. 1 - is nullable, blank - otherwise.
- Identity - Flag indicating whether the column is identity. 1 - is identity, blank - otherwise.
- Default value - Default value for the column. NULL if blank.
- Computed formula - Formula for computed columns. Overrides default value if both filled.
- Description - Column description (optional). This field is later editable in Dataedo Editor.
- CustomField_1 - CustomField_40 - Additional custom fields to fill. They have to be already created through Dataedo. You can find which field number matches which custom column in custom_fields table in Dataedo repository.
- Enable macros if required.
- Click the Generate SQL script button. Template will generate a script file named dataedo_table_import_[datetime].sql in your documents folder.
- Connect to your SQL Server repository database as a user with dbo permissions (e.g. the user that created the repository).
- Then execute the script from the generated file.
Your documentation has been created. Run Dataedo and connect to your repository (or hit Refresh view) to enjoy your new documentation.
Right-click the link below and choose Save link as... If you run into any issues, make sure the file extension is .xlsm