Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Download is missing support for NAME, CODE, UID and ID #16049

Merged
merged 9 commits into from
Jan 4, 2024

Conversation

d-bernat
Copy link
Contributor

@d-bernat d-bernat commented Jan 2, 2024

Introduce support for the outputIdScheme parameter. Depending on the selected schema, all dimensions/headers should adhere to the specified scheme. The default scheme is 'UID.' The OutputIdScheme serves as an enumerator (with options such as ID, UID, UUID, CODE, NAME). Each identifiable object can be recognized by any of the listed values.

The request parameter outputIdScheme dictates the type of ID in the response. If outputIdScheme is not included in the incoming request, UID is applied by default. All IDs, except UID, are enhancements of the SQL result set (analytics table) performed using Hibernate ORM. Consequently, some columns (_name) from the analytics tables have become obsolete and were removed from both analytics exports and SQL select queries.

@d-bernat d-bernat changed the title feat: Download is missing support for NAME, CODE, UID and ID [DRAFT] feat: Download is missing support for NAME, CODE, UID and ID Jan 2, 2024
@d-bernat d-bernat changed the title [DRAFT] feat: Download is missing support for NAME, CODE, UID and ID feat: Download is missing support for NAME, CODE, UID and ID Jan 2, 2024
Copy link

codecov bot commented Jan 2, 2024

Codecov Report

Attention: 22 lines in your changes are missing coverage. Please review.

Comparison is base (5af3ca5) 66.36% compared to head (eb59575) 66.36%.
Report is 3 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master   #16049      +/-   ##
============================================
- Coverage     66.36%   66.36%   -0.01%     
- Complexity    31515    31519       +4     
============================================
  Files          3507     3507              
  Lines        130571   130572       +1     
  Branches      15235    15237       +2     
============================================
  Hits          86659    86659              
- Misses        36840    36845       +5     
+ Partials       7072     7068       -4     
Flag Coverage Δ
integration 50.30% <4.34%> (+<0.01%) ⬆️
integration-h2 32.36% <4.34%> (-0.01%) ⬇️
unit 30.33% <4.34%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
...in/java/org/hisp/dhis/analytics/outlier/Order.java 100.00% <ø> (ø)
...sp/dhis/analytics/outlier/data/OutlierRequest.java 0.00% <ø> (ø)
...utlier/service/AnalyticsZScoreOutlierDetector.java 2.94% <ø> (+0.30%) ⬆️
.../service/AnalyticsZScoreSqlStatementProcessor.java 54.54% <ø> (ø)
...his/analytics/table/JdbcAnalyticsTableManager.java 70.27% <ø> (-0.53%) ⬇️
...a/org/hisp/dhis/analytics/common/ColumnHeader.java 100.00% <100.00%> (ø)
...his/analytics/outlier/data/OutlierQueryParams.java 0.00% <0.00%> (ø)
...his/analytics/outlier/data/OutlierQueryParser.java 0.00% <0.00%> (ø)
...ytics/outlier/service/AnalyticsOutlierService.java 0.93% <0.00%> (-0.11%) ⬇️

... and 5 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

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

Copy link
Contributor

@maikelarabori maikelarabori left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @d-bernat, looks good. Just one minor comment related to the code. Please review it.

Also, please, add a description to the PR. Usually we describe at least what has changed and the motivation for it.

Cheers,
Maikel

@@ -283,4 +303,18 @@ private void setRows(Grid grid, List<Outlier> outliers, OutlierRequest request)
grid.addValue(v.getUpperBound());
});
}

private String getIdProperty(IdentifiableObject object, String uid, IdScheme idScheme) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Javadoc is missing.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@maikelarabori maikelarabori added the run-api-analytics-tests Enables analytics e2e tests label Jan 3, 2024
@d-bernat d-bernat requested a review from maikelarabori January 3, 2024 09:45
Copy link

sonarcloud bot commented Jan 4, 2024

@d-bernat d-bernat merged commit 142be5a into master Jan 4, 2024
17 checks passed
@d-bernat d-bernat deleted the 2.41-DHIS2-16245 branch January 4, 2024 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
run-api-analytics-tests Enables analytics e2e tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants