Expect_column_value_lengths_to_be_between: ERROR SQLSTATE 42704

I am trying to run the expectation in Azure Databricks environmment:
validator.expect_column_value_lengths_to_be_between(column=“public_remarks”, min_value=1, max_value=2000, result_format={“result_format”: “COMPLETE”})
and although the column=“public_remarks” is of string format it raises the error

MetricResolutionError: [CANNOT_RESOLVE_DATAFRAME_COLUMN] Cannot resolve dataframe column “public_remarks”. It’s probably because of illegal references like df1.select(df2.col("a")). SQLSTATE: 42704

What can be wrong?

Hi @kat, thanks for your question!

It is difficult to tell based just on the error, could you please provide some more information to help diagnose the issue?:

  • The version of GX you are running
  • Your GX workflow code that generates this error
  • How are you creating the dataframe that you are trying to validate?