class GoodData::Dataset

Public Class Methods

all(options = { :client => GoodData.connection, :project => GoodData.project }) click to toggle source

Method intended to get all objects of that type in a specified project

@param options [Hash] the options hash @option options [Boolean] :full if passed true the subclass can decide to pull in full objects. This is desirable from the usability POV but unfortunately has negative impact on performance so it is not the default. @return [Array<GoodData::MdObject> | Array<Hash>] Return the appropriate metadata objects or their representation

# File lib/gooddata/models/metadata/dataset.rb, line 20
def all(options = { :client => GoodData.connection, :project => GoodData.project })
  query('dataSet', Dataset, options)
end

Public Instance Methods

attribute_uris() click to toggle source

Gives you list of attribute uris on a dataset

@return [Array<String>]

# File lib/gooddata/models/metadata/dataset.rb, line 35
def attribute_uris
  content['attributes']
end
attributes() click to toggle source

Gives you list of attributes on a dataset

@return [Array<GoodData::Attribute>]

# File lib/gooddata/models/metadata/dataset.rb, line 28
def attributes
  attribute_uris.pmap { |a_uri| project.attributes(a_uri) }
end
date_dimension?() click to toggle source

Tells you if a dataset is a date dimension. This is done by looking at the attributes and inspecting their identifiers.

@return [Boolean]

# File lib/gooddata/models/metadata/dataset.rb, line 57
def date_dimension?
  content['urn'] && !content['urn'].empty? && fact_uris.empty?
end
delete_data()
Alias for: synchronize
fact_uris() click to toggle source

Gives you list of fact uris on a dataset

@return [Array<String>]

# File lib/gooddata/models/metadata/dataset.rb, line 49
def fact_uris
  content['facts']
end
facts() click to toggle source

Gives you list of facts on a dataset

@return [Array<GoodData::Fact>]

# File lib/gooddata/models/metadata/dataset.rb, line 42
def facts
  fact_uris.pmap { |a_uri| project.facts(a_uri) }
end
synchronize() click to toggle source

Delete the data in a dataset

# File lib/gooddata/models/metadata/dataset.rb, line 62
def synchronize
  project.execute_maql("SYNCHRONIZE {#{identifier}}")
end
Also aliased as: delete_data