-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsample_export_config.edn
More file actions
executable file
·31 lines (29 loc) · 1.25 KB
/
Copy pathsample_export_config.edn
File metadata and controls
executable file
·31 lines (29 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
[{;;you can use relative or absolute paths
:in-file "../../db/ogk02/m000101.dbf"
:out-file "m000101.csv"
;;You need to list fields names you want to export. The order of
;;fields names is important. Field names is a keywords. You need to
;;lowercase field name string and prepend it with a colon.
:fields [:kse :kdse :zona :poz :kol :kpk :datk]
;;This map is optional and contain maping of field name to
;;conversion function name. It is used for special cases and now it
;;has only two functions: :char-to-int which convert three chars to
;;int representation and :bytes-to-str which get all field data as
;;string
:conv {:kdse :chars-to-int
:kse :chars-to-int}
;;delimiter fo csv data (optional, default is "|")
:delimiter "|"
;;encoding of output file (optional, default is "UTF8")
:encoding "UTF8"}
{:in-file "../../db/ogk02/m000102.dbf"
:out-file "m000102.csv"
:fields [:kdse :obizi :nomdet :ndse :zol :ser :pl :pal]
:conv {:kdse :chars-to-int}}
{:in-file "../../db/ogk02/m000103.dbf"
:out-file "m000103.csv"
:fields [:ki :obiz :naim :kpprod :kol_zol :kol_ser :kol_plat
:kol_pal :ves_izd :ves_net :kod :dat_vvod]
:conv {:ki :chars-to-int
:dat_vvod :bytes-to-str}}
]