Alternative method to query DAS

Answer to the question:

Is there any way to query DAS besides using MeTTa? Are there query methods or special query commands? I tried the bellow method, but I think its under construction.
```
das-cli query send \
–port-range 42500:2599 \
–query ‘LINK_TEMPLATE Expression 3 NODE Symbol Similarity NODE Symbol ““human”” VARIABLE S’

das-cli doesn’t support clients yet, but you can run queries using the Makefile in the DAS repository ( https://github.com/singnet/das ). Please run make build-all before executing the command.
Example:

make run-client OPTIONS="--service=query-engine --endpoint=localhost:1234 --bus-endpoint=localhost:31700 --ports-range=42500:42599 --query='LINK_TEMPLATE Expression 3 NODE Symbol Similarity NODE Symbol "\"human\"" VARIABLE S' --context=TEST --populate-metta-mapping"

Argument summary:
endpoint: Client endpoint.
bus-endpoint: Query engine endpoint.
context: Query context, more info about context ( https://github.com/singnet/das/blob/master/docs/conceptual_documentation.md )
populate-metta-mapping: Prints the response using MeTTa expressions.

Run `make run-client OPTIONS="--service=query-engine --help"` to list all available commands and arguments.

1 Like

Thanks for the explanation, Edgar. I followed the steps you outlined, but I’m still encountering the issue below. I’m wondering if I may have misconfigured something, do you have any idea what might be causing this?

Previously I’ve posted a related issue, the errors appear to be the same.

Hi Yohanes, did the fix (downgrading das-cli to version 1.0.0) in this thread https://hyperon.discourse.group/t/pattern-matching-query-fails-despite-containers-running-normally/25 , solve the problem?

Yes, it solved the issue. Everything is working as expected in version 1.0.0.

Hello Yohanes, sorry for the late reply on this thread.

Based on this discussion ( Pattern-Matching Query Fails Despite Containers Running Normally ), it appears that the query-agent is running on the default port (40002). If that is really the case, I believe the command used to run the client is using an incorrect parameter. The bus-endpoint should be set to localhost:40002, pointing to the correct port on the running query-agent node, rather than to port 31700 as mentioned in Edgar’s response.

The command listed above by Edgar was just an example, here is a ready to use command.

make run-client OPTIONS=“–service=query-engine --endpoint=localhost:1234 --bus-endpoint=localhost:40002 --ports-range=42500:42599 --query=‘LINK_TEMPLATE Expression 3 NODE Symbol Similarity NODE Symbol “"human"” VARIABLE S’ --context=TEST --populate-metta-mapping”