Reputation: 43
I "thought" pymonetdb would allow a bulk csv file upload to a remote MonetDB server but I'm getting an error:
Error in py_call_impl(callable, call_args$unnamed, call_args$named) : pymonetdb.exceptions.OperationalError: cannot transfer files from client
I knew I wasn't able to do this with the R client MonetDB.R so I decided to go crazy and test the python package via reticulate. Querying the db actually works fine but attempting to use COPY INTO ON CLIENT does not work. I'm trying to determine if the pymonetdb is supposed to work or not. Documentation and comments are scarce with MonetDB.
This post seems to indicate it should have been possible:
Bulk upload using csv file to remote MonetDB server
Here's a snippet of my attempt below.
` pyconn = pymonetdb$connect('testdb', hostname='1.1.1.1', port=50000, username='monetdb', password='monetdb')
handler = pymonetdb$SafeDirectoryHandler("/tmp/monetdb")
pyconn$set_uploader(handler)
cursor = pyconn$cursor()
qry = paste0('COPY INTO "', db.table, '" FROM \'', csv.file, '\' ON CLIENT USING DELIMITERS \',\'')
cursor$execute(qry)`
I tried to upload data from a csv file to a remote MonetDB server but got an error telling me I can't
pymonetdb.exceptions.OperationalError: cannot transfer files from client
python 3.8 MonetDB 11.39.7 pymonetdb 1.7.1
Upvotes: 0
Views: 82
Reputation: 43
FYI, this PR was merged and should work. Looks like my very old version of MonetDB might be the source of the problem. I'll upgrade and post here again if that fixes it.
https://github.com/MonetDB/pymonetdb/pull/102
Upvotes: 0