Reputation: 313
I'm trying to generate row_number
using Apache Beam SQL with below code:
PCollection<Row> rwrtg =
PCollectionTuple.of(new TupleTag<>("trrtg"), rrtg)
.apply(SqlTransform.query("select appId, row_number() over (partition by appId order by rating asc) as issue_rank from trrtg"));
But getting below error:
java.lang.RuntimeException: cannot translate call ROW_NUMBER() OVER (PARTITION BY $t0 ORDER BY $t1 ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW)
Could you please advise how to fix this?
Upvotes: 0
Views: 918
Reputation: 2825
Beam SQL supports two Dialects:-
Both these dialects today don't support row_number() analytics function. Hence you are getting the error.
Upvotes: 3