Five Stars SD
Five Stars

How can I get a count of selection criteria ( select count(*) from abc ) from database (tRedshiftInput)

How can I get a count of selection criteria ( select count(*) from abc ) from database (tRedshiftInput). I tried the following in tJavaRow right after tRedshiftInput, but got null value

 

globalMap.get("****"+(Integer)globalMap.get("tRedshiftInput_3_NB_LINE"));

1 ACCEPTED SOLUTION

Accepted Solutions
Five Stars SD
Five Stars

Re: How can I get a count of selection criteria ( select count(*) from abc ) from database (tRedshiftInput)

Thanks so much Sabrina.

Yes, it worked when I connected tRedShiftInput to tJava with OnComponentOk.

Soma

2 REPLIES
Moderator

Re: How can I get a count of selection criteria ( select count(*) from abc ) from database (tRedshiftInput)

Hello,


((Integer)globalMap.get("tRedshiftInput_1_NB_LINE")) does count the total number of selected rows. 

You can also use tfixedflow component to print ((Integer)globalMap.get("tRedshiftInput_1_NB_LINE")) into console. let us know if tfixedflow component is OK with you.

 

Best regards

Sabrina

 

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Five Stars SD
Five Stars

Re: How can I get a count of selection criteria ( select count(*) from abc ) from database (tRedshiftInput)

Thanks so much Sabrina.

Yes, it worked when I connected tRedShiftInput to tJava with OnComponentOk.

Soma