Comments (3)
find a way ,
can change SQL to below when use elasticsearch-jdbc tool index data to elasticsearch from mysql , don't change mysql table structure !
elasticsearch-jdbc-2.3.3.1/bin/mysql-xxx.sh:
"statement": "select convert(bignum
,CHAR) as bignum
from xxx where xxxxx";
change to string type index to es
from elasticsearch-jdbc.
The fact is that database and JDBC know about big integer, Java knows big integer, but ES does not (and Javascript/JSON is silent about this).
JDBC importer tries to convert to JSON numbers by using Java, and ES tries again to index a numeric value from the JSON number.
JDBC importer tries by default to downgrade to numeric values to retain numbers. JDBC importer uses scale and precision defaults, they can be changed, but result must fit into Java double.
If you index strings, all numeric properties are lost.
from elasticsearch-jdbc.
@jprante thx, if i index long type, -8629845578222121431 will change to -8629845578222121000 , but correct data is -8629845578222121431,the -8629845578222121000 is an error data. so too long type number can only change index Strings.
you have good idea ?
from elasticsearch-jdbc.
Related Issues (20)
- use HTTP
- JDBC Driver in Pentaho Data Integration
- after fetch: no such index HOT 1
- org.elasticsearch.client.transport.NoNodeAvailableException: no cluster nodes available HOT 1
- Error: Could not find or load main class
- elasticsearch-2.3.2 and jdk is 1.7 ,whick elasticsearch-jdbc version i can use? HOT 1
- Problems Report When [] and [] Are Pure Numbers in Indexed Columns
- Information/Help : JDBC importer parameters
- Elastic Search - Error while processing request: no cluster nodes available, check settings HOT 1
- when to support elasticsearch-2.3.5+
- ES 2.3.1 Import Error
- problem with jdbc run HOT 1
- com.microsoft.sqlserver.jdbc.SQLServerException: 'lead' is not a recognized built-in function name.
- PostgreSQL 10 and elasticsearch 6.7
- support Elasticsearch 6 and ElasticSearch 7?
- "type_mapping" format date time doesn't work???
- configure "schedule", unable to enter the account password page of linux
- [Question] Use custom row processor/transformer and feed the output to elasticsearch
- support PostgreSQL database? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from elasticsearch-jdbc.