hello there - I'm trying to set up the `elementary...
# community-support
c
hello there - I'm trying to set up the
elementary.schema_changes_from_baseline:
Here's my setup:
Copy code
version: 2

models:
  - name: dim_employee
    tests:
     - elementary.schema_changes_from_baseline
    columns:
      - name: EMPLOYEE_PK
        data_type: NUMBER
        tests:
          - dbt_expectations.expect_column_to_exist
but when running the dbt test command I get the following error:
Copy code
Database Error in test elementary_schema_changes_from_baseline_dim_employee_ (models\...\schema_dim_employee.yml)
  001003 (42000): SQL compilation error:
  syntax error line 1,640 at position 1 unexpected 'as'.
  syntax error line 1,641 at position 17 unexpected '('.
  syntax error line 1,641 at position 18 unexpected 'database_name'.
  syntax error line 1,641 at position 98 unexpected 'as'.
  syntax error line 1,642 at position 27 unexpected ','.
  syntax error line 1,643 at position 23 unexpected ','.
  syntax error line 1,644 at position 21 unexpected ','.
  syntax error line 1,645 at position 18 unexpected ','.
  syntax error line 1,647 at position 8 unexpected 'from'.
  syntax error line 1,648 at position 19 unexpected '2'.
  syntax error line 1,648 at position 21 unexpected '3'.
  syntax error line 1,648 at position 23 unexpected '4'.
  syntax error line 1,648 at position 25 unexpected '5'.
  syntax error line 1,648 at position 27 unexpected '6'.
  syntax error line 1,648 at position 29 unexpected '7'.
  syntax error line 1,659 at position 33 unexpected ')'.
I looked at logs but dont understand where this comes from/ Am I missing something in config or any other ideas?
✅ 1
After some serious debugging found out that elementary was using a macro called get_columns_snapshot_query > elementary.generate_surrogate_key > that was in turn using the hash macro. Our has macro had been modified therefore those errors. Solved by deleting old hash macro.