Illustrated below is a flow where the Record Generator is the source.
The output of the Record Generator is in the below image. Highlighted are whitespaces in a field.
To reference a field with whitespaces in a Caluclator step,
input.record["fieldName"] is used as shown in the below image.
The output is the below image.