vertica/vertica-nodejs

Is copy local supported?

slemme1 opened this issue · 3 comments

Bulk load/copy with files on Vertica mount works:
copy my_table from '/usr/src/my_table.txt' delimiter E'\t' null E'\N' enforcelength rejected data as table loader_rejects;

Is load/copy from local (Windows) file supported and if so, can you provide an example?
copy my_table from local 'c:\source\my_table.txt' delimiter E'\t' null E'\N' enforcelength rejected data as table loader_rejects;

This currently throws the following error:
AssertionError [ERR_ASSERTION]: unknown message code: 46
at Parser.handlePacket (C:\Source\canvas-cli\node_modules\v-protocol\dist\parser.js:159:34)
at Parser.parse (C:\Source\canvas-cli\node_modules\v-protocol\dist\parser.js:56:38)
at Socket. (C:\Source\canvas-cli\node_modules\v-protocol\dist\index.js:30:42)
at Socket.emit (node:events:513:28)
at addChunk (node:internal/streams/readable:324:12)
at readableAddChunk (node:internal/streams/readable:297:9)
at Readable.push (node:internal/streams/readable:234:10)
at TCP.onStreamRead (node:internal/stream_base_commons:190:23) {
generatedMessage: false,
code: 'ERR_ASSERTION',
actual: undefined,
expected: undefined,
operator: 'fail'
}

Node.js v18.13.0

Copy functionality is on the roadmap. It is not supported right now. Will update when we have a potential timeframe.

Copy from local stream and file will be available in the 1.1.0 release expected by the end of the month

Available in latest release.