I want to copy a table from one environment to another. I know I could export it from environment one, then transfer the resulting file to the second environment, then use import to load it, but is there an easier way?
In particular, is there a way which just transfers the data between the systems without requiring intermediate storage?
I don't want to have one or more large staging areas just to facilitate these data transfers.
Run an export to unload the data, then pipe the resulting information into an import to load it to the second system. That will work with all software versions using a command like this (note this is using keyed authentication, so no password details are supplied to the export or import tool):
wxexport -s prod sys -f WCB -n - SYS.MILLION | wximport -n -s test sys -t -iw -f WCB -d - SYS.MILLIONCOPY
Kognitio WX2 Data Import Tool v8.01.00-rel140121
(c)Copyright Kognitio Ltd 1992-2014.
Initialising...
Connected to test, user sys, importing to SYS.MILLIONCOPY from -
Completed
Bytes read: 16004132
Records read: 1000000
Time taken: 00:00:04
Note that with versions of the software that support wxloader
and wxunloader
, those tools should be used rather than wximport
/wxexport
. Also, with later versions, using external table connectivity might be a better way forward - see the version 8 release notes and full documentation for details.