MYSQL Primary Key

Five Stars

MYSQL Primary Key

Hi guys, im working with the component tAmazonMysqlOutput, and when i try to upload a table to it from one of my excels it asks me for a primary key.

 

How can i tell the component to generate a row from 1 to whatever number of rows i insert from my excel and use it as a primary key?

 

Because the columns of the excel im working on dont have an id which i can use for the primary key.

 

Ty !


Accepted Solutions
Forteen Stars TRF
Forteen Stars

Re: MYSQL Primary Key

If you don't have a natural pk in your Excel file, you may add one when you read the file using a sequence in a tMap or tJavaRow.

TRF
Five Stars

Re: MYSQL Primary Key

Can you show me a quick demo or some pics? im new with talend dont know how to do that Smiley Sad

All Replies
Forteen Stars TRF
Forteen Stars

Re: MYSQL Primary Key

If you don't have a natural pk in your Excel file, you may add one when you read the file using a sequence in a tMap or tJavaRow.

TRF
Five Stars

Re: MYSQL Primary Key

Can you show me a quick demo or some pics? im new with talend dont know how to do that Smiley Sad
Twelve Stars

Re: MYSQL Primary Key


@gonzalogtzwrote:

Hi guys, im working with the component tAmazonMysqlOutput, and when i try to upload a table to it from one of my excels it asks me for a primary key.

 

How can i tell the component to generate a row from 1 to whatever number of rows i insert from my excel and use it as a primary key?

 

Because the columns of the excel im working on dont have an id which i can use for the primary key.

 

Ty !


would be better, if You first show, HOW it is:

it asks me for a primary key.

?


-----------
Five Stars

Re: MYSQL Primary Key

I got it, Thanks! Smiley Happy