Csv-river

Hi

I installed csv-river in elastic search plugins folder and try to execute
the following command via curl,

curl -XPUT "localhost:9200/_river/my_csv_river/_meta" -d { "type" :
"csv", "csv_file" : {"folder" : "c:\test.csv","filename_mask" :
".*\.csv$","poll":"5m","fields" :
["EmpId","EmpName"],"field_separator" : ",","escape_character"
: ";","quote_character" : "'"},"index" : {"index" :
"my_csv_data","type" : "csv_row","bulk_size" :
10000,"bulk_threshold" : 50}}"

I am getting this error org.elasticsearch.index.mapper.MapperParsingException:
failed to parse

What are the steps needed to correct it or what's wrong in my curl cmd.

Note *:
I m using windows os so that i used slash in curl cmd

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Have you looked at the elasticsearch log? Could you post the response of
the request that indicates the error?

Thanks,

Bob

On Saturday, 31 August 2013 02:05:32 UTC-4, Vasanthakumar Rajendran wrote:

Hi

I installed csv-river in Elasticsearch plugins folder and try to execute
the following command via curl,

curl -XPUT "localhost:9200/_river/my_csv_river/_meta" -d { "type" :
"csv", "csv_file" : {"folder" : "c:\test.csv","filename_mask" :
".*\.csv$","poll":"5m","fields" :
["EmpId","EmpName"],"field_separator" : ",","escape_character"
: ";","quote_character" : "'"},"index" : {"index" :
"my_csv_data","type" : "csv_row","bulk_size" :
10000,"bulk_threshold" : 50}}"

I am getting this error org.elasticsearch.index.mapper.MapperParsingException:
failed to parse

What are the steps needed to correct it or what's wrong in my curl cmd.

Note *:
I m using windows os so that i used slash in curl cmd

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

I am not sure which programming language you are comfortable with.

I use PHP for simple scripts like this.

If that is not working out you could use PHP to read the CSV file and then
use CURL to send the requests to ES to index it.

So first, I will create and index and a mapping for the type that I want to
import.

Then read the CSV file to extract the rows.

Then index each row in ES

Here are some links that could help with this:

http://php.net/manual/en/function.fgetcsv.php

http://www.php.net/manual/en/function.curl-setopt.php
http://www.php.net/manual/en/function.curl-exec.php

Author and Instructor for the Upcoming Book and Lecture Series
Massive Log Data Aggregation, Processing, Searching and Visualization with
Open Source Software

http://massivelogdata.com

On Sat, Aug 31, 2013 at 9:44 AM, btiernay rtiernay@gmail.com wrote:

Have you looked at the elasticsearch log? Could you post the response of
the request that indicates the error?

Thanks,

Bob

On Saturday, 31 August 2013 02:05:32 UTC-4, Vasanthakumar Rajendran wrote:

Hi

I installed csv-river in Elasticsearch plugins folder and try to execute
the following command via curl,

curl -XPUT "localhost:9200/river/my_csv**river/meta" -d { "type" :
"csv", "csv_file" : {"folder" : "c:\test.csv","filename
mask"
: ".*\.csv$","poll":"5m",
"fields" : ["EmpId","EmpName"],"
**field_separator" : ",","escape_character" :
";","quote_character" : "'"},"index" : {"index" :
"my_csv_data","type" : "csv_row","bulk_size" :
10000,"bulk_threshold" : 50}}"

I am getting this error org.elasticsearch.index.mapper.MapperParsingException:
failed to parse

What are the steps needed to correct it or what's wrong in my curl cmd.

Note *:
I m using windows os so that i used slash in curl cmd

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

You seem to be missing a quote after -d

On Saturday, August 31, 2013 1:05:32 PM UTC+7, Vasanthakumar Rajendran
wrote:

Hi

I installed csv-river in Elasticsearch plugins folder and try to execute
the following command via curl,

curl -XPUT "localhost:9200/_river/my_csv_river/_meta" -d { "type" :
"csv", "csv_file" : {"folder" : "c:\test.csv","filename_mask" :
".*\.csv$","poll":"5m","fields" :
["EmpId","EmpName"],"field_separator" : ",","escape_character"
: ";","quote_character" : "'"},"index" : {"index" :
"my_csv_data","type" : "csv_row","bulk_size" :
10000,"bulk_threshold" : 50}}"

I am getting this error org.elasticsearch.index.mapper.MapperParsingException:
failed to parse

What are the steps needed to correct it or what's wrong in my curl cmd.

Note *:
I m using windows os so that i used slash in curl cmd

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.