statisticsnorway / java-vtl

An Open Source Java implementation of the Validation Transformation Language, based on the VTL 1.1 draft specification. The implementation follows the JSR-223 Java Scripting API and exposes a simple connector interface one can implement in order to integrate with any data stores. VTL is a standard language for defining validation and transformation rules (set of operators, their syntax and semantics) for any kind of statistical data.
http://java-vtl.org
Apache License 2.0
21 stars 7 forks source link

Return result dataset as a separate property #53

Closed eivindgi closed 6 years ago

eivindgi commented 6 years ago

Add the result data set as a separate property to make it easier the extract the result on the client. Also added a test that tests an example of a calculation of a custom aggregated ratio as need on ssb.no

codecov[bot] commented 6 years ago

Codecov Report

Merging #53 into develop will decrease coverage by 6.91%. The diff coverage is 90%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop      #53      +/-   ##
=============================================
- Coverage      77.33%   70.41%   -6.92%     
- Complexity         0       27      +27     
=============================================
  Files            133      152      +19     
  Lines           3305     3722     +417     
  Branches         379      406      +27     
=============================================
+ Hits            2556     2621      +65     
- Misses           635      986     +351     
- Partials         114      115       +1
Impacted Files Coverage Δ Complexity Δ
...c/main/java/no/ssb/vtl/tools/rest/Application.java 0% <0%> (ø) 0 <0> (?)
...ols/rest/representations/ResultRepresentation.java 77.77% <100%> (ø) 4 <2> (?)
...vtl/tools/rest/controllers/ExecutorController.java 73.68% <100%> (ø) 4 <0> (?)
...java/no/ssb/vtl/tools/rest/TermdSocketHandler.java 0% <0%> (ø) 0% <0%> (?)
...va/no/ssb/vtl/tools/termd/SyntaxErrorListener.java 0% <0%> (ø) 0% <0%> (?)
...est/representations/SyntaxErrorRepresentation.java 0% <0%> (ø) 0% <0%> (?)
...tl/tools/rest/controllers/ValidatorController.java 0% <0%> (ø) 0% <0%> (?)
...rc/main/java/no/ssb/vtl/tools/rest/CorsFilter.java 0% <0%> (ø) 0% <0%> (?)
... and 12 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update ea949be...1487180. Read the comment docs.

hadrienk commented 6 years ago

Look good. Note that the variable in the Bindings should follow declaration order. If we implement paging this could be used to get the last one. Or it could be returned directly in another endpoint.