MashZone NextGen 10.2 | Appendix | Legacy Presto components | MashZone NextGen Analytics | RAQL Queries | Dataset Paths, Locators, Names, and Datatypes
 
Dataset Paths, Locators, Names, and Datatypes
 
Default rules for schema detection from XML
Default rules for schema detection from JSON
Adding Locators to Clarify RAQL Row Detection
Providing Dataset Path and Datatype Information in a Schema
When working with XML, JSON, or CSV datasets, there are three potentially troublesome areas that you can improve with specific techniques:
*The data model for XML or JSON datasets is frequently hierarchical, including additional metadata beyond the flat rows of interest to RAQL and adding additional layers of structure.
To simplify queries, RAQL automatically attempts to detect which objects in an XML or JSON dataset should be considered rows. This allows you to refer to rows in the dataset in RAQL queries using only the name of the variable containing the dataset, such as:
select firstname, lastname, state from congress
The rules that govern automatic schema detection are shown in Default rules for schema detection from XML and Default rules for schema detection from JSON.
In some cases, this default may not be the dataset elements you actually need to work with or query results may be incomplete. You can override this default by Adding Locators to Clarify RAQL Row Detection or Providing Dataset Path and Datatype Information in a Schema.
*In some cases, you may also need to alter column names to make them valid for RAQL or for EMML. In cases with queries using multiple datasets, you may also need to clarify the specific context for column names.
See Valid Names for Datasets, Columns, Aliases, Paths and Functions for information.
*With XML, JSON, or CSV data, RAQL has no metadata about the data types for each column so the data type is detected automatically. To override this, and to simplify the need for casting functions, by Providing Dataset Path and Datatype Information in a Schema.

Copyright © 2013-2018 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.
Innovation Release