Use these queries to start using the Data Graph service.
Note: In
any query, replace
APP-NAME with your actual application
name.getByAddress
This query requires address as input parameters to derive Data Graph based on the
defined data type and required attributes. The query can only be used by the users
who know about the address while executing. Address and country are needed to be
passed as variables in the query along with all the required attributes that are
required in response.
- address: Specific address for which we want the entities (mandatory field)
- country: Specific country if we need results of specific country (optional field)
Query Syntax
getByAddress(
address: String!
country: String
): RelationEntityAddress queries with json results for addresses
Query for buildings by address from addresses with json result:
SELECT ADDRESS, COUNTRY, <APP-NAME>.v1.execute_data_graph_query(CONCAT('query buildingsByAddress {
getByAddress(address: "',ADDRESS,'") {
buildings {
data {
buildingID
buildingType {
value
description
}
geometry
}
}
}
} '), '<API_KEY>', '<API_SECRET>') as buildings_By_Address
FROM <YOUR-ADDRESS-TABLE>;
Output from above query:
| Address | Country | BUILDINGSBYADDRESS |
|---|---|---|
| 3017 ACTION RV MOODY AB | USA |
|
| 7503 E 20TH AVC Degver CV | USA |
|
Query for property attributes by address from addresses with json result:
SELECT ADDRESS, COUNTRY, <APP-NAME>.v1.execute_data_graph_query(CONCAT('query propertyAttributesByAddress {
getByAddress(address: "',ADDRESS,'") {
propertyAttributes {
data {
livingSquareFootage
bedroomCount
bathroomCount {
value
}
saleAmount
}
}
}
} '), '<API_KEY>', '<API_SECRET>') as Property_Attributes_By_Address
FROM <YOUR-ADDRESS-TABLE>; Output from above query:
| Address | Country | Buildings by Address |
|---|---|---|
| 3017 ACTION RV MOODY AB | USA |
|
| 7503 E 20TH AVC Degver CV | USA |
|
To explore more about Data Graph Queries refer to Data Graph Play Ground