I'm trying to count the instances in the base with the python API:
q = '''match
$x isa processo;
get $x; count;'''
with TypeDB.core_client("localhost:1729") as client:
with client.session(keyspace, SessionType.DATA) as session:
with session.transaction(TransactionType.READ) as read_transaction:
result = read_transaction.query().match_aggregate(q)
print(result.get())
This prints:
<typedb.concept.answer.numeric._Numeric object at 0x00000256FCB8AA00>
How can I get the resulting number?
I got the right result using:
print(result.get().as_int())