On Friday, September 11, 2015 at 5:01:52 PM UTC-7, Jeff wrote:
>
> Hi,
>
> I want to use Sequel to export a query's results as a CSV to S3. It looks 
> like there's a CsvSerializer plugin for Sequel.  (
> http://sequel.jeremyevans.net/rdoc-plugins/classes/Sequel/Plugins/CsvSerializer.html
> )
>
> Question is, how do I use this with a Sequel::Postgres::Dataset?
>
> I have something like:
>
>
>   results = db_connection.fetch(q) # returns a Sequel::Postgres::Dataset
>
>
> I want to do something like:
>
>
>   results.to_csv
>
>
> which looks like it returns a csv object. I'll finally upload it to S3 
> with csv.to_s and the aws-sdk gem
>
>
> Can someone help me understand how to implement the CsvSerializer plugin 
> on a Dataset object?
>

CsvSerializer is a model plugin, not a dataset extension, so you can only 
use it with model datasets, not plain datasets.

Thanks,
Jeremy 

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to