File: csv-getenv.load

package info (click to toggle)
pgloader 3.1.0%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 2,192 kB
  • ctags: 867
  • sloc: lisp: 6,913; makefile: 238; sh: 82; sql: 55
file content (11 lines) | stat: -rw-r--r-- 302 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
load csv
    from getenv 'source'
         having fields (id, field)
    into getenv 'target'
    with fields optionally enclosed by '"', 
         fields terminated by ',',
         truncate

  before load do
    $$ drop table if exists getenv; $$,
    $$ create table getenv(id int, field text); $$;