If a judge of a court of record in any state which by its laws has made provisions commanding persons within that state to attend and testify in this state, certifies under the seal of such court that there is a criminal prosecution pending in that court, or that a grand jury investigation has commenced or is about to commence, that a person in this state is a material witness in such prosecution or grand jury investigation, and that his presence will be required for a specified number of days, a South Dakota circuit judge of the county in which such person is, shall, upon presentation of such certificate, fix a time and place for a hearing, and shall make an order directing the witness to appear at the hearing.
SDCL 23A-14-15