Extract data from Teradata