Hi everybody!
When I imported the csv file with 1000 records, everything was fine.
But with 100,000 records, the error: "File could not be read. Unexpected token < in JSON at position 0". Can someone help me?
Thank you so much ^^.
Please could you try sending your CSV file directly to the Elasticsearch find file structure endpoint, adding the explain
URL argument. So something like this, replacing localhost:9200
with the correct host and port for your Elasticsearch:
curl -u user:password -s -H "Content-Type: application/json" -X POST "localhost:9200/_ml/find_file_structure?pretty&explain" -T my_csv_file.csv > response.txt
(Yes I know the Content-Type: application/json
is inconsistent with it being a CSV file, but that is not the cause of your problem. All requests have to claim to be JSON.)
At the bottom of the large response is the explanation
section. Please redact any confidential information that is in it and then paste the explanation
section into this post. Hopefully that will give a clue about what happened.
Also, which version are you using?
Hi David!
Thank you for reply. But problem in my Nginx config and I solved it.
Best regards.
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.