Hi team i am trying to use `schema changes from ba...
# community-support
c
Hi team i am trying to use
schema changes from baeline
with
generate_schema_baseline_test
the schema is properly autogenerated but i get this error: using enforce_types = TRUE dbt 1.3, elementary 0.8.2 is this a known issue?
Copy code
Elementary: Warning - missing data types for columns:
e
Hi @christoph Nang, do you get this error when you try to generate the schema or when you try to run the test?
c
Hi @Ella Katz i get the error when i try to run the test. The schemas are being generated according to the ones in Snowflake
e
and do all columns have data types?
c
yes! this is an example from the logs:
Copy code
'dbt clean && \\\ndbt deps && \\\ndbt run --select elementary && \\ \ndbt run-operation elementary.generate_schema_baseline_test --args \'{"enforce_types": true}\' && \\\ndbt test --profiles-dir my_dir
result:
Copy code
sources:
   - name: my_model
     tables:
   - name: my_table
     columns:
      - name: col1
         data_type: VARCHAR
 
       - name: col2
         data_type: VARCHAR

       - name: col3
         data_type: VARCHAR
 
       - name: col4
       data_type: VARCHAR
tests:
   - elementary.schema_changes_from_baseline:
        enforce_types: true
e
Hi @christoph Nang, Looking at your yml file again I see there are indentation issues, probably making the test fail. I found a github issue that might be related and a contribution trying to fix it. You can fix the indentations yourself so that the file will look like this:
Copy code
sources:
   - name: my_model
     tables:
       - name: my_table
         columns:
           - name: col1
             data_type: VARCHAR
 
           - name: col2
             data_type: VARCHAR

           - name: col3
             data_type: VARCHAR
 
           - name: col4
             data_type: VARCHAR
tests:
   - elementary.schema_changes_from_baseline:
        enforce_types: true
If you like, you can try testing the contribution as well.
thankyou 1
👀 1