Book a Demo

Author Topic: How to get CreatedDate for connector  (Read 3485 times)

wzr

  • EA User
  • **
  • Posts: 29
  • Karma: +0/-0
    • View Profile
How to get CreatedDate for connector
« on: April 02, 2022, 09:53:56 pm »
Hello,

I'm looking for a way to get the date of creation for connectors via script.
Unfortunately there is noch CreatedDate in t_connector as in t_object.

Maybe there is a chance with t_snapshot?
But the Information here seams to be quite difficult to decode.

Any ideas?

Thank you!

wzr

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: How to get CreatedDate for connector
« Reply #1 on: April 02, 2022, 10:38:17 pm »
No, there is no way to obtain it "in a natural way". You could write a trigger in your database to create a date somewhere (in an added column of t_connector). But the best would likely be that you just forget about it.

Going over t_snapshot means that you have to turn on auditing. I just think that's just a waste of resources. If so, it might be possible, but I'm not that sure as (I already said it) I'm not using this feature. I might have a look it you're desperate.

q.
« Last Edit: April 02, 2022, 10:41:05 pm by qwerty »

wzr

  • EA User
  • **
  • Posts: 29
  • Karma: +0/-0
    • View Profile
Re: How to get CreatedDate for connector
« Reply #2 on: April 02, 2022, 11:09:03 pm »
Actually I need to analyse this information for existing connectors. So adding additional information might be a solution for future preparation but its not for my current problem.

Since I only need to know the order of creation for a subset of connectors I'm thinking of comparing the connector ID as an alternative way.
Probably I can't trust the ever-expanding characteristic of the ID, but is there a good chance to be close to it at least?

It won't be the end of the world if I'm wrong in some cases with this approach but it would be useless if the result is more like a fortunate coincidence.

What do you think?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: How to get CreatedDate for connector
« Reply #3 on: April 03, 2022, 12:25:16 am »
I'm no DB specialist but to my knowlege the ID will just go up by one each time a record is created. However, I would guess that operations like compress or cleanups (the mysterious EA consistency check) might get in the way. Definitely it's not bullet-proof, but maybe it might be sufficient for you. Start a test balloon and see how high it goes.

q.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: How to get CreatedDate for connector
« Reply #4 on: April 03, 2022, 02:43:29 am »
Yes, the connector ID gives you a clue, but be careful.

There are circumstances in which the ID's get reset.
One of those circumstances is xmi import. So if you use version control the ID's won't mean a thing.

Geert