-
Notifications
You must be signed in to change notification settings - Fork 140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add way to generate DataFrame from active_record with aggregated fields #523
Comments
@janmpeterka - Thanks for this feature request suggestion! 🎉 You'd have to contribute this to the daru-io repository for this. We currently have the implementation of ActiveRecord importer here, wherein we support just normal field names and not sql methods. You can probably add Would you like to contribute this feature, @janmpeterka? |
Thanks, I will look into it. Not sure if I will be able to write the implementation myself, quite new to Ruby :) |
Well, |
Recently I stumbled on problem with speed when using daru, and found that a way to speed things up was to do more work in database - namely group and aggregate in ActiveRecord/database instead of on dataframe.
Here is what I wanted to use:
However I found out that I cannot give field like
ANY_VALUE(district.id)
, because it gets converted to symbol infrom_activerecord
, and subsequentlypluck
tries to convert it totable
.column
.(At least thats how I understand it works).
So, we found out way to bypass this and I was thinking about adding this to
daru
, in something like this:Now I can create new DataFrame as
What do you think about that?
The text was updated successfully, but these errors were encountered: