Giter Club home page Giter Club logo

Comments (1)

hrbrmstr avatar hrbrmstr commented on June 3, 2024

Agreed, but even the ODBC interface has issues with this. i.e. just try doing:

library(DBI)
library(odbc)
library(tidyverse)

DBI::dbConnect(
  odbc::odbc(), 
  driver = "/Library/mapr/drill/lib/libdrillodbc_sbu.dylib",
  ConnectionType = "Zookeeper",
  AuthenticationType = "No Authentication",
  ZKCLusterID = "drillbits1",
  ZkQuorum = "localhost:2181",
  AdvancedProperties = "CastAnyToVarchar=true;HandshakeTimeout=30;QueryTimeout=180;TimestampTZDisplayTimezone=utc;
  ExcludedSchemas=sys,INFORMATION_SCHEMA;NumberOfPrefetchBuffers=5;"
) -> drill_con

dbCreateTable(drill_con, "dfs.tmp.mtcars", mtcars)

One reason for the ODBC interface error is the syntax Drill needs.

One of the only ways I initially went down a path on was to save off a data frame as JSON then use CREATE TABLE x AS SELECT cols FROM thejsonfile but that wld assume Drill is running on the local host. Trying to generalize that (e.g. having an option to automatically scp the JSON to a remote Drill server, having an option to point the CTAS call to a specific path assuming it was, say an NFS share, etc) would require doing quite a bit of condition handling and hasn't made it back to the priority list.

I also went down a path of using CTAS and then adding VALUES() but the REST interface rly does not like it when you do that with a ton of columns and values.

I'll keep the issue open tho in the event I get some time or others find it and have other ideas on how to make it work.

from sergeant.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.