The database adapter allows the direct integration of eBiss with a database.
As a start, data from a simple and flat table 'DbAdapterTest' is to be read here.
You define the necessary structure for reading the table 'DbAdapterTest' in Type libraries (or in the .Net code) as described in A simple class structure and create the DLL, preferably also directly in the type editor.
In eBiss use the JobStep BackendObjectRetrieverEx and select:
Define the variables Database Connection String in the job step or at the system partner. Examples for the variables can be found in the eBiss installation directory e.g. for the SQL-Server under:
Or you define the variables with the same name at the job step 2), s.a. DB Adapter - variables .
That's it, run the job and the data is in eBiss. Further examples e.g., filter by date, write a read marker, etc. follow.
Splitting messages according to a field value is achieved by setting the attributes
on the desired field.
See here Backend Integration how to create the job step
Use following attributes of the DB Adapter to configure your plugin: Data type attributes.
If, for example, you want to add information from a second table in the DbAdapter to each position, this can lead to quite a few individual selects. In the case of a customer, 4 condition records are added to each PRICAT position, resulting in 82000 selects for a PRICAT.
With the join attribute, it is possible to bypass an additional Select and access the data directly. You can also apply this join attribute more than once and thus include several foreign values directly with the join in the current data record. This has a positive effect on performance.
Example: The second join is executed with the alias „JT“. Below, the JoinFieldContent field refers to the first join, and the DoubleJoinFieldContent field refers to the second join.
[Join("JoinTable", "JoinTable.Id = HeaderTable.[Key]")] [Join("JoinTable", "JoinTable.Id = HeaderTable.[Key]", Alias = "JT2")] public class HeaderRecord : IMapObjectItem { [PrimaryKey(PrimaryKeyType.Counter, "Counters", "Name = 'HeaderTable' and @Name = @Name ", "Current_Val")] [MapFrameDocumentNumber] [ReadMarker(ReadMarkerType.StatusTable, "StatusTable", true)] public int Key; public string Name; [ReadMarker(ReadMarkerType.CheckUpdate, 0, 1)] public decimal TestDecimal; [ReadMarker(ReadMarkerType.Timestamp), Where("< $LastExecutionStartDate")] public DateTime ReadTimestamp = new DateTime(1900, 1, 1); [MapExternalName("JoinTable.JoinFieldContent")] public string JoinFieldContent; [MapExternalName("JT2.JoinFieldContent")] public string DoubleJoinFieldContent; public DateTime? NullableDateTimeTest; [MapListType(typeof(DetailRecord)), MapExternalName("DetailTable")] public ArrayList Details; }