filename
String attribute that specifies the import file name.
Name of the file to be imported. Filename must have one of the following file extensions: sql, csv or xml.
- Note
- Case sensitivity is important!
File Extension | Description |
---|---|
* .csv |
Comma-delimited (CSV) file. The contents of this file will be for one table only. |
* .xml |
RaimaDB XML import format file. The contents of this file will be for one table only. |
* .sql |
RaimaDB SQL import format file. The file can contain INSERT statements for all tables. It can also include schema definitions as well as trigger declarations. |
- CSV / XML Import File Comments
- For CSV and XML import files, filename is assumed to be in
'dbname_tablename
.[csv|xml]' format where dbname is the name of the target database and tablename is the name of the target table. The dbname portion of the file specification is ignored by the rdm_dbImport() function as the target database is already opened. The tablename will be the default table target used for the import. The target table can be set using the table option if the table name is different or does not appear in the file specification.
- SQL Import File Comments
- The SQL import file may include a schema definition, stored procedures and triggers. If it does, rdm_dbImport() attempts to create a new database and stored procedures / triggers based on the definition before processing the INSERT statements.
- XML Import File Comments
- For XML imports the XML document must be in the format supported be the RaimaDB engine. The RaimaDB rdm_dbExport() API will create an XML document that is in the correct format for rdm_dbImport(). See the documentation on the XML format for full details.