Rebecca,

You could make the Ruby api itself asynchronous using something like Rabbit
MQ or Sidekiq.  That's what I do to process web requests async and return
documents later.

https://www.rabbitmq.com/tutorials/tutorial-one-ruby.html
https://github.com/mperham/sidekiq/wiki/Getting-Started

Mason

On Tue, Jan 14, 2020 at 11:21 AM Rebecca Paz <r...@everquote.com> wrote:

> Hello,
>
> We are interested in using Sequel to interface with Snowflake
> <https://www.snowflake.com/>, which is ODBC-compliant and can be
> connected to as such:
>
> require 'odbc'
> require 'sequel'
> db = Sequel.odbc('SnowflakeDsnGoesHere')
>
> db.run('select 1;')
>
> db.disconnect
>
>
> We have a need to issue queries to Snowflake without waiting for the query
> to complete, and therefore we have no need of the immediate results. This
> is because we're depending on some Snowflake commands that allow us to
> store the results of a query as a CSV in an S3 bucket, which run the query
> asynchronously of the caller/requester. For this purpose, Snowflake's
> SnowSQL <https://docs.snowflake.net/manuals/user-guide/snowsql.html>
> client provides a `results=False` option when issuing a query, allowing the
> system call to immediately return once the query has been submitted to the
> database. I'm hoping to find a similar option as we try using Sequel for
> our purposes.
>
> I took a look through the Sequel documentation and I don't believe I see
> any options to make queries submitted to an ODBC database asynchronous, or
> at least not try to wait for the query to complete before returning. Is
> this something Sequel can do, via ODBC or otherwise? I can provide more
> information if necessary.
>
> Thank you for your time!
>
> Rebecca Paz
>
> --
> You received this message because you are subscribed to the Google Groups
> "sequel-talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sequel-talk+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sequel-talk/290423de-37bb-4848-94c7-d02a275c0200%40googlegroups.com
> <https://groups.google.com/d/msgid/sequel-talk/290423de-37bb-4848-94c7-d02a275c0200%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sequel-talk+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sequel-talk/CAEWSjwJ4qKO4Nmf%2BDcyhVeiVGHukMd5x73y7UWT_d95DJ5UfSA%40mail.gmail.com.

Reply via email to