When a witness fails to attend in obedience to a subpoena, except in case of a demand and failure to pay his fees, the court or officer before whom his attendance is required may issue an attachment to the sheriff, coroner, or constable of the county, commanding him to arrest and bring the person therein named before the court or officer, at a time and place to be fixed in the attachment, to give his testimony and answer for the contempt.
SDCL 19-5-8