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

fix: Invalid key error for metric_filter and dimension_filter #187

Merged
merged 1 commit into from
May 5, 2024

Conversation

pedroceriotti
Copy link
Contributor

This PR fixes the issue introduced by #186.

It was causing the tap to break if no metric filter or dimensions are defined in the reports.json, or if these keys are defined with camelCase notation, which would be reasonable given it's a JSON file and all the other dimension and metric values use camelCase notation.

The issue was that the keys were defined with camelCase on lines 113-114 on the client.py file when initializing the report_definition dictionary, but it then tries to access them using snake_case notation on lines 267-268, which caused the tap to break with an invalid key error.

…ot defined in the report file was causing the tap to break
Copy link

sonarcloud bot commented May 5, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

Copy link
Member

@edgarrmondragon edgarrmondragon left a comment

Choose a reason for hiding this comment

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

Oops! Thanks for the patch @pedroceriotti

@edgarrmondragon edgarrmondragon merged commit 8709810 into MeltanoLabs:main May 5, 2024
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants