Closed MartinKalema closed 3 months ago
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 30.30%. Comparing base (
214d559
) to head (72ce7db
).
WHAT DOES THIS PR DO? This PR fixes an SQL query used to retrieve device data by adding backticks around table and column names to avoid syntax errors. This change ensures that the SQL parser correctly interprets identifiers, especially those with periods and special characters.
CHANGES MADE:
Modified the SQL query:
get_devices_hourly_data
function to prevent syntax errors.Before:
After:
WHY IS THIS NEEDED?
Without the backticks, the SQL query fails due to syntax errors. Adding backticks ensures that the SQL parser interprets the identifiers correctly, preventing errors and ensuring the query runs successfully.
ERROR MESSAGE Error:
BadRequest: 400 Syntax error: Expected end of input but got "." at [2:40]; reason: invalidQuery, location: query, message: Syntax error: Expected end of input but got "." at [2:40]
HOW DO I TEST OUT THIS PR?
Summary by CodeRabbit
Bug Fixes
get_devices_hourly_data
function to ensure proper table reference and condition handling.Style
airnow.py
for better readability.airqo_bam_measurements.py
.