pgloader icon indicating copy to clipboard operation
pgloader copied to clipboard

Issue loading IXF file in target table with fileds default

Open grosa69 opened this issue 4 years ago • 3 comments

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) | | |

grosa69 avatar Feb 22 '21 07:02 grosa69

Hi Team,

I am also facing the same issue while loading the IXF file:

pgloader pgloader.load

2022-06-17T10:05:28.180000+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
                              ("'NOT_APPLICABLE'").
2022-06-17T10:05:28.180000+01:00 LOG report summary reset

Debug output of the same:

2022-06-17T10:05:00.112000+01:00 DEBUG SET client_encoding TO 'utf8'
2022-06-17T10:05:00.112000+01:00 DEBUG SET application_name TO 'pgloader'
KABOOM!
FATAL error: NIL fell through ETYPECASE expression.
             Wanted one of (STRING CONS PGLOADER.CATALOG:TABLE).
Date/time: 2022-06-17-02:05!
An unhandled error condition has been signalled:
   NIL fell through ETYPECASE expression.
   Wanted one of (STRING CONS PGLOADER.CATALOG:TABLE).

Could you please help me resolve this issue? Please let me know if you need any further details.

pgloader version "3.6.2"

somnath-kale avatar Jun 17 '22 09:06 somnath-kale

I'm having the same issue. Some of you fixed it?

McGiverGim avatar Aug 30 '22 11:08 McGiverGim