Suppose a product has five attributes. If you want to update one of the attributes, do you have to reference all existing attributes? Or will Magento remove attributes from the item if the attributes are not present in the array when you update the one attribute you are working with?
No. If you update only 1 attribute other will remain as it is.
For example: your product has attribute color and size.
- Color : black
- Size :small
If you update attribute color. Size will remian same.
If you pass attribute in array without value. it will remove selected option and will show blank.
This will be in all cases . Programmatically, import csv, and edit from admin.