File Upload Failed Invalid - type-options-xml provided — Oracle Analytics

Oracle Analytics Cloud and Server

Welcome to the Oracle Analytics Community: Please complete your User Profile and upload your Profile Picture

File Upload Failed Invalid - type-options-xml provided

Received Response
44
Views
2
Comments

Summary

File Upload Failed Invalid - type-options-xml provided

Content

I am trying to upload a simple CSV file. The load fails with:

 

File Upload Failed

Invalid type-options-xml provided

 

The file looks like this:

 

$ head -2 sigo_cleaned.csv

ADES_NOMBRE, ADES_APELLIDO1, ADES_APELLIDO2, TIPO_DOCUMENTO, ADES_NUMERO_DOCUMENTO, DFEC_NACIMIENTO, ESTADO, DESCRIPCION_SENALMIENTO, NATURALEZA, ENTIDAD, MOTIVO_BUSQUEDA, NCOD_INTERNO, CONDUCTA, AIND_DOCUMENTO_PRINCIPAL, ACOD_ALIAS, NCOD_SENALAMIENTO

"b31dce8d74f46f46b5f1518f141c7b67d117de009c28d2e2badd09195d7002cc", "99d0a60e59b4df9e78651036b13b56d05d125f50448b761bb6e6d81b3597c30d", "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", "Permiso de conducir", "5504890fe91bc7cc6d5ef74f2a4840c97ba4fda4d5120ab81ca834110ad2aac5", "1973-03-15", "Validado/En vigor", None, "Judicial", "1", "Falsificación de documentos de credito", "3", "Búsqueda, detención e ingreso en prisión", "S", "301518202", "1438049"

 

I don't see anything wrong ... I have another dat set that loaded successfully:

 

$ head -2 apis_cleaned.csv

PK, ID_IDENTIDAD, NOMBRE, APELLIDOS, TIPO_DOCUM, NUM_DOCUM, FECHA_NACIMIENTO, NACIONALIDAD, SEXO, COD_TRANSPORTE, NUM_TRANSPORTE, ORIGEN, FECHA_ORIGEN, DESTINO, FECHA_DESTINO, FECHA_PROCESADO

"111171282", "73193867", "b904965ca4b8ee1ac41e39f63300f558dc1b36ee670fcaea92c1bf6444952fc4", "e78bcefbdb10c98cb8d01cdc3b71df0617213cb58fb3736caf65cfd8841d23ce", "8.DOC", "396faafbff287045f46d60d968eb205840ad5cd15a2cb028eb461ae8906f932c", "1995-05-16", "ESP", "F", "FR", "5996", "STN", "2017-01-27 15:00:00", "MAD", "2017-01-27 18:30:00", "2017-01-27 16:05:27"

 

What is the "type-options.xml" that the error refers to ?

 

Answers

  • Albert Godfrind
    Albert Godfrind Rank 3 - Community Apprentice

    I found out what happens. The error is because the number of values in the first line (used for headers) does not match the number of values in the data rows: some words have more values. It would be better having a clearer error message - something like "header row does not match data" ...

    But then, how can that be ?

    Here is what happens:

    1) Some of the values contain commas. For instance: "Búsqueda, detención y personación".

    2) There are spaces between the columns: for example "value1", "value2". Notice the space after the comma ? Somehow that is not valid and causes the string delimiter (the double quotes) to be ignored. And therefore, the comma in the strings are interpreted as field separators.

    Interestingly, this also happens for plain Excel and is a known limitation: when enclosing values in delimiters (double quotes), then there must be no space after a column separator. Very odd. See this:

    The following file works fine: the string delimiters are properly recognized

    COL1, COL2

    "a","b,c"

    becomes

    COL1COL2
    ab,c

    But this one fails:

    COL1, COL2

    "a", "b,c"

    becomes

    COL1COL2
    a"bc"

    The solution is therefore to just remove those extra spaces:

    sed "s/\", \"/\",\"/g" sigo.csv> sigo_cleaned.csv

    Now the file loads fine (also in Excel)

  • Aman Madaan-89469
    Aman Madaan-89469 Rank 1 - Community Starter

    I'm getting the same error with the datasets located at https://www.kaggle.com/c/donorschoose-application-screening