Best approach to get data from db in provision script

Hi,

I am trying to fetch data from db to provision script. However, because of async nature of call, it does not return anything in provision script.

Can somebody help here on how to fetch data from db in provision script?