File: dbf-memo.load

package info (click to toggle)
pgloader 3.6.10-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 12,060 kB
  • sloc: sql: 32,321; lisp: 14,793; makefile: 435; sh: 85; python: 26
file content (13 lines) | stat: -rw-r--r-- 451 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
LOAD DBF
    FROM data/DNORDOC.DBF with encoding cp866
    INTO postgresql:///pgloader
    TARGET TABLE dbf.dnordoc
    WITH truncate, create table, disable triggers
  BEFORE LOAD DO $$ create schema if not exists dbf; $$

    cast
      column dnordoc.normdocid
          to uuid
      using (lambda (normdocid)
              (empty-string-to-null (right-trim normdocid))),
      column dnordoc.doctype to integer using db3-numeric-to-pgsql-integer;