Book a Demo

Author Topic: t_attribute - no ModifiedDate  (Read 6145 times)

Svend Erik Nygaard

  • EA User
  • **
  • Posts: 131
  • Karma: +2/-2
  • Business Information Architect
    • View Profile
t_attribute - no ModifiedDate
« on: August 11, 2017, 05:01:05 pm »
The t_attribute table has no ModifiedDate.

Is there no way to see when an attribute was last updated?

I tried to see if I could find something in the audit log - but I only found the t_snapshot table and did not find any thing helping me there - and even if the audit log could help me, that would only work when the audit log is active.

I also checked to see if the object to which the attribute belongs gets its ModifiedDate updated when the attribute changes, but this seems not to be the case
« Last Edit: August 11, 2017, 11:32:47 pm by Svend Erik Nygaard »

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: t_attribute - no ModifiedDate
« Reply #1 on: August 11, 2017, 06:10:50 pm »
Connectors also have no update date. The database is not really consistent. The only thing you can do is to turn on auditing.

q.

Svend Erik Nygaard

  • EA User
  • **
  • Posts: 131
  • Karma: +2/-2
  • Business Information Architect
    • View Profile
Re: t_attribute - no ModifiedDate
« Reply #2 on: August 11, 2017, 11:16:44 pm »
The only thing you can do is to turn on auditing.

Can I find it in som audit table(s) in the DB (and where :) )?
« Last Edit: August 11, 2017, 11:31:26 pm by Svend Erik Nygaard »

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: t_attribute - no ModifiedDate
« Reply #3 on: August 12, 2017, 12:14:31 am »
As you already mentioned, it's in t_snapshot. Probably you will need to foster the entries programmatically. Eg. renaming an attribute creates an entry with SnapshotName=t_attribute, Style=UPDATE and Notes being something like

{F4CB932F-F52E-45c6-AFB4-F8310ABE2624},b,Attribute,{031A0F62-A282-41c6-B2F2-C31763DB79C8},Class1,Class,

Where the first guid is that of the attribute and the 2nd that of the element.

q.




Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: t_attribute - no ModifiedDate
« Reply #4 on: August 14, 2017, 08:31:09 pm »
Connectors also have no update date. The database is not really consistent. The only thing you can do is to turn on auditing.
It's not quite the only thing you can do.

You can also implement an attribute modified time as a tagged value. It won't be foolproof, but it is doable.

/Uffe
My theories are always correct, just apply them to the right reality.

Svend Erik Nygaard

  • EA User
  • **
  • Posts: 131
  • Karma: +2/-2
  • Business Information Architect
    • View Profile
Re: t_attribute - no ModifiedDate
« Reply #5 on: August 14, 2017, 11:22:49 pm »
You can also implement an attribute modified time as a tagged value. It won't be foolproof, but it is doable.
/Uffe

Thanks, I also thought about adding an extra column with timestamp default='NOW' to the table(s) in the db schema.

But maybe the tag-solution would be better. Do you know of anyway to setup a default (='now') for a tag - or would I have to use an addin to set it to default (apart from a db-trigger)?

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: t_attribute - no ModifiedDate
« Reply #6 on: August 14, 2017, 11:49:38 pm »
AFAIK you can't default a date/time tag to 'now'. But you'd need an Add-In anyway to update the time OnNotifyContextItemModified.

As I say, this won't be a foolproof solution, and any changes that go through the API (like a script) won't be caught. For a more complete solution, a DB trigger must be the way to go. Or perhaps use an Add-In to create the tag to make sure that's done right, and then a trigger to update it.

Another weakness with the tag solution is of course that the tag itself can be modified or deleted by any user. So if you've got infosec requirements riding on this, it won't be good enough.


/Uffe
My theories are always correct, just apply them to the right reality.