Open gainings opened 2 years ago
Hello, @gainings. Could you try the following configuration? If this configuration does not match your requirements, please write detail for your requirements.
uuid.txt
1,AD06F94F-829F-4CF9-A6AD-04EE3714E02E
2,E5504F33-C412-49BA-BF73-0218BF572535
3,6333DC4E-2173-4916-B48A-C970F720CCBB
4,BCBF4DC2-EE75-4365-ADC3-94F224644B6F
5,80AD6583-A2E6-4A8F-A65B-9CAEBA000084
6,2AC18E27-91F0-4419-8A7F-007D6BD5920E
7,B8013A05-01D7-4ABB-A11D-2210A59B5486
8,6B32F95F-498C-4DD0-A79C-877078F749DB
9,21F9FB93-7786-426B-BBB8-806D1E092E0B
10,770C4DA4-E96C-4097-A71B-26C33A7904D0
in:
type: file
path_prefix: ./uuid.txt
parser:
type: csv
columns:
- { name: id, type: long }
- { name: uuid, type: string }
out:
type: postgresql
host: localhost
user: username
password: password
database: database
table: uuid_test
mode: insert
column_options:
uuid: { type: uuid, value_type: string }
@hiroyuki-sato thanks to reply!
In my environment, multiple configuration files use the same output config file with the include syntax
ex
{% assign table_name = 'foo_var' %}
{% include 'commons/in' with table_name %}
filters:
- type: mask
columns:
- { name: name }
{% include 'commons/out' with table_name %}
In this situation, it's not possible to set the column_options
of each table , so I would like an UUID support or any option that can be specified generically.
If that seems difficult, I'll change the way how to use the configuration file.
Helo, @gainings
You can use this branch until introduced new feature. It worked in my environment (I checked the string data only). diff This change requires more work(add test and discuss to others) for adding this branch.
Please let me know if you want to build it.
Plugin not support postgres UUID datatype now. UUID have become generally used, so I'd be happy if you could support them.