目前在尝试以http://www.rubydoc.info/gems/gooddata/GoodData/Model/ToManifest中定义的方式获取清单时存在错误 但我可以给你一个解决方法来获取它直到他们修复它并更新我们的宝石:
require 'gooddata'
require 'pp'
module GoodData
module Model
module ToManifest
def self.dataset_to_manifest(project, dataset, mode = 'FULL')
dataset = dataset.is_a?(String) ? Model::ProjectBlueprint.find_dataset(project, dataset) : dataset
dataset = dataset.to_hash
all_datasets = Model::ProjectBlueprint.datasets(project)
tm = to_manifest(project, mode)
datasets = all_datasets.zip(tm)
res = datasets.find do |ds|
ds.first[:title] == dataset['dataSet']['meta']['title']
end
res[1]
end
end
end
end
GoodData.logging_on
client = GoodData.connect 'your_user@gooddata.com', 'password'
project = client.projects('project_id')
dataset =project.datasets('/gdc/md/projectid/obj/dataset_id')
res = GoodData::Model::ToManifest.dataset_to_manifest(project.blueprint, dataset)
pp res
这将允许您获得没有错误的清单。