soda-sql
soda-sql copied to clipboard
Capture query for each metric
In the ScanResult, enable association of each metric with the query.
This could be an idea for the scan result structure:
measurements: [ {
..measurement details...
query: '1'
}, {
..measurement details...
query: '1'
}
],
queries: [{
id: '1'
sql: 'SELECT ....'
}
]
What if we have the SQL query text to be part of the measurement
payload?
@AlessandroLollo Adding the SQL to the measurement is another option, but then we would duplicate the same (long) query a lot of times. As the first query combines all aggregations on all columns. That s the reason why I proposed to split it up. Makes sense or do you still see reasons to move it into measurements?
I realized I never replied to your question @tombaeyens 😅 , sorry! Btw, I see your point and I agree with you. Your proposal works for me!