It’s not possible for DAML code to directly refer to data that is not either in a choice argument or stored in an active contract.
@bernhard has gone into some detail on patterns for dealing with off-chain data elsewhere on the forum. I suggest checking whether your use case can be fit to some of the techniques described there.