]> git.bundesbrandschatzamt.de Git - emacsconfig.git/commitdiff
snippet: vertica-cp-table
authorAndreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
Mon, 31 Jul 2017 16:18:24 +0000 (18:18 +0200)
committerAndreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
Mon, 31 Jul 2017 16:18:24 +0000 (18:18 +0200)
snippet to truncate and copy a table via vertica connect.

Signed-off-by: Andreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
snippets/sql-mode/vertica-cp-table [new file with mode: 0644]

diff --git a/snippets/sql-mode/vertica-cp-table b/snippets/sql-mode/vertica-cp-table
new file mode 100644 (file)
index 0000000..ebce9dc
--- /dev/null
@@ -0,0 +1,6 @@
+# -*- mode: snippet -*-
+# name: vertica-cp-table
+# key: cp-table
+# --
+TRUNCATE TABLE $1.$2;
+COPY $1.$2 FROM VERTICA $3.$1.$2 DIRECT;
\ No newline at end of file