Code Monkey home page Code Monkey logo

Comments (6)

hrbrmstr avatar hrbrmstr commented on August 15, 2024

Thx for using the pkg and filing an issue!

Ah, I was anticipating this day. I knew it would come eventually.

I'll setup a Docker image and start work in this pronto. I totally understand the need for this in a real production environment and it shouldn't be too difficult.

from sergeant.

hrbrmstr avatar hrbrmstr commented on August 15, 2024

Just pushed up a commit that seems to work, but I also failed to ask the context for auth.

The commit enables auth on the REST API and is currently aligned with the DBI interface (which means it also works with the dplyr/dbplyr interface).

Pls give it a go when you have time.

from sergeant.

Ahine avatar Ahine commented on August 15, 2024

Hi,

Just gave it a go in our environment. Ran into an error where the POST response isn't JSON, but rather an html document. Seems like the drill_query returned the html page for 'Invalid username or password' rather than an expected JSON object. This is strange to me because our 'authentication' is pretty loose, and currently we only receive the 'invalid username/password' response on our drill web console when the fields are empty.

This is what the code I'm attempting to run looks like

`fetch_with_drill <- function(query) {
dc <- drill_connection(host = Sys.getenv("DRILL_HOST", "(our drill client)"),
port = Sys.getenv("DRILL_PORT", 8047),
user = Sys.getenv("DRILL_USER", "username"),
pass = Sys.getenv("DRILL_PASSWORD", "password"),
ssl = TRUE)

result <- drill_query(dc, query)

return(result)
}`

When I debug it appears that the username and password fields are making it to the drill connection object just fine, but are getting lost somewhere in authentication. I can't tell where, though.

from sergeant.

hrbrmstr avatar hrbrmstr commented on August 15, 2024

OH. My apologies. I don't think I covered this bit, just the DBI/dplyr.

Posting a fix in like 30m.

Many, many thanks for the bug report.

from sergeant.

hrbrmstr avatar hrbrmstr commented on August 15, 2024

I slipstreamed it in but won't have a chance to test until later. I figured it was better to get it up for you to potentially work with today than waiting.

from sergeant.

Ahine avatar Ahine commented on August 15, 2024

I toyed with it and after fixing a small variable naming error (passing username into auth_drill when user was the correct variable name) it worked! I created a pull request for the small correction. Thank you for being so responsive and working on this package!

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.