ElasticSearch-SQL | 该项目主要是为了熟悉sql的人员能够很方便的进行elasticsearch数据的查询,降低学习成本。

 by   wykingfly Java Updated: 2 years ago - Current License: No License

Download this library from

Build Applications

kandi X-RAY | ElasticSearch-SQL REVIEW AND RATINGS

##ElasticSearch - JAVA API 测试用例.

kandi-support
Support

  • ElasticSearch-SQL has a low active ecosystem.
  • It has 45 star(s) with 31 fork(s).
  • It had no major release in the last 12 months.
  • On average issues are closed in 993 days.
  • It has a neutral sentiment in the developer community.

quality kandi
Quality

  • ElasticSearch-SQL has 0 bugs and 0 code smells.

security
Security

  • ElasticSearch-SQL has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
  • ElasticSearch-SQL code analysis shows 0 unresolved vulnerabilities.
  • There are 0 security hotspots that need review.

license
License

  • ElasticSearch-SQL does not have a standard license declared.
  • Check the repository for any license declaration and review the terms closely.
  • Without a license, all rights are reserved, and you cannot use the library in your applications.

build
Reuse

  • ElasticSearch-SQL releases are not available. You will need to build from source code and install.
  • ElasticSearch-SQL has no build file. You will be need to create the build yourself to build the component from source.
  • ElasticSearch-SQL saves you 2176 person hours of effort in developing the same functionality from scratch.
  • It has 4765 lines of code, 200 functions and 34 files with 0 % test coverage
  • It has high code complexity. Code complexity directly impacts maintainability of the code.
Top functions reviewed by kandi - BETA

Coming Soon for all Libraries!

Currently covering the most popular Java, JavaScript and Python libraries. See a SAMPLE HERE.
kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.

ElasticSearch-SQL Key Features

/com/es/api/test/BankMapping.java 创建index ,根据需求修改index和type

/com/es/api/test/BankContentIndex.java 根据需求修改index和type,已经accounts.json路径

其他测试类可自行修改之后测试

ElasticSearch-SQL examples and code snippets

  • default
  • Alternative to BigQuery for medium-sized data

default

		//String sql = "filter:select state,city,count(distinct account_number) as count from bank where gender='M' and age>10 group by state,city";

		//String sql = "filter:select state,city,sum(balance) as total from bank where gender='M' and age>10 group by state,city";

		//String sql = "filter:select state,avg(balance) as total from bank where gender='M' and age>20 group by state";

		//String sql = "filter:select state,max(balance) as total from bank where gender='M' group by state";

		//String sql = "query:select * from bank where gender='M' and age>30";

		//String sql = "query:select * from bank where gender='M' and age in(30,31,32)";

		//String sql = "query:select * from bank where gender='M'";

		//String sql = "query:select * from bank where id=9BnH0MToTvWMHwikTb-uhA";

		//String sql = "query:select * from bank where (gender='M' and age>=40) or (balance>40000)";

		//String sql = "query:select * from bank where (gender='M' and age>=40) or (balance between 40000 and 44000)";

		//String sql = "query:select * from bank where (gender='M' and age>=40) or (balance>40000) limit 10";

		//String sql = "query:select * from bank where gender='M' and age>=30 and (balance between 40000 and 44000)";

		//String sql = "query:select * from bank where gender='M' and age>=30 and (balance between 40000 and 44000) and state in('id','wy')";

		//String sql = "query:select state,max(balance) from bank where gender='M' and age>=30 and state in('id','wy') group by state";

		//String sql = "query:select * from bank where firstname like '%beck%'";

		//String sql = "query:select * from bank where gender='M' and (age>=30 and age<35)";

		//String sql = "select sum(who.s) from events where context.channlid.s in(1,2,3,4) and context.serverid.s in('s1','s2') and what.s='item' group by context.serverid.s";

		//String sql = "select * from bank.account order by age desc,account_number asc";

		//------------------------------------------------------------------------------
		//String sql = "select stats(balance) from bank.account group by age";

		//String sql = "select stats(balance) from bank.account group by state,age[*-20|20-25|25-30|30-35|35-40|40-*]";

		//String sql = "select stats(balance) from bank.account group by (age[*-20|20-25|25-30|30-35|35-40|40-*]),(state)";

		//String sql = "select stats(balance) from bank.account group by (state,age[*-20|20-25|25-30|30-35|35-40|40-*]),(city)";

		//String sql = "select account_number,age,balance from bank where age>25";

		//String sql = "select account_number,age,balance from bank where age>25 order by balance desc";

		//----------------------------------------------------------------------------------------

		//String sql = "select stats(balance) from bank2.account2 group by age[histogram-5]";

		//String sql = "select stats(balance) from bank2.account2 group by state,age[histogram-5]";

		//String sql = "select stats(balance) from bank2.account2 group by createtime[datehistogram-2day]";

		//String sql = "select stats(balance) from bank2.account2 group by state,createtime[datehistogram-2day]";

Alternative to BigQuery for medium-sized data

INDEX(studio, territory)  -- in either order.
-----------------------
import pandas as pd
import pyodbc

conn = pyodbc.connect(...) # You'll need to figure out the settings for your DB here
# this slow but only needs to be done once:
data = pd.read_sql_query('select * from mytable') # Load everything into memory 

# Now do the query:
data.groupby(['studio', 'territory']).count().sort_values(ascending=False)

COMMUNITY DISCUSSIONS

Top Trending Discussions on ElasticSearch-SQL
  • Alternative to BigQuery for medium-sized data
Top Trending Discussions on ElasticSearch-SQL

QUESTION

Alternative to BigQuery for medium-sized data

Asked 2020-Mar-28 at 20:13

This is a follow-up to the question Why doesn't BigQuery perform as well on small data sets.

Let's suppose I have a data-set that is ~1M rows. In the current database that we're using (mysql) aggregation queries would run quite slow, perhaps taking ~10s or so on complex aggregations. On BigQuery, the initialization time required might make this query take ~3 seconds, better than in mysql, but the wrong tool for the job, if we need to return queries in 1s or under.

My question then is, what would be a good alternative to using BigQuery on doing aggregated queries on moderate-sized data-sets, such as 1-10M rows? An example query might be:

SELECT studio, territory, count(*)
FROM mytable
GROUP BY studio, territory
ORDER BY count(*) DESC

Possible solutions I've thought of are ElasticSearch (https://github.com/NLPchina/elasticsearch-sql) and Redshift (postgres is too slow). What would be a good option here that can be queried via SQL?

Note: I'm not looking for why or how BQ should be used, I'm looking for an alternative for data sets under 10M rows where the query can be returned in under ~1s.

ANSWER

Answered 2017-Mar-11 at 00:19

If you don't need concurrency, multiple users connecting simultaneously, and your data can fit in a single disk file, then SQLite might be appropriate.

As they say, SQLite does not compete with client/server databases. SQLite competes with fopen().

http://www.sqlite.org/whentouse.html

Source https://stackoverflow.com/questions/42729526

Community Discussions, Code Snippets contain sources that include Stack Exchange Network

VULNERABILITIES

No vulnerabilities reported

INSTALL ElasticSearch-SQL

You can use ElasticSearch-SQL like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the ElasticSearch-SQL component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .

SUPPORT

For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .