<@U088WCP3B4P> I configured my dimension_anomalies...
# ask-elementary-ai
l
@kapa.ai I configured my dimension_anomalies test like this. - name: sto description: Zugstandortmeldungen (UIC-2806) config: elementary: timestamp_column: 'created' data_tests: - elementary.dimension_anomalies: dimensions: - zugstandortmeldungstyp meta: description: "Dieser Test detektiert Anomalien in der Verteilung der Zugstandortmeldungstypen. Dieser Test ist ein dbt-elementary Test (https://docs.elementary-data.com/data-tests/)" And i am getting the error that table or view is not found and i cannot understand why
k
A message from kapa.ai
I can see you're having an issue with your
dimension_anomalies
test configuration. Based on the error you're getting, there might be a few issues with your configuration. Looking at your configuration, I notice a potential issue with the structure. In Elementary Data, tests should be configured under
tests
rather than
data_tests
. This is a common mistake that can lead to the "table or view not found" error. Here's how your configuration should be structured:
Copy code
yaml - name: sto   description: Zugstandortmeldungen (UIC-2806)   config:     elementary:       timestamp_column: 'created'   tests:     - elementary.dimension_anomalies:         dimensions:           - zugstandortmeldungstyp         meta:           description: "Dieser Test detektiert Anomalien in der Verteilung der Zugstandortmeldungstypen. Dieser Test ist ein dbt-elementary Test (<https://docs.elementary-data.com/data-tests/>)"
Notice the change from
data_tests
to
tests
. This is the correct syntax according to the [Elementary documentation on dimension_anomalies](https://docs.elementary-data.com/data-tests/anomaly-detection-tests/dimension-anomalies). Additionally, there have been some reported issues with dimension_anomalies tests in certain environments. For example, some users have experienced problems with Unity Catalog on Databricks, as mentioned in a [community discussion](https://slack.com/archives/C02CTC89LAX/p1683345710056999). If you're still experiencing issues after making this change, you might want to check: 1. If you have run
dbt run --select elementary
to create the necessary tables 2. If your permissions are set correctly (this can sometimes cause "table not found" errors) 3. If you're using the correct profile and target in your command I hope this helps resolve your issue!
l
@kapa.ai <!subteam^S08HYBWCF6E> It still do not work with tests: How can I fix this ?
k
A message from kapa.ai
I understand you're still having issues with your dimension_anomalies test even after changing from
data_tests
to
tests
. Based on the knowledge sources, there's a known bug with dimension_anomalies tests that might be affecting your configuration. According to a GitHub issue and several Slack discussions, there's a documented bug where dimension_anomalies tests don't properly save configurations and don't pick up the timestamp_column from the model level configuration: > "We actually have an open bug on this issue - https://github.com/elementary-data/elementary/issues/1170" [Slack forum](https://slack.com/archives/C02CTC89LAX/p1695304793355929) Here are some potential fixes: 1. Explicitly define the timestamp_column at the test level: Even though you've defined it at the model level, try adding it directly to the test configuration:
Copy code
yaml    - name: sto      description: Zugstandortmeldungen (UIC-2806)      config:        elementary:          timestamp_column: 'created'      tests:        - elementary.dimension_anomalies:            timestamp_column: 'created'  # Add it here explicitly            dimensions:              - zugstandortmeldungstyp            meta:              description: "Dieser Test detektiert Anomalien in der Verteilung der Zugstandortmeldungstypen."
2. Check your dimensions format: Make sure your dimensions are properly formatted as a list. One user had an issue because they wrote:
Copy code
dimensions: "column_name"
instead of:
Copy code
dimensions:      - column_name
[Slack forum](https://slack.com/archives/C02CTC89LAX/p1699977181538869) 3. Add training_period configuration: Some users found that adding training_period helped:
Copy code
yaml    training_period:      period: day      count: 14
4. Check for syntax errors: Make sure there are no unexpected characters or spaces in your YAML configuration. If you're still experiencing issues, it might be helpful to check the full error message in your logs to get more specific information about what's causing the "table or view not found" error. Let me know if any of these suggestions help resolve your issue! [Slack forum](https://slack.com/archives/C02CTC89LAX/p1695304793355929)
n
Hey @Luiza Cunha Preußler! Was this helpful? 🙂
l
No, it is still not working
👀 1
n
Let's solve this in the second thread 🙂