Fetched the input data from DB while building the model.