Method: GoodData::Project#execute_dml

Defined in:
lib/gooddata/models/project.rb

#execute_dml(dml, options = {}) ⇒ Hash

Executes DML expression. See (https://developer.gooddata.com/article/deleting-records-from-datasets) for some examples and explanations

Parameters:

  • dml (String)

    DML expression

Returns:

  • (Hash)

    Result of executing DML



1060
1061
1062
1063
1064
1065
1066
1067
1068
# File 'lib/gooddata/models/project.rb', line 1060

def execute_dml(dml, options = {})
  uri = "/gdc/md/#{pid}/dml/manage"
  result = client.post(uri, manage: { maql: dml })
  polling_uri = result['uri']

  client.poll_on_response(polling_uri, options) do |body|
    body && body['taskState'] && body['taskState']['status'] == 'WAIT'
  end
end