From erwin
Export a data model from erwin
If you have data models in erwin and want to leverage them in Hackolade Studio, you need to fist export them to XSD, following the instructions below. You should first consult this page for an overview of the import functionality in Hackolade Studio.
By default ERwin does not export primary key and foreign key constraints. If the XSD does not contain this information, this reverse-engineering process cannot import them, but it is still possible to use the functionality to Infer PKs & FKs.
It is suggested to use the parameters below when exporting models to XSD,
- if from a physical model:
- if from a logical model:
Import XSD into Hackolade Studio
After the successful export of your model to XSD, use the instructions in this page to import the XSD into a Hackolade Studio model for the target of your choice.
With logical models exported from erwin, spaces in object names are generally replaced with underscores. When importing those models into a Hackolade Studio polyglot model, it might be desirable to restore object names to a regular business name. To that effect, we provide the option to perform a case conversion upon import. Proper Case or Title Case are likely candidates for this option.
If your erwin models contains Erwin "domains", it is preferable to "resolve references" so that the properties in the Hackolade Studio model remain editable (while being originally created with the properties of the Erwin domains.)
If you want to keep the Erwin domains as Hackolade Studio User-Defined Types/Model Definitions for future use, then you should do a double import:
1) first you reverse-engineerr the XSD without resolving the references
2) then you reverse-engineerr the XSD immediately again, this time with resolution of the references, and when presented with the conflict resolution screen, make sure to use the Replace option:
Export subject areas from erwin
For a given data model exported to XSD and imported into Hackolade Studio, you may also transfer the erwin subject areas to easily create the corresponding ERD Views (ERDVs) in the imported Hackolade Studio model.
The first step is to create in erwin a Subject Area report in CSV format, following the erwin Report Designer instructions. For Subject Area Reports, you should not include the <model> subject area which is the main ERD and was already imported via the XSD step.
Important: since the model name is not included when you generate a Subject Area report, you must be careful and possibly use corresponding naming of the CSV file.
Import subject areas into Hackolade Studio
Like for all bulk operations in Hackolade Studio, this operation is performed via the Excel export and import capability.
The steps are as follows:
1) open in Hackolade Studio the data model previously imported from the XSD file
2) go to Tools > Forward-Engineer > Excel file... and choose the location for storing your Excel file
3) open in Excel the Subject Area Report.csv file. It contains 2 columns and several rows, for example:
4) go to the ER Diagram Views tab of the Excel file for the model exported in step 2) and paste the 2 columns from the Subject Area report with the following mapping:
- "Subject Area Name" column of the Subject Area Report must copied and pasted into the "ERDV Name" column of the model Excel
- "Entity Name" column of the Subject Area Report must be copied and pasted into the "Entity Name" of the model Excel
5) save the Excel file
6) back in Hackolade Studio with the model file open, go to Tools > Reverse-Engineer > Excel Template... and select the model Excel saved in the previous step
Assuming that the Subject Area report matched the model file, the name matching of entities should work as expected and ERDVs will be created inthe model:
Export User-Defined Properties
In Erwin, you can define custom properties and assign them to the different classes of model objects. These user-defined properties (UDPs) are properties that you create to document and notate the logical and physical object classes. This is equivalent to our own Hackolade Studio custom properties. When migrating your library of Erwin models to Hackolade Studio, it is of course critical to keep those UDP's accumulated with our models.
Unfortunately, the proprietary format of Erwin files complicates matters, plus the export to XSD does not include UDPs. It is therefore necessary to proceed with some additional steps outlined below:
One-time setup in Hackolade Studio:
1) Create custom properties for tne target or targets, following instructions in this how-to guide and video. This should be done at the entity/table level and attribute/column/field level. If you have many UDPs for each level, it may be useful to create a custom tab for your custom properties.
In Erwin:
2) From the model file, generate the XSD according to the instructions above in this page.
3) Use the Report Designer to create a report including UDPs at the entity/table level and attribute/column level, then crete the export for your model.
In Hackolade Studio
4) Import the XSD into a Hackolade Studio data model. Save it.
5) Generate the Excel export for your Hackolade data model, using these instructions.
In Excel:
6) The export will include empty Excel columns for each of the custom properties defined in step 1):
7) For each cell of the custom props columns that you wish to populate, you can create an XLOOKUP Excel function to find the appropriate cell value in the Excel generated from the Erwin model, for example:
=IF(XLOOKUP($B2,'[User Defined Property values.xlsx]Table Level UDP'!$C$3:$C$6,'[User Defined Property values.xlsx]Table Level UDP'!$K$3:$K$6)=0,"",XLOOKUP($B2,'[User Defined Property values.xlsx]Table Level UDP'!$C$3:$C$6,'[User Defined Property values.xlsx]Table Level UDP'!$K$3:$K$6))
Great care must be applied to ensure that the proper values are set in the right places. The above can be customized and enhanced with additional logic.
8) Save the Excel file.
Back in Hackolade Studio:
9) Import the Excel file into the Hackolade Studio model, using these instructions.
10) Double-check that the result corresponds to your expectations.