class GoodData::Model::BridgeBlueprintField

Public Instance Methods

bridge() click to toggle source

Returns the string bridge of the ref which is string Id of dataset that is bridged.

@return [String] Id of the bridged dataset

# File lib/gooddata/models/blueprint/bridge_field.rb, line 22
def bridge
  data[:dataset]
end
dataset() click to toggle source

Returns the schema that is referenced by this ref

@return [GoodData::Model::SchemaBlueprint] the referencesd schema

# File lib/gooddata/models/blueprint/bridge_field.rb, line 15
def dataset
  dataset_blueprint.find_dataset(bridge, include_date_dimensions: true)
end
in_project(_project) click to toggle source

Returns the md object in associated project or throws error if not present

@return [GoodData::MdObject] md object that is represented in the blueprint

# File lib/gooddata/models/blueprint/bridge_field.rb, line 38
def in_project(_project)
  fail NotImplementedError, 'Reference does not have representation as an object in datamart'
end
validate() click to toggle source

Validates the fields in the ref

@return [Array] returns list of the errors represented by hash structures

# File lib/gooddata/models/blueprint/bridge_field.rb, line 29
def validate
  validate_presence_of(:dataset).map do |e|
    { type: :error, message: "Field \"#{e}\" is not defined or empty for bridge \"#{data}\"" }
  end
end