great_expectations
great_expectations copied to clipboard
expect_column_values_to_of_type does not work
Describe the bug I am trying to use expect_column_values_to_be_of_type to verify the type of my datasource (from big query tables) using this expectation from the gallery .https://greatexpectations.io/expectations/expect_column_values_to_be_of_type
my syntaxe {
"expectation_type": "expect_column_values_to_be_of_type",
"kwargs": {
"column": "date_debut",
"type_": "DATE",
"mostly": 1.0
},
"meta": {}
},
I tried with different type but always got the same error below
expect_column_values_to_be_of_type raised an exception:
'type'[Show exception traceback...](https://ofr-bdf-lab-great-expect-prd.ey.r.appspot.com/validations/etask_otomate_189_expectation/20220722-115505-etask-otomate-189/20220722T115505.005936Z/03fd1fdc4deef8a2a0d630010f56b127.html#section-6-content-block-2-cell-1-2-content-2-collapse-body-0297dd0d-f50c-4184-acb4-6bcf350923e9)
Traceback (most recent call last):
File "C:\Applications\Python\venv\lib\site-packages\great_expectations\validator\validator.py", line 979, in graph_validate
result = configuration.metrics_validate(
File "C:\Applications\Python\venv\lib\site-packages\great_expectations\core\expectation_configuration.py", line 1371, in metrics_validate
return expectation_impl(self).metrics_validate(
File "C:\Applications\Python\venv\lib\site-packages\great_expectations\expectations\expectation.py", line 706, in metrics_validate
] = self._validate(
File "C:\Applications\Python\venv\lib\site-packages\great_expectations\expectations\core\expect_column_values_to_be_of_type.py", line 522, in _validate
actual_column_type = [
File "C:\Applications\Python\venv\lib\site-packages\great_expectations\expectations\core\expect_column_values_to_be_of_type.py", line 523, in
type_dict["type"]
KeyError: 'type'
Expected behavior I expect it to verify the type of my column
Environment (please complete the following information):
- Operating System: [Windows]
- Great Expectations Version: [0.15.9]
While exmaninated the column_values_to_be_of_type metric on the the folder site-packages\great_expectations\expectations\metrics i didn't see any definition of def _sqlalchemy(cls, column, _dialect, **kwargs could this be the problem ?
Howdy @syrineMH 👋 thanks for raising this with us 🙇
We'll bring this up with the team. We may need to reach back out if we need anything further in doing so. Thank you very much 🔬
The same issue is with the expect_column_values_to_be_in_type_list
expectations
version 0.15.26
same issue with redshift+psycopg2