lukasmartinelli / pgfutter

Import CSV and JSON into PostgreSQL the easy way
MIT License
1.33k stars 128 forks source link

pgfutter issue when use fields "x,y,z" and delimiter ";" #58

Open fcamargovalencia opened 5 years ago

fcamargovalencia commented 5 years ago

/opt/jboss/pgfutter --db database --table tableName --user userName--pass password --host local --schema public csv --fields "columna0,columna1,columna2,columna3,columna4,columna5,columna6,columna7,columna8,columna9,columna10,columna11,columna12,columna13,columna14,columna15,columna16,columna17,columna18,columna19,columna20,columna21,columna22,columna23,columna24,columna25,columna26,columna27,columna28,columna29,columna30,columna31,columna32" --delimiter ";" filename.csv

pgfutter reports "wrong number of fields in line" when execute command on windows it works, but when i run the same file with the same command i got this error

line 1, column 0: wrong number of fields in line: NO. OBLIGACION;CEDULA;NOMBRE DEUDOR;DIRECCION DEUDOR;PROYECTO1;DIRECCION CASA ADQUIRIDA;TELEFONO DOMICILIO;CIUDAD DOMICILIO;TELEFONO CONTACTO 1;TELEFONO CONTACTO 2;TELEFONO CONTACTO 3;NIT EMPRESA;NOMBRE EMPRESA;DIRECCION EMPRESA;TELEFONO EMPRESA;CIUDAD EMPRESA;VALOR VIVIENDA;MONTO INICIAL;PLAZO;SALDO EN PESOS;VALOR CUOTA;TASA DE INTERES;DIAS EN MORA;VALOR VENCIDO;NO. CUOTAS PENDIENTES;FECHA ULTIMO PAGO;CICLO FACT.;SALDO A IMPACTAR;FECHA DESEMBOLSO;FECHA PROX. PAGO;OBSERVACIONES;EXTRA1;EXTRA2;

joallard commented 2 years ago

I seem to run into a similar problem where there is an empty cell at the end of the row which might throw things off