[Feature] Enable to specify destination database and schema for elementary
Motivation
The destination database and schema for elementary is settled by the first node whose package_name is elementary. If we have multiple databases and schemas with dbt tests by elementary in a dbt project, the destination can vary. So, it would be great to specify the destination database and schema.
- https://github.com/elementary-data/dbt-data-reliability/blob/e1e7cf05cb631c4ce00542f833fc9dc2b083686f/macros/edr/dbt_artifacts/upload_dbt_artifacts.sql
- https://github.com/elementary-data/dbt-data-reliability/blob/e1e7cf05cb631c4ce00542f833fc9dc2b083686f/macros/utils/graph/get_model_database_and_schema.sql
Possible behavior
Default
If destination database and schema are not specified, the detination database can be the database of a profile and the destination schema can be elementary by default.
- https://docs.getdbt.com/reference/dbt-jinja-functions/target
Specified
If the destination database for elementary is specified with something like elementary_artifacts_database as a dbt variable, it is set. And if the destination schema is specified with something like elementary_artifacts_schema as a dbt variable, it is used.
Thanks for opening it @yu-iskw ! see my comment in the original issue here