Skip to main content
Solved

GUID Generator assigning Primary key automatically


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.

View original
Did this help you find an answer to your question?

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
david_r wrote:

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
david_r wrote:

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+17
  • Supporter
  • October 9, 2019
david_r wrote:

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
itay wrote:

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
brianapeters wrote:

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
david_r wrote:

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.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings