PedroR
PedroR
ATApache TinkerPop
Created by PedroR on 1/21/2023 in #questions
Grouping and projections help
And the result I'm getting is this:
[
{
"label": "Transaction",
"transactionHash": "0xd851a5f400b696b3b80f04e7f33f0d98268a1b5a69b5c1f0392c5512109c966c",
"value": 77225790000000000,
"dollarValue": 119.96660686595044,
"blockNumber": 16444832,
"from": "0x77696bb39917c91a0c3908d577d5e322095425ca",
"to": "0x54822fd21897b9264440cd1a8f91458971d59ce7",
"tokenAddress": ""
},
{
"label": "Transaction",
"transactionHash": "0x6e847bc5aed2c5943c819b5145862d4ee5dbdab31dd092dc841d8f0e64295be5",
"value": 1198834000000000,
"dollarValue": 1.8623318346828803,
"blockNumber": 16444827,
"from": "0x77696bb39917c91a0c3908d577d5e322095425ca",
"to": "0x3d36c138d0d527013798716a861513251b7bf1ac",
"tokenAddress": ""
},
{
"label": "Transaction",
"transactionHash": "0xfbf463432326fea8f13ae370a123cfd3eb47c3efab2cc68515c1261075deccee",
"value": 30439240000000000,
"dollarValue": 47.28591754617613,
"blockNumber": 16444822,
"from": "0x77696bb39917c91a0c3908d577d5e322095425ca",
"to": "0xa285d2d22245f1dd8cb9c530be5944b8720b38fd",
"tokenAddress": ""
}]
[
{
"label": "Transaction",
"transactionHash": "0xd851a5f400b696b3b80f04e7f33f0d98268a1b5a69b5c1f0392c5512109c966c",
"value": 77225790000000000,
"dollarValue": 119.96660686595044,
"blockNumber": 16444832,
"from": "0x77696bb39917c91a0c3908d577d5e322095425ca",
"to": "0x54822fd21897b9264440cd1a8f91458971d59ce7",
"tokenAddress": ""
},
{
"label": "Transaction",
"transactionHash": "0x6e847bc5aed2c5943c819b5145862d4ee5dbdab31dd092dc841d8f0e64295be5",
"value": 1198834000000000,
"dollarValue": 1.8623318346828803,
"blockNumber": 16444827,
"from": "0x77696bb39917c91a0c3908d577d5e322095425ca",
"to": "0x3d36c138d0d527013798716a861513251b7bf1ac",
"tokenAddress": ""
},
{
"label": "Transaction",
"transactionHash": "0xfbf463432326fea8f13ae370a123cfd3eb47c3efab2cc68515c1261075deccee",
"value": 30439240000000000,
"dollarValue": 47.28591754617613,
"blockNumber": 16444822,
"from": "0x77696bb39917c91a0c3908d577d5e322095425ca",
"to": "0xa285d2d22245f1dd8cb9c530be5944b8720b38fd",
"tokenAddress": ""
}]
But I'd also like to group these results by 'from'. How should I go about grouping these? Thanks!
5 replies
ATApache TinkerPop
Created by PedroR on 1/19/2023 in #questions
Weird Error using inE()
I solved it... Basically some of my nodes didn't have a 'from' edge and I just added a coalesce step
6 replies
ATApache TinkerPop
Created by PedroR on 1/19/2023 in #questions
Weird Error using inE()
And when I use
g.V()
.hasLabel("TokenTransfer")
.has("tokenAddress", "0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0")
.has("blockNumber", inside(0, 1000000000000))
.has("value", gt(500))
.project("from")
.by(inE('from').outV().values('id'))
g.V()
.hasLabel("TokenTransfer")
.has("tokenAddress", "0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0")
.has("blockNumber", inside(0, 1000000000000))
.has("value", gt(500))
.project("from")
.by(inE('from').outV().values('id'))
I get the same error as before!
6 replies
ATApache TinkerPop
Created by PedroR on 1/19/2023 in #questions
Weird Error using inE()
Also, using something like
g.V()
.hasLabel("TokenTransfer")
.has("tokenAddress", "0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0")
.has("blockNumber", inside(0, 1000000000000))
.has("value", gt(500))
.inE('from').outV().values('id')
g.V()
.hasLabel("TokenTransfer")
.has("tokenAddress", "0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0")
.has("blockNumber", inside(0, 1000000000000))
.has("value", gt(500))
.inE('from').outV().values('id')
Returns exactly what I'd expect it to. It's using it inside the projection that screws it up. Anyone think they can help? Thanks!
6 replies