A client has put together some scripts that take tables from q, perform analysis in an R session and return separate tables back to q. They have seen some strange behaviour when trying to return one of the tables.
The script works fine when the final line of code is commented out. This final line takes the first 4 rows from the table where the column datatype matches a certain value. If they run the part of that line which determines the indices of these rows, a which query, the positions are returned as expected. In this case, 1 2 3 4 is returned.
However, when trying to retrieve these rows, a 'domain: Argument to function out of function's domain' error is given. More interestingly, when hardcoding the indices in any order except 1 2 3 4, the data is outputted fine.
What could the possible cause of this error be?
Question : Could you please confirm if you extract the first row and run meta on the extracted table in KDB, then do the same for each of the other 4 rows, do those metas match. Similar to below
(meta[Rget"persDat[c(1),]"]) ~ meta Rget"persDat[c(2),]"
Just to confirm, if I try and pull out the whole table at this point, then I do indeed get the full table back:
Tel: +44 (0)28 3025 2242
Tel: +1 (212) 447 6700
Tel: +61 (0)2 9236 5700