mirror of
https://github.com/dimitri/pgloader.git
synced 2025-08-08 07:16:58 +02:00
Before that it was necessary to install a function in the lisp environment either in the source itself in src/utils/transforms.lisp, or in a lisp file loaded with --load-lisp-file (or -l for shorts). While this could be good enough, sometimes a very simple combination of existing features is required to transform a function and so doing some level of lisp coding directly in the load command is a nice to have. Fixes #961.
13 lines
398 B
Fish
13 lines
398 B
Fish
LOAD DBF
|
|
FROM data/DNORDOC.DBF with encoding cp866
|
|
INTO postgresql:///pgloader
|
|
TARGET TABLE public.dnordoc
|
|
WITH truncate, create table, disable triggers
|
|
|
|
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;
|