lib/gooddata/models/project.rb
# Executes MAQL expression and waits for it to be finished.
#
# @param maql [String] MAQL expression
# @return [Hash] Result of executing MAQL
Executes MAQL expression and waits for it to be finished.
Executes MAQL expression and waits for it to be finished .
def execute_maql(maql, options = {})
      ldm_links = client.get(md[GoodData::Model::LDM_CTG])
      ldm_uri = Links.new(ldm_links)[GoodData::Model::LDM_MANAGE_CTG]
      response = client.post(ldm_uri, manage: { maql: maql })
      polling_uri = response['entries'].first['link']
      result = client.poll_on_response(polling_uri, options) do |body|
        body && body['wTaskStatus'] && body['wTaskStatus']['status'] == 'RUNNING'
      end
      if result['wTaskStatus']['status'] == 'ERROR'
        fail MaqlExecutionError.new("Executionof MAQL '#{maql}' failed in project '#{pid}'", result)
      end
      result
    end
def execute_maql ( maql , options = { } ) ldm_links = client . get ( md [ GoodData :: Model :: LDM_CTG ] ) ldm_uri = Links . new ( ldm_links ) [ GoodData :: Model :: LDM_MANAGE_CTG ] response = client . post ( ldm_uri , manage : { maql : maql } ) polling_uri = response [ 'entries' ] . first [ 'link' ] result = client . poll_on_response ( polling_uri , options ) do | body | body && body [ 'wTaskStatus' ] && body [ 'wTaskStatus' ] [ 'status' ] == 'RUNNING' end if result [ 'wTaskStatus' ] [ 'status' ] == 'ERROR' fail MaqlExecutionError . new ( "Executionof MAQL '#{maql}' failed in project '#{pid}'" , result ) end result end
Executes MAQL expression and waits for it to be finished.
Executes MAQL expression and waits for it to be finished .
Result of executing MAQL
Result of executing MAQL
Hash
maql
None
options