feat(api): add featured datatypes to dashboard dataset ep #15188
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
SUMMARY
To be able to filter out unnecessary filter types on the native filters config form (primarily temporal filters, but potentially others later), we need to know what types of datatypes are available on the datasets that are referenced on the dashboard. While we recently added the
type_generic
field to the column object (see #14863) and could iterate through all columns to check if they are temporal or not, the list of columns that are returned by the response fromapi/v1/dashboard/<pk>/datasets
have been pre-filtered to contain only a subset of the actually featured columns. Therefore, we either need to return the full list of columns in the response, or add a new field that contains a list of datatypes featured in the dataset columns. To avoid bloating the response payload, this PR proposes adding the latter, i.e. a new fieldcolumn_types
to the response, that contains a list of allGenericDataType
s that are featured in the dataset columns.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
With this change, a new property
column_types
is available on Redux:TESTING INSTRUCTIONS
CI + updated test
ADDITIONAL INFORMATION