I am getting the below error while performing a select query to copy data.
singlestore> select * from table_name INTO OUTFILE '/tmp/file.csv' FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n';
ERROR 1016 (HY000): Writing to this file is disallowed: /tmp/file.csv
Singlestore version: 7.x
OS: Ubuntu 18.04
Does it have any connection with the open file limit?
Probably the user running the memsqld process does not have write access to that folder. Make sure it has write access to the folder and I’d expect it to start working.
As @hanson suggested, this looks like a permissions-related issue where the user that is running the database process is not able to write to the path. ERROR 1016 (HY000): Writing to this file is disallowed: /tmp/file.csv
Are you able to simply try to write to a different path outside of the /tmp dir to see if that works? On some systems, /tmp can be more restrictive than other locations.
If you have also misconfigured the OS to have a lower open file limit than we recommend in our best practices, we suggest you also review our system configuration documentation and ensure you meet those requirements.