Import File Dialog
In the Import File dialog, you can specify import settings for formats with delimiter-separated values. You can use the predefined templates or create a new one.
When you change import settings, the import preview changes correspondingly.
|Formats||Select a template that successfully converts the file data into a table. You can change settings of predefined templates or add a new template. To add a template, press Add Format button (). |
To save changes, click the Save icon and select one of the following options:
|Value separator||Select or type the character that you want to use as a separator for values.|
|Row separator||Select or type the character that you want to use as a separator for rows.|
|Null value text|| Select or type the text that you want to use if a cell contains the |
|Add row prefix/suffix||Click the link and type a row prefix and suffix. Prefix and suffix are character sequences which in addition to the row separator indicate the beginning and end of a row.|
Each line in the area under Quotation is a quotation pattern (see Quote values). A quotation pattern includes:
If there is more than one pattern, the first pattern is used.
Use ,, and to create, delete and reorder the patterns.
Select when you want to enclose values within quotation characters.
|Trim whitespaces||Ignore or remove whitespace characters. If this checkbox is cleared, the whitespace characters are treated as parts of the corresponding values.|
|First row is header||Treat the first row as a row that contains column names.|
|First column is header||Treat the first column as a column that contains row names.|
Table name, structure and data mappings
|Table||The name of the table.|
|Comment||The table comment.|
|Columns / Keys / Indexes / Foreign Keys|
Data mappings and definitions of columns, keys, and indexes. Double-click the line to start editing.
The Mapped to field specifies relation of a data column from the file and the corresponding column in the database. If you clear this field, no data is added to the target column in the database.
To remove a column, select the corresponding line and click the Remove button .
Data and DDL previews
|Data preview||The generated preview of how your data will be imported to the database.|
|DDL preview||A statement or statements that PyCharm will run to create a table. You can edit the statements in the DDL preview field.|
Encoding, errors, and logs
|Encoding||Select the character encoding for your data in the source file.|
|Write errors to file||Write errors that occur during the import in a text file.|
|Insert inconvertible values as null||Insert the |