gooddata / gooddata-java Goto Github PK
View Code? Open in Web Editor NEWGoodData Java SDK
License: Other
GoodData Java SDK
License: Other
closed by #65
closed by #45
ModelService.getProjectModelDiff(Project, DiffRequest)
protected (it is not usable for user)ModelService.updateProjectModel(Project, ModelDiff)
which is wrong - it runs all the MAQLs returned by the diff API (eg. destructive and non-destructive)ModelDiff
class should to pick the best UpdateScript
ModelService.updateProjectModel(Project, UpdateScript)
ModelService.updateProjectModel(Project, Reader)
ModelService.updateProjectModel()
should read error (instead of throw new ModelException("Update project model finished with status ERROR");
Let experienced user to plugin own developed service configured/initialized with the same restTemplate as built-in services.
If any execution fails, the error output is not very friendly, e.g.
org.springframework.web.client.RestTemplate handleResponseError
WARNING: POST request for "/gdc/md/XXX/obj" resulted in 400 (Bad Request); invoking error handler
I would prefer to get a requestId or any other error identification.
closed by #23
Exception in thread "main" org.springframework.http.converter.HttpMessageNotReadableException: Could not read JSON: No suitable constructor found for type [simple type, class com.gooddata.project.Project]: can not instantiate from JSON object (need to add/enable type information?)
at [Source: org.apache.http.client.entity.LazyDecompressingInputStream@25da8379; line: 1, column: 2]; nested exception is com.fasterxml.jackson.databind.JsonMappingException: No suitable constructor found for type [simple type, class com.gooddata.project.Project]: can not instantiate from JSON object (need to add/enable type information?)
at [Source: org.apache.http.client.entity.LazyDecompressingInputStream@25da8379; line: 1, column: 2]
at org.springframework.http.converter.json.MappingJackson2HttpMessageConverter.readJavaType(MappingJackson2HttpMessageConverter.java:181)
at org.springframework.http.converter.json.MappingJackson2HttpMessageConverter.read(MappingJackson2HttpMessageConverter.java:173)
at org.springframework.web.client.HttpMessageConverterExtractor.extractData(HttpMessageConverterExtractor.java:94)
at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:496)
at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:452)
at org.springframework.web.client.RestTemplate.getForObject(RestTemplate.java:222)
at com.gooddata.project.ProjectService.getProjectByUri(ProjectService.java:114)
at com.gooddata.project.ProjectService.getProjectById(ProjectService.java:135)
The problem is in RestTemplate
constructor which favours Jackson2 over Jackson1:
if (jackson2Present) {
this.messageConverters.add(new MappingJackson2HttpMessageConverter());
}
else if (jacksonPresent) {
this.messageConverters.add(new MappingJacksonHttpMessageConverter());
}
GoodData object initialized with http protocol instead of default https
goodData = new GoodData(hostname, username, password, 80, "http")
project = goodData.getProjectService().getProjectById(projectId)
returns error when accessing project using ProjectService
com.gooddata.http.client.GoodDataAuthException: Unable to login: 302
at com.gooddata.http.client.LoginSSTRetrievalStrategy.obtainSst(LoginSSTRetrievalStrategy.java:77)
at com.gooddata.http.client.GoodDataHttpClient.handleResponse(GoodDataHttpClient.java:168)
at com.gooddata.http.client.GoodDataHttpClient.execute(GoodDataHttpClient.java:290)
at com.gooddata.http.client.GoodDataHttpClient.execute(GoodDataHttpClient.java:255)
at org.springframework.http.client.HttpComponentsClientHttpRequest.executeInternal(HttpComponentsClientHttpRequest.java:88)
at org.springframework.http.client.AbstractBufferingClientHttpRequest.executeInternal(AbstractBufferingClientHttpRequest.java:46)
at org.springframework.http.client.AbstractClientHttpRequest.execute(AbstractClientHttpRequest.java:49)
at org.springframework.http.client.InterceptingClientHttpRequest$RequestExecution.execute(InterceptingClientHttpRequest.java:91)
at com.gooddata.HeaderSettingRequestInterceptor.intercept(HeaderSettingRequestInterceptor.java:32)
at org.springframework.http.client.InterceptingClientHttpRequest$RequestExecution.execute(InterceptingClientHttpRequest.java:81)
at org.springframework.http.client.InterceptingClientHttpRequest.executeInternal(InterceptingClientHttpRequest.java:67)
at org.springframework.http.client.AbstractBufferingClientHttpRequest.executeInternal(AbstractBufferingClientHttpRequest.java:46)
at org.springframework.http.client.AbstractClientHttpRequest.execute(AbstractClientHttpRequest.java:49)
at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:488)
at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:452)
at org.springframework.web.client.RestTemplate.getForObject(RestTemplate.java:222)
at com.gooddata.project.ProjectService.getProjectByUri(ProjectService.java:114)
at com.gooddata.project.ProjectService.getProjectById(ProjectService.java:135)
service.upload("foo", stream);
tries to upload to /uploadsfoo
Util now we can export report definition only.
closed by #56
When exporting larger reports, exportReport()
method writes polling uri to the output stream instead of expected data. It looks like a problem with missing polling strategy, because it occurs only sometimes, usually with larger reports.
now only multipart post is supported
POST /gdc/md/project/obj?createAndGet=true
if set to true returns full representation of the object after creation
GridElement
can be one of
metricGroup
(a string, can be maximally one time in rows or columns)URI
(URI is allowed for backward compatibility)GridElement
(originally called AttributeInGrid
)We probably should introduce some type hierarchy over GridElement
.
Also type of Grid.columns
should be Collection<GridElement>
not Collection<String>
(it was created in about one minute)
closed by #53
closed by #33
closed by #48
In com.gooddata.md.AttributeTest you use org.hamcrest.Matchers.hasSize function
which is unavailable in 1.3 release in hamcrest
com.gooddata.http.client.GoodDataAuthException: Unable to login: 403
at com.gooddata.http.client.LoginSSTRetrievalStrategy.obtainSst(LoginSSTRetrievalStrategy.java:77)
at com.gooddata.http.client.GoodDataHttpClient.handleResponse(GoodDataHttpClient.java:168)
at com.gooddata.http.client.GoodDataHttpClient.execute(GoodDataHttpClient.java:290)
at com.gooddata.http.client.GoodDataHttpClient.execute(GoodDataHttpClient.java:255)
at org.springframework.http.client.HttpComponentsClientHttpRequest.executeInternal(HttpComponentsClientHttpRequest.java:88)
at org.springframework.http.client.AbstractBufferingClientHttpRequest.executeInternal(AbstractBufferingClientHttpRequest.java:46)
at org.springframework.http.client.AbstractClientHttpRequest.execute(AbstractClientHttpRequest.java:49)
at org.springframework.http.client.InterceptingClientHttpRequest$RequestExecution.execute(InterceptingClientHttpRequest.java:91)
at com.gooddata.HeaderSettingRequestInterceptor.intercept(HeaderSettingRequestInterceptor.java:32)
at org.springframework.http.client.InterceptingClientHttpRequest$RequestExecution.execute(InterceptingClientHttpRequest.java:81)
at org.springframework.http.client.InterceptingClientHttpRequest.executeInternal(InterceptingClientHttpRequest.java:67)
at org.springframework.http.client.AbstractBufferingClientHttpRequest.executeInternal(AbstractBufferingClientHttpRequest.java:46)
at org.springframework.http.client.AbstractClientHttpRequest.execute(AbstractClientHttpRequest.java:49)
at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:488)
at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:452)
at org.springframework.web.client.RestTemplate.getForObject(RestTemplate.java:222)
at com.gooddata.account.AccountService.getCurrent(AccountService.java:33)
but com.gooddata.GoodDataException
should be thrown.
Please see below the invalid handling of paths (when running unit tests on Windows)
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running TestSuite
Configuring TestNG with: org.apache.maven.surefire.testng.conf.TestNG652Configurator@53a9d5
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Tests run: 154, Failures: 4, Errors: 0, Skipped: 0, Time elapsed: 1.28 sec <<< FAILURE!
testMergeUrisWithSlash(com.gooddata.UriPrefixerTest) Time elapsed: 0 sec <<< FAILURE!
java.lang.AssertionError:
Expected: is "http://localhost:1/uploads/test"
but: was "http://localhost:1/๐ฆ%5Cuploads%5Ctest"
at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:8)
at com.gooddata.UriPrefixerTest.testMergeUrisWithSlash(UriPrefixerTest.java:19)
testMergeUrisWithoutSlash(com.gooddata.UriPrefixerTest) Time elapsed: 0 sec <<< FAILURE!
java.lang.AssertionError:
Expected: is "http://localhost:1/uploads/test"
but: was "http://localhost:1/๐ฆ%5Cuploads%5Ctest"
at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:8)
at com.gooddata.UriPrefixerTest.testMergeUrisWithoutSlash(UriPrefixerTest.java:26)
shouldZipDir(com.gooddata.util.ZipUtilsTest) Time elapsed: 0 sec <<< FAILURE!
java.lang.AssertionError:
Expected: is "toZip/a/b/someFile.txt"
but: was "toZip\a\b\someFile.txt"
at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:8)
at com.gooddata.util.ZipUtilsTest.verifyZipContent(ZipUtilsTest.java:97)
at com.gooddata.util.ZipUtilsTest.shouldZipDir(ZipUtilsTest.java:56)
shouldZipDirWithoutRoot(com.gooddata.util.ZipUtilsTest) Time elapsed: 0 sec <<< FAILURE!
java.lang.AssertionError:
Expected: is "a/b/someFile.txt"
but: was "a\b\someFile.txt"
During GoodData initialization, it throws a logging warning:
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
closed by #48
Could lead to some NoClassDefFound etc., required version is 0.8.2+, it doesn't work properly with 0.8.1
it tries to zip the input once more, which leads to exception. The SDK should either somehow detect zip input and not to zip it again, or we should add some parameter saying what's the input
AttributeInGrid
is not properly serialized/deserialized when part of ReportDefinition
. Result JSON is missing "attribute" wrapper.
{
"uri": "/gdc/md/FoodMartDemo/obj/8362",
"totals": [],
"alias": ""
}
{
"attribute": {
"uri": "/gdc/md/FoodMartDemo/obj/8362",
"totals": [],
"alias": ""
}
}
Right now, you have to add objects identifications to create metric, it would be helpful to add only string identifications or add ability to load object IDs before creating metric.
Example, instead of:
Metric metric = new Metric(
"Count XXX",
"SELECT COUNT([/gdc/md/XXX/obj/XXX]) WHERE " +
"[/gdc/md/XXX/obj/XXX] NOT IN " +
"([/gdc/md/XXX/obj/XXX/elements?id=XXX])", "#,##0");
Metric metric = new Metric(
"Count XXX",
"SELECT COUNT(XXX.YYY) WHERE " +
"XXX.YYY NOT IN " +
"XXX.YYY.ZZZ", "#,##0");
or
String obj = metadataService.getAttributeId("XXX.YYY");
and then
Metric metric = new Metric("Count XXX", "SELECT COUNT(%s)".format(obj), "#,##0");
currently only File (regular file or directory) is supported
Until this library covers entire GoodData API, it would be nice to have a way to execute a normal HTTP request on an arbitrary resource. The library would just execute the request with correct TT (possibly refresing it) and return the result.
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.