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.
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
Enhancement/7602-parsing-custom-dimensions-report #7697
Enhancement/7602-parsing-custom-dimensions-report #7697
Changes from 6 commits
d59ab88
dc956b1
50ba870
aeca2f4
c72e6f7
e5b753f
9abf2eb
f2477e0
07e0e7f
b2966ac
259f120
df7e617
794f4f2
2f0d0e5
5fe120c
3a1b1d9
5bf0282
f34d9ca
12d864c
3380e3f
93dadc5
5511c1e
c7bb05b
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd suggest a different name for this method since parsing to me is more about extracting one or more values from the input (which is happening here) but more importantly, this is really transforming the response by mapping the IDs to display names. So the response is changing here, but the name doesn't quite reflect that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be safer to check
! is_numeric
here instead.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aaemnnosttv I actually had that check and then wanted to be more "strict" in preventing any string to filter through. But actually, it makes sense to filter through strings which we can't do anything about.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is going to be rather inefficient to call these functions every time for every row that will likely have many duplicates throughout.
Let's update the process to go through the rows and build a list of all of the IDs for each entity without duplicates (i.e. a Set). Then we can map those to their display names, after which we can go through and do the actual replacements in the dimension values all at once rather than doing everything on every iteration.