The shortcut:
"/music/artist/active_start": [{}]
The explanation:
There's a bit of a trick to this. MQL divides the world into "values"
and "objects". If you look at the expected_type of a property (try the query
{ "query0":
{ "query":
{ "id": "",
"type": "/type/property",
"expected_type": null
}
}
} You will find out if a property expects a value (one of /type/id, /type/key, /type/text, /type/rawstring, /type/int, /type/float, /type/boolean and /type/uri) or an object (anything else)
Then you can ask
[{ "name": null, "id": null, "type": [], "optional": true }] for the objects and
[{ "value": null, "type": null, "optional": true }] for the values. (the optional: true ensures the query doesn't fail if the property is missing)
[{}] asks MQL to automatically inspect the expected_type for you and insert one or other of the clauses you see above, depending on which is appropriate. It's what we use internally 90% of the time.
More information on how to query schema objects, their properties, user interaction with those objects, and the links between them can be found in the Schema Introspection Cookbook.
Search Help Center
Discussions
There are no conversations on this topic. Would you like to start one?
Start the Discussion »- Building Bases
- Creating Schemas
-
Developing Applications
- An Introduction to Freebase Application Development
- Playing in the Sandbox
- Freebase Programming Libraries and Tools
- Data Dump FAQ
- Using the Query Editor
- The Complete Metaweb Query Language (MQL) Reference Guide
- MQL Cheatsheet
-
The MQL Cookbook
- Get data as of a specific time
- Read properties of a type
- values vs name/id
- Incoming links
- Any topics with a specific date
- Wikipedia article text
- Retrieve the Wikipedia URL for an object with a GUID
- Find distinct co-types
- Creating relationships with the connect directive
- Mark for deletion
- Sort by index and timestamp
- Traversing Through Non-Reversed Properties
- Combine queries
- Perform transitive queries
- Freebase API Reference
- Application Developer Tips
- The Acre Hosted Development Environment
- Introduction to the Metaweb Javascript Template Language (MJT)
- Freebase Community