waseigo
AEAsh Elixir
•Created by Alan Heywood on 2/14/2023 in #support
Alternative approach for aggregate of aggregate with group by
+1 I'm also interested in learning how to do this
4 replies
AEAsh Elixir
•Created by waseigo on 2/12/2023 in #support
How to Ash-idiomatically get all unique values of an attribute across all records?
Apologies for the confusion and thank you for taking the time! I will split the issues, as it's not anymore about
P.list()
.119 replies
AEAsh Elixir
•Created by waseigo on 2/12/2023 in #support
How to Ash-idiomatically get all unique values of an attribute across all records?
code
is an attribute of P.Variant
, accessible within P.Item
as aggregate variant_code
.
code
is an attribute of P.Category
, accessible within P.Item
as aggregate category_code
.
P_item
contains a calculation named code
that concatenates aggregates variant_code
and category_code
.119 replies
AEAsh Elixir
•Created by waseigo on 2/12/2023 in #support
How to Ash-idiomatically get all unique values of an attribute across all records?
@Zach Daniel verified.
I remove
:code
from the preparations:
P.Item |> P.read!() |> P.load!(:variant)
-> works.
P.Item |> P.read!() |> P.load!(:code)
-> unknown error.
The other calculation, calculate :tagline, :string, expr(variant_name)
, works with P.Item |> P.read!() |> P.load!(:tagline)
.119 replies
AEAsh Elixir
•Created by waseigo on 2/12/2023 in #support
How to Ash-idiomatically get all unique values of an attribute across all records?
Weird, because the
:code
preparation works as intended, and P.Item |> P.read!()
delivers records with code: "9381310"
etc., as intended.119 replies
AEAsh Elixir
•Created by waseigo on 2/12/2023 in #support
How to Ash-idiomatically get all unique values of an attribute across all records?
119 replies
AEAsh Elixir
•Created by waseigo on 2/12/2023 in #support
How to Ash-idiomatically get all unique values of an attribute across all records?
All fail with:
119 replies
AEAsh Elixir
•Created by waseigo on 2/12/2023 in #support
How to Ash-idiomatically get all unique values of an attribute across all records?
I'll check all the dependent values of this
119 replies
AEAsh Elixir
•Created by waseigo on 2/12/2023 in #support
How to Ash-idiomatically get all unique values of an attribute across all records?
So, the
:code
calculation fails119 replies
AEAsh Elixir
•Created by waseigo on 2/12/2023 in #support
How to Ash-idiomatically get all unique values of an attribute across all records?
119 replies
AEAsh Elixir
•Created by waseigo on 2/12/2023 in #support
How to Ash-idiomatically get all unique values of an attribute across all records?
Interestingly,
P.Item
has an aggregate first :variant_code, :variant, :code
, and
So, :variant_code
based on the related :variant
is successfully prepared.119 replies
AEAsh Elixir
•Created by waseigo on 2/12/2023 in #support
How to Ash-idiomatically get all unique values of an attribute across all records?
This is super weird.
This works:
This also works:
This fails with unknown error:
119 replies
AEAsh Elixir
•Created by waseigo on 2/12/2023 in #support
How to Ash-idiomatically get all unique values of an attribute across all records?
119 replies
AEAsh Elixir
•Created by waseigo on 2/12/2023 in #support
How to Ash-idiomatically get all unique values of an attribute across all records?
Actually it chokes at the very first record.
119 replies
AEAsh Elixir
•Created by waseigo on 2/12/2023 in #support
How to Ash-idiomatically get all unique values of an attribute across all records?
The offending record can be read, but loading
:variant
leads to the unknown error. I'll check my data.119 replies
AEAsh Elixir
•Created by waseigo on 2/12/2023 in #support
How to Ash-idiomatically get all unique values of an attribute across all records?
Indeed, it choked after a few records. Let me check.
119 replies
AEAsh Elixir
•Created by waseigo on 2/12/2023 in #support
How to Ash-idiomatically get all unique values of an attribute across all records?
oh man, thank you so much for that
Ash.Api.list()
!119 replies
AEAsh Elixir
•Created by waseigo on 2/12/2023 in #support
How to Ash-idiomatically get all unique values of an attribute across all records?
yep, just checked, this one is still broken
119 replies
AEAsh Elixir
•Created by waseigo on 2/12/2023 in #support
How to Ash-idiomatically get all unique values of an attribute across all records?
this works
119 replies
AEAsh Elixir
•Created by waseigo on 2/12/2023 in #support
How to Ash-idiomatically get all unique values of an attribute across all records?
wut 🥴
119 replies