Comments (14)
@rodionos
Please, try the following query:
SELECT tags.symbol, tags.class_code, CAST(tags.lot AS integer) FROM atsd_entity WHERE tags.symbol = 'LKOH' limit 1
Without CAST
, AS
assigns a column alias
from atsd-jdbc.
Indeed, my mistake. Related issue, with getString returning the value with fractions:
CAST(tags.lot AS INTEGER) AS lot
rs.getString(3) - returns 1.0
from atsd-jdbc.
SELECT datetime, trade_num, price, quantity, side FROM atsd_trade
getString(1) returns truncated time
2021-04-08 07:00:03
from atsd-jdbc.
Is there a way to get precise trade datetime, including microseconds?
from atsd-jdbc.
Indeed, my mistake. Related issue, with getString returning the value with fractions:
CAST(tags.lot AS INTEGER) AS lot rs.getString(3) - returns 1.0
I will fix it in ATSD by returning correct datatype in metadata. Now double
is returned in any case.
BTW, shouldn't we support all known numeric datatypes in CAST expression? Currently only number
, integer
, float
are supported.
from atsd-jdbc.
Is there a way to get precise trade datetime, including microseconds?
Could you try with latest version 1.4.9, please? It should be available in Maven
from atsd-jdbc.
Only 1.4.8 is available on mavencentral:
<dependency>
<groupId>com.axibase</groupId>
<artifactId>atsd-jdbc</artifactId>
<version>1.4.8</version>
</dependency>
from atsd-jdbc.
https://mvnrepository.com/artifact/com.axibase/atsd-jdbc - here only 1.4.8 is listed
from atsd-jdbc.
https://mvnrepository.com/artifact/com.axibase/atsd-jdbc - here only 1.4.8 is listed
Index is not updated yet, but the jar should be available
https://search.maven.org/artifact/com.axibase/atsd-jdbc/1.4.9/jar
from atsd-jdbc.
datetime
works ok with the 1.4.9 downloaded from Releases, although I would return time
column with fractions as well.
from atsd-jdbc.
datetime
works ok with the 1.4.9 downloaded from Releases, although I would returntime
column with fractions as well.
Same, should be working without driver upgrade when correct metadata is returned
from atsd-jdbc.
@rodionos Could you try with latest snapshot on latest ATSD, please?
from atsd-jdbc.
Version number increase required because ATSD may send general number
type as metadata. JDBC driver didn't recognized it and used varchar fallback. Since 1.4.10, number is alias for decimal in JDBC driver
from atsd-jdbc.
I don't see this error on the 1.4.9 version, closing.
from atsd-jdbc.
Related Issues (16)
- Add `atsd_series` columns to the result of DatabaseMetadata#getColumns()
- Replace single quotes to double quotes for table names in table remarks
- Comments in the beginning are not supported
- Add a possibility to submit custom network commands to ATSD
- Statement - ResultSet coupling HOT 2
- ATSD supports default SQL wildcards now HOT 6
- Building driver from source HOT 1
- Allow to run tests in IDE one by one without specifying VM properties HOT 1
- Drop Java 7 support
- Testing pipeline is broken
- Cannot install driver in latest DbVis
- Retrieving statement metadata for parameterized queries HOT 2
- Specify connection timeout
- Fix connection input stream processing HOT 1
- Support logging without slf4j
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 atsd-jdbc.