Merge transformation not working using uql Infinity Data Source

Merge transformation not working using uql Infinity Data Source
parse-json | jsonata "$map(value,function($v){{ 'inviteDateTime': $v.$substring(inviteDateTime, 0, 10), 'id': $v.id, 'duration': $v.duration, 'successfulCall': $v.successfulCall}})"
when I am using Json and adding columns the merge transformation is working but when I am using UQL query merge not working when 1 of the query returns empty but this is not the same case with json

I want to use uql because I want to convert my date with jsonata. but why the merge not working when I am using UQL Query

Infinity is not a grafana product so you might also post this in Infinity github repo for quicker answer?

Yes, I already posted there

Some plugins do not allow some transformations

Are you trying to merge on the date column?

Can you show alll of the jsonata queries?

Have you looked into dping them all in one jsonata and then use $merge

Yes I am trying to merge on the date column

I am using this same jsonata query in every request and I didn’t tried $merge

I am getting only 1000 records per request if I want to get more I need to call the API using $skip=1000 query that’s why calling 5 requests so when the data is above 1000 the user can see it

1 Like

:persevere::cold_face: ouch that is unfortunate. As I mentioned in the past infinity might not be the best solution for this. This approach cannot scale

1 Like

so do you know any other solution for this?
can I get date first 10 strings using transformation or an other substring method in grafana?

The other solution would be apache echarts. Give it the api and loop as many times until you nonlonger get next 1000 from the api.

hey I can’t use Apache and I know the issue why it is not merging because of the jsonata when the value is empty jsonata query creates a column name result while the simple uql query is working and merging but showing less rows per day so I want to use substring I tried if method in jsonata also but didn’t work
can we use substring in uql I tried like this

| extend "inviteDateTime"=todatetime(substring("inviteDateTime", 0, 10))

don’t want to use jsonata because when array is empty jsonata creates a column name result with nothing in it and I have a problem while merging. and when using only this

| extend "inviteDateTime"=todatetime("inviteDateTime") | extend "inviteDateTime"=startofday("inviteDateTime")

getting problem of rounding it by day
like I have 90 days but this is showing only 86 that’s why substring is important

whenever you are free please tell me what can I do?

I did it like this

| extend "inviteDateTime"=extract('^.{0,10}',0,"inviteDateTime")

with the help of the owner of this plugin

1 Like