dimitri / dimitri/pgloader

Issue loading IXF file in target table with fileds default

Open
#1,260 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Sponsor needed WishList
Dominant language
Common Lisp
Stars
6.5k
Forks
613
Avg merge
3h 46m
Merged PRs (30d)
1

Description

HI,
I'm loading ixf file by pgloader from ixf file but pgloader throws this exception .
I try to drop the default value from the fields but the issue is the same

pgloader version 3.6.2
compiled with SBCL 1.4.0-1.el7
sb-impl::default-external-format :UTF-8
tmpdir: #P"/tmp/pgloader/"
2021-02-22T08:41:20.018000+01:00 NOTICE Starting pgloader, log system is ready.
2021-02-22T08:41:20.040000+01:00 INFO Starting monitor
2021-02-22T08:41:20.045000+01:00 LOG pgloader version "3.6.2"
2021-02-22T08:41:20.049000+01:00 INFO Parsed command:
LOAD IXF
FROM EVDA.TETSVQ_FAT.ixf
INTO postgresql://postgres:postgres@localhost:5432/cpdb07
TARGET TABLE evda.tetsvq_fat
WITH truncate, data only, timezone UTC;

2021-02-22T08:41:20.147000+01:00 DEBUG CONNECTED TO #<PGLOADER.PGSQL:PGSQL-CONNECTION pgsql://postgres@localhost:5432/cpdb07 {10066B8DB3}>
2021-02-22T08:41:20.147000+01:00 DEBUG SET client_encoding TO 'utf8'
2021-02-22T08:41:20.147000+01:00 DEBUG SET application_name TO 'pgloader'
2021-02-22T08:41:20.158000+01:00 LOG Migrating from #<IXF-CONNECTION ixf:///tmp/postgres/EVDA.TETSVQ_FAT.ixf {10066B7703}>
2021-02-22T08:41:20.158000+01:00 LOG Migrating into #<PGSQL-CONNECTION pgsql://postgres@localhost:5432/cpdb07 {10066B8DB3}>
2021-02-22T08:41:20.184000+01:00 INFO Processing source catalogs
2021-02-22T08:41:20.187000+01:00 FATAL Failed to process catalogs: There is no applicable method for the generic function
#<STANDARD-GENERIC-FUNCTION PGLOADER.CATALOG:FORMAT-DEFAULT-VALUE (1)>
when called with arguments
("'EUR'").
2021-02-22T08:41:20.187000+01:00 LOG report summary reset
table name errors read imported bytes total time read write


        fetch          0          0          0                     0.000s


2021-02-22T08:41:20.213000+01:00 INFO Stopping monitor

The table is present in the db cpdb07 and the table structure is the following

                     Table "evda.tetsvq_fat"

Column | Type | Collation | Nullable | Default
-----------+-----------------------+-----------+----------+---------------
c_ctr | numeric(9,0) | | not null |
d_fat | date | | not null |
c_soc_com | smallint | | not null |
f_fat_nc | character(1) | | not null |
c_soc_ris | smallint | | not null |
c_pro | character(2) | | |
c_sup_fat | character(1) | | not null |
n_ann_fat | numeric(4,0) | | not null |
n_prg_fat | numeric(9,0) | | |
c_tip_fat | character(1) | | not null |
i_tot_fat | numeric(13,2) | | not null |
c_tip_pag | character(1) | | not null |
c_abi | numeric(5,0) | | |
c_cab | character(5) | | |
c_ccn | character(12) | | |
c_iban | character(27) | | |
d_sca | date | | not null |
f_ele_vgg | character(1) | | not null |
n_vgg | numeric(7,0) | | |
f_sup_stp | character(1) | | |
c_val | character(3) | | not null | 'EUR'::bpchar
i_tot_cvl | numeric(13,2) | | |
c_cod_doc | numeric(15,0) | | not null | '-1'::integer
c_esi | character(2) | | |
t_key_fat | character varying(50) | | |
c_sta_cre | character(1) | | |
d_sta_cre | date | | |
t_age | character(10) | | |

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the IXF load with the target table default set to 'EUR', then trace catalog processing where FORMAT-DEFAULT-VALUE is called. Confirm whether the failure is specific to the IXF source or the PostgreSQL default representation. Done means the catalog phase completes and the file can be imported without this exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
postgresql
Domain
databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.