Hi @MeggieFox ,
By default, the body of an email notification for a Databricks Job with a query result table will display the first 10 rows of the query result table. However, you can configure the notification to display all the rows by customizing the email template used for notification.
Hereโs how to configure the email template:
-
Go to your Databricks workspace and select User > Account Settings > Notifications.
-
In the Email template section, select Custom.
-
In the Custom template textbox, replace the existing message with the following template:
Results of query {{job_result.id}}
{% for row in job_result.result().collect() %}
{{ row }}
{% endfor %}
- Save your changes.
The customized email template uses a Jinja2 template that iterates through all rows in the query result table and appends them as a string. This ensures that all query rows are included in the notification email, instead of just the first 10 rows.
Now, when you run a Job with query results, the notification email will display all of the rows in the query result table.