Hitachi Vantara Pentaho Community Wiki
Child pages
  • 03. Pentaho Metadata MQL Schema
Skip to end of metadata
Go to start of metadata

MQL is the syntax Pentaho Metadata uses for generating SQL queries based off of metadata.  Normally a user would generate MQL via Pentaho's Design Studio or Pentaho's Metadata Editor.  Here is a description of the MQL XML format:

  • <mql> - top level element for mql query
    • <domain_type> - text element that contains the domain type, currently only "relational" is supported
    • <domain_id> - text element that contains the domain id to query
    • <model_id> - text element that contains the model id to query
    • <model_name> - not required - text element with the model name
    • <selections>- element that contains a list of business column selections
      • <selection> - business column selection element
        • <view> - text element that contains the id of the business table to select
        • <column> - text element that contains the id of the business column to select
    • <constraints> - element that contains a list of constraints for the MQL query
      • <constraint> - constraint container element
        • <operator> - text element that describes how to join the constraint to the query.  The first constraint operator is ignored but required.  Valid entries are "AND", "OR", "AND NOT", and "OR NOT"
        • <condition> - text element that contains an MQL formula as defined in 02. Pentaho Metadata Formulas.
    • <orders> - element that contains a list of business columns to order by
      • <order> - order container element
        • <direction> - text element containing either "asc" or "desc"
        • <table_id> - text element containing the id of the business table to order by
        • <column_id> - text element containing the id of the business column to order by
  • No labels