Added code to determine the schema, create the table, and load the data