Giter Club home page Giter Club logo

gooddata-ruby's Introduction

GoodData API Ruby wrapper and CLI

A convenient Ruby wrapper around the GoodData RESTful API. The gem comes in two flavors. It has a CLI client and it is a library which you can integrate into your application.

The best documentation for the GoodData API can be found using these resources:

Feel free to check out the GoodData community website if you have any questions about the GoodData Analytics platform, our API, or this library.

Status

Gem Version Downloads Dependency Status Code Climate Build Status

Supported versions

In order to make the user experience with integrating GoodData Ruby SDK as smooth and secure as possible and to ensure that the SDK is using the latest features of the platform, we only provide support to the two most recent major versions of Ruby SDK.

The most recent majors will be supported in the following modes:

  • The latest major version will receive all new functionality and all bug fixes.

  • The previous major version will only receive fixes to critical issues and security fixes. These fixes will be applied on top of last released version of the previous major.

  • GoodData customer support will provide support for the latest major and previous major version only.

  • The customers are encouraged to always use the latest version of the Ruby SDK.

  • In case of using older versions, the user might face API incompatibility, performance or security issues.

Please follow the installation instructions in the repository to update to the newest version.

Install

If you are using bundler, add

gem "gooddata"

into Gemfile

and run

bundle install

If you are using gems just

gem install gooddata

Note on Patches/Pull Requests

  • Fork the project.
  • Make your feature addition or bug fix.
  • Add tests for it. This is important so I don't break it in a future version unintentionally.
  • Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself we can ignore when we pull)
  • run rake test and make sure all tests pass
  • run rake cop and make sure you did not introduce any new coding rules issues
  • Send us a pull request. Bonus points for topic branches.

Contributing

See our contribution guidelines.

Credits

Originally started by

Pavel Kolesnikov [ @koles ]

Actively developed and maintained by

GoodData Team

Contributors

For full contributor info see contributors page.

Special thanks to

Copyright

(c) 2010-2021 GoodData Corporation This repository is governed by the terms and conditions in the LICENSE. This repository contains a number of open source packages detailed in NOTICES, including the GoodData Ruby SDK, which is licensed under the BSD-3-Clause license and contains additional open source components detailed in the file called LICENSE_FOR_RUBY_SDK_COMPONENT.

gooddata-ruby's People

Contributors

andrehjr avatar bkompis avatar caohhung avatar cvengros avatar fluke777 avatar gdgate avatar hacxman avatar hahihula avatar henrich-m avatar hung-nguyen-hoang avatar jdenk avatar jimirocks avatar jmachan-zz avatar juras-gdc avatar khanhhuynh-gooddata avatar koles avatar korczis avatar kubamahnert avatar lkundrak avatar panjan avatar phong-nguyen-duy avatar realmbu avatar sadam21 avatar thnkr avatar thuytran-gooddata avatar trung-le-quoc avatar vu-pham avatar watson avatar yenkins-admin avatar zsvoboda avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gooddata-ruby's Issues

Add uri to GoodData::ProjectRole

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.

'gooddata help' throws exception when called under ruby 1.9.2

[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 methodparse' 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:inrequire'
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:inrequire'
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:inrequire'
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:inrequire'
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

'

`NoMethodError` when loading gooddata gem

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.

The run_ruby_cmd is not working

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.

Make sure the when migrating a model correct combination of maql specs are selected

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

Make the connection and project independent of global state

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

Does upload work?

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

Any plans for Ruby 1.9.2 support ?

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.

Remove dependencies that need compilation

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

`NoMethodError` when calling GoodData::Metric.create

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.

connection point doesn't make it

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.

uninitialized constant GoodData::Metric (NameError)

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)

`NoMethodError` when listing metadata objects without selecting a project

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 ".

GoodData domain support

The list_users method on domain is not supporting paging.

The GoodData resource is paged by default.

Directly call API

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?

Schedule cleanup

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.

Dashboards story

Let's create a way how to create and manipulate dashboards in a simple way so we have something.

  1. Dashboards manipulation

    • I can access tabs
    • Tabs behave like objects
    • I can access the items on tabs in a sane way
  2. Report creation

    • currently we have a table. Create a way how to create also Barchart, LineChart, Headline, Bubble chart. Explore the ways how the Interfaces can/cannot be the same.
  3. Ability to create a dashboard programmatically

    • There is a big focus on pixel perfect design on our dashboards. This defies the purpose of accessible information. Let's not focus on how it looks but to be able to create something that looks simple programatically.
    • Define simple builder DSL to be able to create dashboards with simple grid like layout.
    • Simplify as much as possible. There is a lot of things to tune on a visual side of things. If you are not sure as a rule of thumb use this "UI should work hard on making it pretty not us".

connection.upload only accepts local files

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

Extraneous output

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.