2

This is my first try using this tool and Google searches have been fruitless.

How can I get ER Studio Data Architect to automatically add the SCD Maintenance Attributes (fields) to the tables I specify as Dimensions? I'm talking about StartDate, EndDate, and RowIsCurrent?

I'd love it if I could specify those fields and their data types once and not have to mess with it again and again.

1 Answer 1

1

If you have already created these entities/tables, there is a sample macro that comes with ER/Studio that does just this. You'll want to run this on a test model first as you may want to customize it to get the exact results you want.

The sample macro is named ADD BASE ATTRIBUTES TO PERSON ENTITY. You, of course, will want it to work on all or selected entities. You could customize the macro to add these attributes based on the table being selected.

If you want this to happen for new entities, you can create an entity/table that contains these common attributes/columns, then use that as a template.

I have created a macro to create tables with all the properties I want to be common. The advantage to doing this is that macros can be tied to a hotkeys, making the creation of the new table easy.

If you don't have the resources to mess with a macro, you could do the workaround of creating a new set of Domains (reusable attributes) in their own folder. Then you can at least quickly grab all 4 or so and drag them on to the tables. Still manual, but only once per table.

So the answer you are looking for is dependent upon what the status of your model is currently.

3
  • Karen, when you suggest creating a Entity Template is that an "official" process or do you mean that I should create a stripped down Dimension entity and copy and paste it to create new Dimensions?
    – DavidStein
    Commented Feb 20, 2013 at 15:51
  • David, I did mean manually creating a template entity, then copying it everytime you want to create a new dimension. I would most likely create a macro for that, though, so that I could use a hotkey to do that instead of copy and paste. Commented Feb 20, 2013 at 18:04
  • David, I just did a test by modifying the sample macro to add 4 "audit" like columns. It seems to do what you are asking for. And all I have to do is select the entities, then do ALT+S and run the macro. Commented Feb 20, 2013 at 20:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.