script to copy specific query dataset to local database.