Skip to Content
avatar image
Former Member

how to implement teradata qualify row number() over (partition by) in BODS

Hi,

I have a project requirement that requires to do push down sql for all filter conditions. The terdata sql code is as follows: qualify row number() over (partition by field1, field2 order by field1, field2) = 1. How do I write this using pushdown_sql in BODS?

Thanks.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Jan 05, 2017 at 02:42 PM

    Hi

    The above statement cannot be used in the where clause because it contains aggregate function.

    You can instead use gen_row_num_group() function.

    Mapping for ROWNUM should be as below

    Output should look something like below:

    You can further filter out the ROWNUM with the value 1 :)

    Hope this is useful

    Regards

    Arun Sasi

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 06, 2017 at 07:29 AM

    thanks a lot Arun for your response.. that's also the other implementation that I was thinking but just checking if it's possible to implement it using pushdown_sql

    Add comment
    10|10000 characters needed characters exceeded