I'm working in Teradata SQL Assistant and I need to create a stored procedure that, given a table name, returns the percentage of NULL values for each column in that table.
Right now, I generate the entire query from Python, using a function where I pass the table name and the list of columns. It saves me some time, but it would be much better if I could do all of this directly in a stored procedure.
| column_name | null_percentage |
|---|---|
| col1 | 74 |
| col2 | 32 |
| .... | .... |