Karthika Chandrasekar
05/06/2025, 6:13 PMSELECT COUNT(*)
FROM {database}.INFORMATION_SCHEMA.schemata
WHERE UPPER(schema_name) = UPPER('elementary_schema')
AND UPPER(catalog_name) = UPPER('elementary_database')
After investigating, I found this query only runs on the database where I enabled the Elementary package. I'd like to better understand what this query is doing and how it's being used within the Elementary OSS framework.
• Is this part of a routine metadata check or schema validation?
• Is it expected to run frequently?
• Are there any best practices for minimizing its impact?
Appreciate any insights or pointers!
Thanks in advance 🙏Daniel Halabe
05/07/2025, 2:11 PMelementary_schema in the elementary_database before proceeding with tasks like logging, test results storage, or report generation. It's essentially a lightweight schema existence check, and the use of UPPER() ensures case-insensitive matching across environments.
It may run once per dbt invocation that leverages Elementary's features—e.g., during dbt test, dbt run, or when generating reports.
You might have a very large account. Restricting roles and access scopes so metadata scans are limited to relevant objects may help.Karthika Chandrasekar
05/07/2025, 3:52 PMdbt build. In our case, we do use dbt build, but the way our models are executed differs . Airflow runs each dbt model as a separate task. As a result, the number of task executions is quite high which is likely causing us to hit some limits. Additionally, restricting role-based access is challenging because the project references multiple schemas and databases but will see how i could work around this. Thanks again this was very helpful!