MashZone NextGen Analytics : RAQL Queries : Dataset Paths, Names and Datatypes
Dataset Paths, Names and Datatypes
 
Default rules for schema detection from XML
Adding Paths to Clarify RAQL Row Detection
Providing Dataset Path and Datatype Information in a Schema
When working with XML or CSV datasets, there are three potentially troublesome areas that you can improve with specific techniques:
*The data model for XML 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 elements in an XML 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.
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 Paths 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 or CSV data, RAQL has no metadata about the datatypes for each column so the data is treated as a string. You can fill this gap, to simplify the need for casting functions, by Providing Dataset Path and Datatype Information in a Schema.
Copyright © 2013-2016 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback