I have a problem with data catching from JSON file. The file looks like this:
And I would like to get values from data field but only for en_US locale.
I was trying to add filter in RSD file like below but it did not help:
Can that type of filtering be used there?
Greets, Aleksei
Page 1 / 1
Hi Aleksei
You can get all the pot_life data if you point to that part with the JSONPath option before generating the RSD file. You then add a filter based on this table for the locale field and specify that it needs to be locale=en_US.
SELECT * FROM rest.pot_life WHERE Locale = “en_US”
But the problem is that there are a lot of columns where locale filter should be implemented. Might be too time expensive to create separate table for every of it:
Then you get a table containing locale, scope and schema. You will see all rows across the values and can add a filter to only get the en_US rows.
Hello, Did try it but this gives me only that particular table which i can then filter. So I basically need to do the same for all the rest columns which should be also separated and filtered. Ok, will do it that way.
Thank you for your help!
Hi Aleksei
OK, I asked the same question, more or less, to CData. Here is their response.
Are you saying they need the path to that JSON object to be returned as an additional column and they need the results of a query to be something like this? locale: null, scope: null, data: FALSE, path: /values/ce/
If that is what they need, I don't think there is any easy way to implement that, but I can look into if this is something that can be done with an RSD file. If this is not what they are looking for, could you provide me an example of how your customer is expecting the data to be formatted?
So I asked for that, but I assume it could be done many ways.