dǎ​gǒu​hái​děi​kàn​zhǔ​rén

to consider someone's connections before acting

打狗还得看主人 打狗還得看主人 dǎ​gǒu​hái​děi​kàn​zhǔ​rén
to consider someone's connections before acting
Literally "to beat a dog, one must first look at its master"; used as a metaphor meaning that before you punish or offend someone, you should consider how it might affect or anger their more powerful associates.