Parse error: "limit" in function

https://learninghub.kx.com/forums/topic/parse-error-limit-in-function

Hello everyone,
I am currently learning q/kdb and am writing a function to load and process data called .data.function
it works well.
but now, even if had a single line as print "hello", it triggers the error:

ERROR: limit

>>> Explanation: Tried to generate a list longer than 240-1, or serialized object is > 1TB, or 'type if trying to serialize a nested object which has > 2 billion elements, or Parse errors, too many constants


I really dont understand why, especially because the code works fine when i run it line by line

Thank you for your help
PF


Without seeing your code, it is hard to determine what the problem is, but most likely you are reaching the limit on local variables, constants or global references in the function.


Errors | Basics | kdb+ and q documentation - kdb+ and q documentation (kx.com)

limit error usually occurs when you try to create a list greater than 2 Billion items or object with size greater than 2GB.

As you said you are loading and processing the data you can divide the data into chunks and then process it. It might help.