Comments (3)
@cgivre I noticed that the "metadata"
field (and "columns
") in the raw JSON out put seems to be on a single line. I'm sure I could answer this q via poking at some Drill Java code but was wondering if you know that said line will always be "a line" (i.e. never wrap). I'm asking b/c I have to do some serious gyrations to support 64-bit integers & would "metadata"
& "columns"
fields, extract it and build the necessary JSON Schema for RapidJSON from said metadata and column names without having to parse the full result set (since it'd mean parsing it twice O_o). The bigrquery
package is able to do this as BigQuery's REST API separates query result schema return from query results return and I'm trying to riff as much as possible off of that package.
If not, I may just remove the rapidjsonr
compiled bits and try to hack 64-bit integers from conforming mal-parsed (by jsonlite
) doubles. i.e. write something like:
is_BIGINT <- function(col) {
is.numeric(col) &
v>-2^53 & v<2^53 &
(floor(col) == ceiling(col))
}
and run that on a mal-parsed double columns to validate that it can, in fact, be converted on the R-side w/o running into conversion issues.
(or I could just
from sergeant.
@hrbrmstr This is interesting. When I was testing this I used the Cocoa REST API tester and everything seemed to be on new lines (pretty printed).
If I'm understanding what you're trying to do, you'll need both the columns
and the metadata
arrays from the result. I'm wondering would this work for you?
Moving the metadata
to occur after the columns
, but before the rows
in the response and that way you could just read through it either line by line or via grep until you hit the end of the metadata section. I think this would be pretty easy to do in Drill and not really have any other unanticipated side-effects.
from sergeant.
that def cld work. it'd be super easy to target them, then.
from sergeant.
Related Issues (20)
- Implement write table methods HOT 1
- BREAKING STUFF: 0.7.0 re-introducts JDBC dependency HOT 4
- Problem with installing sergeant HOT 2
- drill_version(ds) failed HOT 6
- Provide an automated downloader and way to start drill-embedded? HOT 1
- REST API: Add support for new query metadata in 1.15.0 release
- Add example of accessing S3 files HOT 3
- Switch to rapidjsonr HOT 2
- better error messages on query failures HOT 2
- Column data types not being parsed under v0.8.0-dev HOT 8
- dplyr interface does not work outside of `cp` schema HOT 1
- Support dbQuoteIdentifier method for `src_drill` class HOT 2
- Should dplyr idioms work if `tbl()` source is a custom SQL statement? HOT 4
- Improve drill_up() interactive experience HOT 3
- drill_up fails (maybe due to Docker Toolkit?) HOT 2
- Out of memory Issue reading single column from parquet file
- "bad pad value" when trying to install from GitHub HOT 2
- Prepare for new streaming JSON
- table identifier escaping causing dplyr interface errors HOT 1
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 sergeant.