Closed bartclarkson closed 7 years ago
Hello
What version do you use? Probably looks like that there is issue with elasticsearch.py library.
I too am having same issue, sudo pip install es2csv Collecting es2csv Downloading es2csv-1.0.3-py2-none-any.whl Collecting progressbar>=2.3 (from es2csv) Downloading progressbar-2.3.tar.gz Collecting elasticsearch>=2.3.0 (from es2csv) Downloading elasticsearch-5.0.0-py2.py3-none-any.whl (57kB) 100% |████████████████████████████████| 57kB 1.5MB/s Requirement already satisfied (use --upgrade to upgrade): urllib3<2.0,>=1.8 in /usr/lib/python2.7/site-packages (from elasticsearch>=2.3.0->es2csv) Installing collected packages: progressbar, elasticsearch, es2csv Running setup.py install for progressbar ... done Successfully installed elasticsearch-5.0.0 es2csv-1.0.3 progressbar-2.3 You are using pip version 8.0.2, however version 8.1.2 is available. You should consider upgrading via the 'pip install --upgrade pip' command.
Fedora 24.
Just tried a fresh pip install on ubuntu 16.04, same issue. Tried field args as space delimnited, also tried as ['var1','var2']
@taraslayshchuk Thanks, that works...I pip unistalled es5 and installed 2.3.0...I noticed that the order of fields given is resorted alphabetically in the CSV file, is that intended behaviour? thanks again
Thanks. Here's the provisioning bash I'm using to implement the fix described in this thread. I happen to be using ES 2.3 in my environment, as reflected below. I'm going to close this issue, as I assume (improved) compatibility with Python ES 5.0 is broader in scope.
apt-get install -y -python-pip git
pip install git+https://github.com/taraslayshchuk/es2csv.git
pip uninstall -y elasticsearch
pip install elasticsearch==2.3
@rdica, Yes, it is sorted. @bartclarkson, not sure about a migration process to ES 5.0 at the moment, I am planning to hardcore dependency elasticsearch-2.*.
Hello-
I can run this command without the fields option successfully. Inclusion of the -f options fails with the following response. Example of command follows that.
Thank you for this tool. It seems like one of the more popular ES GUI tools should integrate with it.
Trackback error:
Example of command:
es2csv -i se-account-base -q "(country:usa AND account_type:regular AND date_inception:{2012-01-01 TO 2017-01-01}) NOT (restriction_type_2:deceased)" -f account_number title first_name middle_name last_name -o /usr/share/csv/account_base_3rd_party.csv