Transforms data from Oracle DB to select statement