Create new table
The Data Loader has an option to dynamically create the table being loaded. You select this by checking the Create new table checkbox (which is on the right of the table name).
When this option is selected, AQT will create the target table at the start of the load process. The definition AQT uses for the target table will be based on the source for the load:
- when the source table is a table or query, AQT will get the column definitions from the table / query columns
- your source can be in a different database type; in this case AQT will convert the column definitions from data types used in the source database to the data types used in the target database.
- if your source is either a file or Excel worksheet, AQT will parse the data and attempt to automatically determine the data types of the columns being loaded. AQT will parse 1000 lines (if it is a file) or 100 lines (if it is an Excel worksheet) - this may take a few seconds. Determining the data types is a difficult thing to do and AQT may not get this right! It is recommended that you review the table definition before it is created to ensure that the table definition is correct.
Options
When this option is checked, you can also select a number of options (on the Options tab)
- Review SQL before creating. When this is checked, you have a chance the review (and amend) the Create Table statement before it is run.
- Drop Table before creating. When this is checked, AQT will drop and create the table.
- Tablespace. The tablespace the table will be created in. Only used for Oracle and DB2.
Update Mode
The Create new table option cannot be specified when the load is running in Update mode.