Skip to main content
Solved

GUID Generator assigning Primary key automatically

  • October 8, 2019
  • 9 replies
  • 230 views

Forum|alt.badge.img

When using the GUID generator i would like to assign that column as a primary key without opening the writer and assigning it? Is there a transformer i can use for this? (Would be a great addition to that transformer.)

Best answer by david_r

The GUIDGenerator custom transformer is not needed, you can get the exact same result from a simple AttributeCreator and it allows you to specify the output attribute, e.g.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

9 replies

david_r
Celebrity
  • October 8, 2019

Maybe I'm missing something, but could you not simply name the output attribute the same as the primary key column?

Protip: you can also generate a UUID within most transformers using @UUID(), e.g.

 


Forum|alt.badge.img

Maybe I'm missing something, but could you not simply name the output attribute the same as the primary key column?

Protip: you can also generate a UUID within most transformers using @UUID(), e.g.

 

I guess i was thinking of this transformer. Creates the GFID for me.


david_r
Celebrity
  • Best Answer
  • October 9, 2019

The GUIDGenerator custom transformer is not needed, you can get the exact same result from a simple AttributeCreator and it allows you to specify the output attribute, e.g.


Forum|alt.badge.img

The GUIDGenerator custom transformer is not needed, you can get the exact same result from a simple AttributeCreator and it allows you to specify the output attribute, e.g.

sorry we may be thinking two different things here. I create the column and populate it just fine. What i want is for it to auto assign the column as a primary key in the index column under user attributes.


itay
Supporter
Forum|alt.badge.img+18
  • Supporter
  • October 9, 2019

Maybe I'm missing something, but could you not simply name the output attribute the same as the primary key column?

Protip: you can also generate a UUID within most transformers using @UUID(), e.g.

 

or just...


Forum|alt.badge.img

or just...

I think what i'm trying to do is not have to do it in the writer which requires manual. I want to set it up as Automatic. Want the index to be set automatically as well. I try to build everything so i never have to open it just let it run on server.

Forum|alt.badge.img

Has anyone been able to solve this? This solution doesn't help me. What we need to be able to do is assign the primary key so that we can use automatic and dynamic attributes. Manual defeats the purpose.

 


david_r
Celebrity
  • July 23, 2020

Has anyone been able to solve this? This solution doesn't help me. What we need to be able to do is assign the primary key so that we can use automatic and dynamic attributes. Manual defeats the purpose.

 

Perhaps consider posting it as a new question, you'll get much better visibility and it'll be easier for others to help out. The more details you can supply about why the options below don't work for you, the better.


Forum|alt.badge.img

Perhaps consider posting it as a new question, you'll get much better visibility and it'll be easier for others to help out. The more details you can supply about why the options below don't work for you, the better.

Yes, probably a good idea to repost although I have seen this same topic several time, simply the issue is assigning the primary key constraint. The column is already populated but when importing into the database the column doesn't have primary assigned. I need to keep the writer attributes definition as automatic. When drop and create the data is requiring this assigned but I have dozens that drop and create with new schemas almost daily and I can't assign it manually.