Skip to content

SQL: How to filter using edge properties? #959

Description

@darpan-vyas

ArcadeDB Version: ArcadeDB Server v23.3.1-SNAPSHOT (build 143b1a6/1677646375828/main)

JDK Version: JMX Metrics

OS: MacOS Ventura 13.2.1

Expected behavior

Filter all nodes where the connected edge property satisfies mentioned condition

Actual behavior

Nothing is returned.

My intent was to filter all dataset-type nodes that were accessed by users of the 'accounts' team recently. The recent condition is specified using an edge property 'timestamp' defined under edge-type 'access'. The said edge connected users with datasets.

Example:
(u109)-[:access {timestamp: 1679286814}]->(d9)
The above statement indicates that user 'u109' accessed dataset 'd14' at timestamp '1679250814'

image

PS: I used Cypher to create the DB and SQL to query it

In other words, the idea was to answer below question:

'Which data assets are most frequently accessed by downstream data consumers of the accounts team?'

Query:
match{type:team, as:a, where: (name='accounts')}. in('in_team'){type:user, as:b}. out('access'){type:dataset, as:c, where: (access.timestamp>1679261614)} return a,b,c

image

Steps to reproduce

  • The database contains multiple types of nodes (dataset, job, user, tag, team, stack, datasource, etc). These nodes are connected by various edges with each other (in_use, has_created, in_team, access, etc).
  • I connected the database in the console and queried it to answer the above-mentioned question.

Metadata

Metadata

Assignees

Labels

questionFurther information is requested

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions