You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "collimarco (via GitHub)" <gi...@apache.org> on 2023/06/28 10:02:27 UTC

[GitHub] [arrow] collimarco opened a new issue, #36348: [Ruby] Connecting to Arrow Ballista using Flight SQL from Ruby program (implement Red Arrow Flight SQL)

collimarco opened a new issue, #36348:
URL: https://github.com/apache/arrow/issues/36348

   ### Describe the enhancement requested
   
   The Apache Arrow Ballista project (https://github.com/apache/arrow-ballista) requires the Flight SQL protocol for communications. 
   
   Basically you need the Flight SQL protocol if you want to send a SQL query from a Ruby program to an instance of Arrow Ballista (e.g. running in Docker or Kubernetes).
   
   I see that you already started this project for Ruby:
   https://github.com/apache/arrow/tree/main/ruby/red-arrow-flight-sql
   
   However there isn't any example of usage and the project seems empty / incomplete.
   
   How can you interact with Arrow Ballista from Ruby? 
   Are there any plans to complete the `red-arrow-flight-sql` gem?
   
   ### Component(s)
   
   Ruby


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Ruby] Connecting to Arrow Ballista using Flight SQL from Ruby program (implement Red Arrow Flight SQL) [arrow]

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on issue #36348:
URL: https://github.com/apache/arrow/issues/36348#issuecomment-1857322956

   This should work now.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Ruby] Connecting to Arrow Ballista using Flight SQL from Ruby program (implement Red Arrow Flight SQL) [arrow]

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou closed issue #36348: [Ruby] Connecting to Arrow Ballista using Flight SQL from Ruby program (implement Red Arrow Flight SQL)
URL: https://github.com/apache/arrow/issues/36348


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] kou commented on issue #36348: [Ruby] Connecting to Arrow Ballista using Flight SQL from Ruby program (implement Red Arrow Flight SQL)

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on issue #36348:
URL: https://github.com/apache/arrow/issues/36348#issuecomment-1612290815

   The following code should work but there is a problem (#36369) for now:
   
   ```ruby
   require "arrow-flight-sql"
   
   call_options = ArrowFlight::CallOptions.new
   client = ArrowFlight::Client.new("grpc://127.0.0.1:50050")
   client.authenticate_basic("admin", "password", call_options)
   sql_client = ArrowFlightSQL::Client.new(client)
   
   info = sql_client.execute("SELECT 'hello'", call_options)
   endpoint = info.endpoints.first
   reader = sql_client.do_get(endpoint.ticket, call_options)
   table = reader.read_all
   p table
   ```
   
   We should be able to use ADBC too:
   
   ```ruby
   require "adbc"
   
   options = {
     "driver" => "adbc_driver_flightsql",
     "uri" => "grpc://127.0.0.1:50050",
     "username" => "admin",
     "password" => "password",
   }
   ADBC::Database.open(**options) do |database|
     database.connect do |connection|
       connection.open_statement do |statement|
         table, _n_rows_affected = statement.query("SELECT 'hello'")
         p table
       end
     end
   end
   ```
   
   But it also doesn't work for now...


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org