EXPORT TO PARQUET - Specify the Node Data Will be Written To
avi120
✭
I have 3 node Vertica cluster. I would like to export data to local folder on specific node from the three node cluster.
How can I do it without creating a mapping on the other nodes?
Currently my command is:
EXPORT TO PARQUET (directory = '/data/export_vertica_tables/a/') AS SELECT b from imp.a;
Tagged:
0
Answers
Try using an empty OVER() clause.
EXPORT TO PARQUET (directory = '/data/export_vertica_tables/a/') OVER() AS SELECT b from imp.a;
See: Partitioning and Sorting Data
It says:
Thanks for the reply. To better understand, I would appreciate getting input on the following:
1) When I used the empty OVER() I saw that the directory was also created on the other nodes but was empty. Why this empty directory is created?
2) I ran the command on node1, but the data was exported to node2. Can I control to which node the data will be written?
3) Is OVER() also the default if I omit the OVER all together.
Hi,
Which version of Vertica are you running? Note that Vertica 11.0 is the first version to officially support exporting to the Linux File System.
See: Export to Linux File System
It says:
Anyway, there doesn't appear to be a way to just write to one node...
Below are some quick tests using the DB view as described here Monitoring Exports to show the rows written on each node...