File Import to MDB Extender¶
- Table of contents
- File Import to MDB Extender
Function¶
This extender is designed for importing media items list from files to DJin Media Database. It allows for import of files of Excel and CSV format (.xlsx and.csv, respectively).
Functionality:
- you can specify whether or not you wish to create a new item in the database if the item is not found;
- you can match columns from file with fields of media item that will be updated or created in the database;
- you can choose encoding type that will be used to read data from file (in case of import, from CSV file);
- you can abort the process of file import;
- you can save / load preset file with user defined settings;
- you can load the latest version of settings specified by the user;
- you can preview imported data before importing;
- you can save a report in \SYSTEM\ImportToMdb\ folder with information about updated items, skipped items and newly created items.
Supported Attributes
Artists
Authors
Categories
CDId
CDTrackId
Comment
DbId
DDB_ID
DDB_Owner
Energy
FadeIn
FadeOut
FileName
FirstReportLine
FullMediaId
Gain
IdInScheduleBlock
IdNumber
LastReportLine
LcCode
MaxLvl
Name
OwnerName
Publisher
RadioID
Rds
RemoteCmd
SamplingFrequency
StartNext
TextureEnd
TextureStart
Vocal
Plus all additional user attributes.
Features¶
Selecting a File¶
In the "File settings" section, you can specify parameters of file from which data will be read for further import to media base. There are two options: Excel file with .xlsx extension and Csv file with.csv extension. For csv files, you can choose encoding type that will be used to read data and separator (symbol used in csv files to separate columns).
> Important note! The file selected for import SHOULD NOT BE OPENED in Excel, otherwise it will be impossible to read it.
Configuring fields¶
In the fields settings section columns with data from file are matched with fields of media item that will be imported.
First, you must select default type of media item and a minimal set of fields for import by which the item will be identified. To perform matching, click on "Add column". A line with a number of columns in the file and the name of media item property will be displayed. This is where information from specified column in the file will be added.
To update media item in the database the file must have a column containing DbId or IdNumber fields. If you don’t specify these, all imported items will be seen as new.
If there is no need to import data from column of specified number, select <> from the dropdown list.
The first line of a file usually contains names of columns that do not need to be imported. In this case, you need to enable the "Ignore first row in file" option.
To create new items in the database, enable the "Create an element if it is not in the database" option.
After configuring matching of fields you can check if data can be read from specified file. To do this, click on "Preview". If the file is read correctly, you will see data from the file according to field settings in the preview table.
Import¶
After you make sure you have configured the settings correctly, you may click on "Import". You will see a window with import progress indicator and a stop button.
After the import is complete, you will see a window containing information as to how many items were updated, how many were created and how many were skipped.
Working with Presets¶
If you wish to save current settings to a file for later loading, you can use "Load preset" and "Save preset" buttons. During the process, all current fields and checks are saved.
Configuration of Window Plug-In¶
To configure the component as a window plug-in, add the following line to the .vid file:
CREATE_NET_WND_PLUGIN importFileToMdb Extenders\MdbImportFromFileExtender.dll MdbImportFromFileExtender.MdbImportFromfileExtenderClass
Here is an example of a section of .vid file:
...
CREATE_NET_WND_PLUGIN importFileToMdb Extenders\MdbImportFromFileExtender.dll MdbImportFromFileExtender.MdbImportFromfileExtenderClass
SET_VIEW_SINGLE_OBJ VIEW_S1 OBJID_TIME1
SET_VIEW_SINGLE_OBJ VIEW_S5 OBJID_MSG1
SET_VIEW_SINGLE_OBJ VIEW_S2 OBJID_INFO1
SET_VIEW_SINGLE_OBJ VIEW_S3 OBJID_PLAY_X1
//SET_VIEW_SINGLE_OBJ VIEW_S7 OBJID_FSK2
SET_VIEW_TAB_OBJ VIEW_T1 OBJID_MAP1 NAME_MAP
SET_VIEW_TAB_OBJ VIEW_T1 OBJID_BROW1 NAME_BROW
SET_VIEW_TAB_OBJ VIEW_T1 importFileToMdb NAME_importFileToMdb
...