When you use the Generate Physical Model feature, page 4 of the wizard allows you to set (based on the target platform) the default Table and Index storage parameters to be assigned to the newly created physical objects. But when you do a Compare and Merge from Logical to Physical where a new object will be created in a Physical model, there is no such ability to define defaults. I tried using a macro to set the storage parameters in the objects in the Logical Model, and verified that those values are assigned in the Logical objects through the API, however when the objects are created in the Physical by the C&M, the parameters are empty. In other words, the parameter values were not pulled from the Logical objects into the Physical, they were ignored and left unpopulated in the Physical.
I know there is a sample macro for populating the properties, and in fact I have my own macro that does this, I was just surprised that the C&M wouldn't just pull over the values from the Logical. Although there is no way to populate them in the Logical using the UI, the API does allow them to be populated in the Logical. Seems like there wouldn't be any harm in pulling them from Logical to Physical with other properties when doing C&M...
If you're wondering why this would be an issue, it is because we have Data Analysts that do the Logical Modeling, and DBAs that do the Physical modeling. Since the Generate can only be run once, all tables and indexes created after that are missing storage parameters unless the DBA remembers to populate them or to run a macro to do so. The earlier in the process that we can catch such omissions, and the more accurate the generated DDL from the tool is, the better it is for Devops automation. DBAs are more likely to notice undesirable storage parameter settings after the DDL has been generated, and then will just edit the DDL directly rather than go back through the tool to fix it.
Anyone else see this as an issue, or trying to get to the holy grail of Devops automation - no hand editing of generated DDL?
This is by design. The logical model is supposed to be database independent so once you start adding in storage parameters it becomes database dependent. There are a few things you can do with macros that you can't and probably shouldn't be able to do through the UI. I wouldn't take that as the basis of whether can do it or not.
I think that it's probably best just to have the macro run to add those storage parameters. You could create an event handler that would add the storage parameters each time you create a Table. This may be another solution.
I don't think it would hurt to open up a support case and request this as an *** if this is important to you.
Thanks for the reply Stan. I agree running a macro is the best solution, it is just challenging to get users to remember to do that in the heat of the moment.
It doesn't appear that the CreateEntityHandler event is triggered when a new table is created as part of the C&M to the Physical.
Using the event handler in the Logical wouldn't help, since the properties don't migrate to the Physical.
In any case, my experience is that event handlers do not always trigger, so they are really more of a *** than a reliable mechanism. For example, the CreateEntityHandler event only triggers if you create the entity or table through the right-click 'New Table' option that drops you right into the Table Editor. If you use the toolbar button or the Insert | Table option on the menu which drops an Entity onto the diagram, the event is not triggered.
A great solution would be to have an event handler trigger tied to an action such as Compare and Merge, Generate Physical Model, and other product actions where the event can be trapped either before or after the action takes place. If that were available, I could auto run a macro after C&M takes place to set properties on new objects. Potential *** request?
Yes I think it would be an *** request.