Importing CSV File Is not complete

Importing CSV File Is not complete

HassanDomeDeneaHassanDomeDenea Posts: 29Questions: 10Answers: 0

Greetings,
I have table, with 8 columns.
I wanted to import a CSV file, of 78 records.
After confirming and attaching each column to value, saying importing 78 records. The result in the rendered datatble is only 72 records, so as in DB.
So about 6 records were lost.
Also in deleting, if I selected the entire table and confirmed. After refreshing I find that 5 were not really removed.
Is it problem in DataTable ? Or in my localhost of Appserve?
I checked max_post to be infinite just in case.
I tried Sqlite and Mysql, same result.
Any help ?

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 15,118Questions: 1Answers: 2,583

    Hi @HassanDomeDenea ,

    I just tried it with this example here, and was able to import 80 records without a problem, so it looks like something on your server end. You could confirm by checking the network traffic in the browser's console.

    Cheers,

    Colin

  • HassanDomeDeneaHassanDomeDenea Posts: 29Questions: 10Answers: 0
    edited April 2019

    Thanks for reply.
    Well I tried at more than one server, same.
    The problem occurs only with large column tables, in my example was 8 all of them are text.
    I checked the JSON sent to the php file, it was terminated at object (record) 72. is there any string length limitation or something ?
    I tried to handle the Sqlite database in the server with much larger insertion queries simultaneously, and succeeded.

  • kthorngrenkthorngren Posts: 20,150Questions: 26Answers: 4,736

    Maybe there is something in the CSV file. I would either start by breaking the problem file into chunks, maybe half and import that. If successful add another chunk of lines. The goal would be to narrow down what is importing then checking those lines to see if there is an issue. If you find an example that doesn't work then post it here so it can be looked at.

    Also I would look at the browser's console for errors.

    Kevin

  • HassanDomeDeneaHassanDomeDenea Posts: 29Questions: 10Answers: 0

    @kthorngren
    Thank you for you reply.
    I tried to separate the file into nearly 2 equal halves and imported them separately. Each file was imported successfully and the result was complete (unlike importing them in 1 file which was corrupted).
    No error in browser console.
    Those are the images of datatable, csv file:

    If there is a web server that I can upload the scripts there or something else I can capture it that might help.
    Thx

  • allanallan Posts: 61,452Questions: 1Answers: 10,055 Site admin
    edited April 2019 Answer ✓

    Sounds like the web server might be limiting either the upload size, or the number of parameters that can be submitted. There are options for that in PHP - max_input_vars for example. Other environments probably have something similar.

    Allan

  • HassanDomeDeneaHassanDomeDenea Posts: 29Questions: 10Answers: 0

    @allan That was brilliant!. It solved the problem. Thanks.

This discussion has been closed.