I try to make a quick file download to the table via python on SAP IQ. Faced such a problem. Initially, the user has access to download files using the load table (...) using client file ... statement. If you use software from sap (interactive sql) everything works fine, but using the sqlanydb library I get an error ... (b'Operation failed on file due to file permissions. File: file.txt \n-- (oslib/hos_clientfileio.cxx 143) ', -1006148) get ... (b'Operation failed on file due to file permissions. File: file.txt \n-- (oslib/hos_clientfileio.cxx 143) ', -1006148) . Please help me figure out what exactly I'm doing wrong? Perhaps it is worth adding any parameter to sqlanydb.connect (). I could not find the normal documentation by myself. I cannot use import or inserts, since files can later come large (from 100K lines and more), and load table (...) using client file very quickly copes with the task and practically does not load the server
import sqlanydb conne = sqlanydb.connect(uid='user', pwd='password', databasename = 'dbname', host = 'host.name') _SQL = '''create table #REP001 ( col1 int, col2 int ) ; commit; load table #REP001 ( col1 ';', col2 '\x0d\x0a' ) using client file 'file.txt' quotes off escapes off ; commit;''' cur = conne.cursor() cur.execute(_SQL) cur.close() conne.close() Thanks in advance for your reply, I will accept any, even the most insane idea.