create account

RE: Introducing SteemData - A Database Layer for STEEM by andu

View this thread on: hive.blogpeakd.comecency.com

Viewing a response to: @furion/introducing-steemdata-a-database-layer-for-steem

· @andu ·
@furion: what type is the amount field in the Operations / VirtualOperations table?
How would one search for transactions above a certain amount or transactions that were in SBD etc. Tried with NumberDecimal/Float and currency: "STEEM" but to no avail..
properties (22)
authorandu
permlinkre-furion-introducing-steemdata-a-database-layer-for-steem-20170113t075146776z
categorysteemdata
json_metadata{"tags":["steemdata"],"users":["furion"],"app":"steemit/0.1"}
created2017-01-13 07:52:00
last_update2017-01-13 07:52:00
depth1
children2
last_payout2017-02-10 21:47:12
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length253
author_reputation5,355,583,123,081
root_title"Introducing SteemData - A Database Layer for STEEM"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id2,234,868
net_rshares0
@furion · (edited)
The amount fields in Operations/VirtualOperations are still strings unfortunately (todo: have native types everywhere for v2).

So what you have to do is query all transactions for a time period, and then filter out the ones you need in your code.

Python Example:
```
from steem.amount import Amount

filter(Amount(x['amount']).currency == 'STEEM', lambda x: Amount(x['amount']).amount > 100, db_results)
```
👍  ,
properties (23)
authorfurion
permlinkre-andu-re-furion-introducing-steemdata-a-database-layer-for-steem-20170113t091820403z
categorysteemdata
json_metadata{"tags":["steemdata"],"app":"steemit/0.1"}
created2017-01-13 09:18:21
last_update2017-01-13 09:27:30
depth2
children1
last_payout2017-02-10 21:47:12
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length409
author_reputation116,503,940,714,958
root_title"Introducing SteemData - A Database Layer for STEEM"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id2,235,201
net_rshares74,433,027,757
author_curate_reward""
vote details (2)
@andu ·
I see, ok, Thanks man!
properties (22)
authorandu
permlinkre-furion-re-andu-re-furion-introducing-steemdata-a-database-layer-for-steem-20170113t091910016z
categorysteemdata
json_metadata{"tags":["steemdata"],"app":"steemit/0.1"}
created2017-01-13 09:19:24
last_update2017-01-13 09:19:24
depth3
children0
last_payout2017-02-10 21:47:12
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length22
author_reputation5,355,583,123,081
root_title"Introducing SteemData - A Database Layer for STEEM"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id2,235,209
net_rshares0