eBiss 3

Hilfe & Dokumentation

User Tools

Site Tools


Sidebar

en:howtos:dbadapter:start

HowTo - database integration (DB adapter)

The database adapter allows the direct integration of eBiss with a database.

Access

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:

  1. eBiss.DbAdapter.StandardReader as BackendType and (note with an eBiss version before 3.5.237 1) )
  2. then select the type 'eBiss.TypeLib.DbAdapter.SimpleSample' under DocumentTypeName.

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:

  • StandardTemplates\DBAdapter\MS-SQL\Integrated Security

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 of messages

Splitting messages according to a field value is achieved by setting the attributes

  • GroupBy and
  • MapFrameInterchangeReference

on the desired field.

Overview

Process automation

See here Backend Integration how to create the job step

DB Adapter Attributes

Use following attributes of the DB Adapter to configure your plugin: Data type attributes.

Example of JOIN Attribute

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;
    }
1)
note with an eBiss version before 3.5.237 (14.1.21) it was nnecessary to reselect the job step once
2)
An activation from the trace over the variable eBiss.DbAdapter.TraceSql takes place with the True
en/howtos/dbadapter/start.txt · Last modified: 2024/02/20 08:15 by 127.0.0.1