colpivot
colpivot copied to clipboard
exception encountered Values [well100] cannot be coerced to []
Hi, I'm using this function with postgres vertex reactive client. vertx-pg-client.
I'm trying to call this function with parameter but I get cannot be coerced to [] exception,
Can you guide me how can I resolve this issue.
public Completable testStreamWideTagHistoryv1(HistoryReqModel req) {
logger.info("doing stream wide tag query");
return txBegin()
.flatMapCompletable(tx ->
tx.rxPreparedQuery(
"select colpivot('test_output', 'select rt.v as agg_v, rt.t as bucket, rt.tag_id as tagged from rtdata rt where rt.asset_name = $1 ' "
+ ", array['bucket'], array['tagged'], '#.agg_v', null)",
Tuple.of(req.getAssetName()))
.flatMapCompletable(result -> tx.rxCommit()));
}