gooddata / gooddata-ruby Goto Github PK
View Code? Open in Web Editor NEWGoodData API Ruby Gem
Home Page: http://developer.gooddata.com/
License: Other
GoodData API Ruby Gem
Home Page: http://developer.gooddata.com/
License: Other
The bindings output:
/Library/Ruby/Gems/1.8/gems/gooddata-0.3.0/lib/gooddata/models/metadata.rb:5: warning: already initialized constant MD_OBJ_CTG
/Library/Ruby/Gems/1.8/gems/gooddata-0.3.0/lib/gooddata/models/metadata.rb:6: warning: already initialized constant IDENTIFIERS_CFG
/Library/Ruby/Gems/1.8/gems/gooddata-0.3.0/lib/gooddata/models/metadata.rb:80: warning: already initialized constant SLI_CTG
/Library/Ruby/Gems/1.8/gems/gooddata-0.3.0/lib/gooddata/models/metadata.rb:81: warning: already initialized constant DS_SLI_CTG
When run.
Let's create a way how to create and manipulate dashboards in a simple way so we have something.
Dashboards manipulation
Report creation
Ability to create a dashboard programmatically
This is preventing our upgrade to ruby 2.0 as Iconv is no longer included.
Looks like you can just use String#encode instead.
There is problem here:
https://github.com/gooddata/gooddata-ruby/blob/master/lib/gooddata/models/schedule.rb
The Schedule initialization by [] is not using given ID for anything.
The list_users method on domain is not supporting paging.
The GoodData resource is paged by default.
I have defined a connection point and two attributes in a data set. They all appear as attributes on the inside (web interface) and it is not possible to use that field to connect with another dataset.
Try to create a dataset using a json descriptor that mentions an already existing folder. The tool responds with "internal server error" without any further details.
Because the second parameter options = {} was added to base class some subclasses (Report, Dashboard, etc) got broken.
You can define a metric or a report that is not computable (does not make sense) or is empty (returns no data).
empty is not an error state so it should just return nil (I think it does) in case of metric and nil or some nil_object in case of report
not_computable is an error state and shoul throw an exception
Make the params accepted by Schedule::create(x, y, z, params) symbol friendly so I can pass :hidden_params instead of hidden_params.
Also please make sure that the expected keys follow ruby best practices in regard of snakecase vs camelcase. Currently hiddenParams is expected instead of hidden_params.
I'm trying to upload data and I've got as far as the upload method. It pauses there for nearly five minutes with no feedback from upstream and eventually it fails with:
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/net/ftptls.rb:47:in `connect': SSL_connect returned=1 errno=0 state=SSLv2/v3 read server hello A: unknown protocol (OpenSSL::SSL::SSLError) from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/net/ftptls.rb:47:in `login' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/net/ftp.rb:138:in `initialize' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/net/ftp.rb:113:in `new' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/net/ftp.rb:113:in `open' from /Library/Ruby/Gems/1.8/gems/gooddata-0.3.0/lib/gooddata/connection.rb:138:in `upload' from /Library/Ruby/Gems/1.8/gems/gooddata-0.3.0/lib/gooddata/model.rb:228:in `upload' from /Library/Ruby/Gems/1.8/gems/gooddata-0.3.0/lib/gooddata/models/project.rb:120:in `upload' from /Library/Ruby/Gems/1.8/gems/gooddata-0.3.0/lib/gooddata/commands/datasets.rb:88:in `load' from /Library/Ruby/Gems/1.8/gems/gooddata-0.3.0/lib/gooddata/commands/datasets.rb:99:in `with_project' from /Library/Ruby/Gems/1.8/gems/gooddata-0.3.0/lib/gooddata/commands/datasets.rb:83:in `load' from /Library/Ruby/Gems/1.8/gems/gooddata-0.3.0/lib/gooddata/command.rb:40:in `send' from /Library/Ruby/Gems/1.8/gems/gooddata-0.3.0/lib/gooddata/command.rb:40:in `run_internal' from /Library/Ruby/Gems/1.8/gems/gooddata-0.3.0/lib/gooddata/command.rb:16:in `run' from /Users/james/src/gather/lib/gather/goodsend.rb:101:in `load_dataset' from /Users/james/src/gather/lib/gather/goodsend.rb:56:in `process_gooddata_archive' from /Users/james/src/gather/lib/gather/goodsend.rb:21:in `run' from /Users/james/src/gather/lib/gather.rb:66:in `run' from /Users/james/src/gather/lib/gather.rb:46:in `each' from /Users/james/src/gather/lib/gather.rb:46:in `run' from /Users/james/src/gather/lib/gather.rb:37:in `initialize' from bin/gather:77:in `new' from bin/gather:77
With the latest gem version 0.6.0.pre11, I cannot create any metrics.
Code to reproduce:
require 'pathname'
require 'gooddata'
GoodData.connect "<username>", "<password>"
# select last project
projects = GoodData::Project[:all]
GoodData.use projects.last.uri
# get the facts
facts = GoodData::Fact[:all]
# create a metric
metric = GoodData::Metric.create(:title => 'Test Metric', :expression => "SELECT SUM([\"#{facts.first['link']}\"])")
The last line raises
#<NoMethodError: undefined method `uri' for #<Object:0x007f8c6486d588>>
I tried removing the double quotes from the expression, but the error remains the same.
The manage will be deprecated.
I see you can run the API like:
GoodData::Command.run "datasets", [ "--project", project ]
This returns output to STDOUT which isn't helpful for structured data.
Is there a way to call the API that doesn't involve invoking the Command.run method and return the output?
I believe they are confusing for the user and maybe we should strive to make the undistinguishable.
We are probably able to create a user with only limited set of available parameters. Please add all of them do not forget about SSO and AuthenticationMode.
for e.g
project = GoodData::Project.create
project.uri -> link to self
project.obj_id -> project id
project = GoodData::Project.get project.uri
project.uri -> nil
project.obj_id -> throws exception
Also investigate GoodData::Report seems like there is an error when using all
[lubomirzrnecko@luzrmac:gooddata-ruby] gooddata help
/Users/lubomirzrnecko/.rvm/gems/ruby-1.9.2-p290/gems/gooddata-0.5.0/lib/gooddata/model.rb:36:in <module:Model>': undefined method
parse' for Date:Class (NoMethodError)
from /Users/lubomirzrnecko/.rvm/gems/ruby-1.9.2-p290/gems/gooddata-0.5.0/lib/gooddata/model.rb:10:in <module:GoodData>' from /Users/lubomirzrnecko/.rvm/gems/ruby-1.9.2-p290/gems/gooddata-0.5.0/lib/gooddata/model.rb:8:in
<top (required)>'
from /Users/lubomirzrnecko/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in require' from /Users/lubomirzrnecko/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in
require'
from /Users/lubomirzrnecko/.rvm/gems/ruby-1.9.2-p290/gems/gooddata-0.5.0/lib/gooddata/models/metadata.rb:1:in <top (required)>' from /Users/lubomirzrnecko/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in
require'
from /Users/lubomirzrnecko/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in require' from /Users/lubomirzrnecko/.rvm/gems/ruby-1.9.2-p290/gems/gooddata-0.5.0/lib/gooddata/client.rb:5:in
<top (required)>'
from /Users/lubomirzrnecko/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in require' from /Users/lubomirzrnecko/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in
require'
from /Users/lubomirzrnecko/.rvm/gems/ruby-1.9.2-p290/gems/gooddata-0.5.0/lib/gooddata.rb:3:in <top (required)>' from /Users/lubomirzrnecko/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in
require'
from /Users/lubomirzrnecko/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in require' from /Users/lubomirzrnecko/.rvm/gems/ruby-1.9.2-p290/gems/gooddata-0.5.0/bin/gooddata:5:in
<top (required)>'
from /Users/lubomirzrnecko/.rvm/gems/ruby-1.9.2-p290/bin/gooddata:19:in load' from /Users/lubomirzrnecko/.rvm/gems/ruby-1.9.2-p290/bin/gooddata:19:in
The documentation at http://sdk.gooddata.com/gooddata-ruby/getting-started/#login uses hardcoded URL of the WebDAV:
GoodData.connect( :login => '[email protected]',
:password => 'pass',
:server => "https://na1.secure.gooddata.com",
:webdav_server => "https://na1-di.gooddata.com",
:token => "asdasdas")
I'm not sure if this is only the documentation issue, or the library doesn't get the WebDAV URL from the REST API.
Sample code
require 'pathname'
require 'gooddata'
GoodData.connect "[email protected]", "password"
# forgot to do GoodData.use 'project_id'
GoodData::Metric[:all]
When running this code, the last line will produce this output:
NoMethodError: undefined method `md' for nil:NilClass
which is not useful at all in helping me find my mistake. It would be better if it said something along the lines of "you need to choose a project ".
Try to create a dataset using a json descriptor that mentions an already existing folder. The tool responds with an error message rather than checking the folder first and not trying to create it again.
The upload method only accepts File objects, but when attempting to upload remote files using URLs (ie. Gooddata.upload(open('http://path.com')) ), the process can fail if the file size is under 10 KB. Ruby converts these files to StringIO objects which the Gooddata gem cannot use.
On line 252 of connection.rb:
:payload => File.read(file)
should accomodate for all: path_names, File and StringIO objects
I am using version 0.5.16 with Ruby 2.1.1p76. I have this code:
require 'GoodData'
GoodData.connect(username, password)
GoodData.use(pid)
GoodData::Metric[:all]
Last line produces this error:
in <main>': uninitialized constant GoodData::Metric (NameError)
Hi guys,
Thanks for creating this gem.
We're evaluating Gooddata for integration with a Rails project running on Ruby 1.9.2 and Rails 3.0.7.
Have you guys planned to port this gem to Ruby 1.9.2 in near future ?
If not, I guess we'll need to write our Gooddata sync scripts in Ruby 1.8.7.
Thanks.
I have found out today that run_ruby command is not working. It is returning Wrong number of arguments expception.
Looks like Process.run is missing in master version.
This is annoying for the end user. Seems like active_support maintainer removed the dependency. We moved to MultiJSON and pure ruby by default. There should not be much to do
Remove ActiveSupport dependency.
The polling is verbatim copied around several times. Refactor it. Search the code for wTaskStatus. These are all very similar.
Seems like the validation is left to the Command static method. It would be better to do it in CLI command so we can provide CLI specific error message.
I don't want to have my credentials hard coded in source code. It could be loaded e.g. from defined properties file or env. variables.
With the latest version of the GoodData gem, simply doing
require 'gooddata'
fails with the following error:
undefined method `Pathname' for main:Object (NoMethodError)
To fix this, one has to require 'pathname'
before loading the GoodData gem.
GoodData::ProjectRole does not have accessor for role URL.
The problem is it is inconsistent with API design and there is no links.self in json.
This needs to be extracted from different URL.
As per API docs when the changes are suggested to migrate the model there are several possible variants suggested. There are at most 4 since there are 2 parameters. Currently the combination that is picked is hardcoded https://github.com/gooddata/gooddata-ruby/blob/master/lib/gooddata/models/project_creator.rb#L61 .
Make sure that the variant that is picked is least invasive like this
cascadeDrops,preserveData
------------------------------------
1. - false,true
2. - false,false
3. - true,true
4. - true,false
The current way of doing things are very tighlty tied to global space. While this might be useful for nonprogrammers it is also not clear what is going on. Programmers are much more used to something like this
client = GoodData::Client.connect('login', 'pass')
project = client.project('abc')
project.attributes
Can we run something after the whole test suite?
Project.all.each &:delete
would be great
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.