Relative Humidity Sensor with M8 Connector - Connect straight to Arduino?
Since the sensor outputs an analog voltage and not a high frequency signal, EMI is not a major concern. And since the sensor can be configured to output 0-5V, then connecting it directly to the Arduino should work just fine.

In general, the type of connector is of lower concern than ensuring that the voltages are compatible. This sensor simply requires four wires, and it doesn't matter what type of connector they are housed in.