Collect Native Platform Call Data

Invantive SQL real-time transports massive amounts of data contained between over 70 (cloud) platforms and user applications such as Excel, Word, Power BI, technical products such as Query Tool and server products such as Data Replicator, Data Access Point or Bridge Online.

This article helps you understand how to collect the data being transported between the Invantive SQL engine and the (cloud) platforms. This knowledge is essential when it is unclear what component(s) are causing a data integrity problems such as missing data, duplicate data or incorrect data.

Applicable Releases

Log native calls to trace has been available since release 17.32. Log native calls to disk is available starting release 20.1.44 and 20.2.0. Differentiated logging of native calls on error and success and limited in duration and number of events logged is available starting 20.2.42.

Instructions

All Invantive SQL connectors have two settings available to log the requests and responses upon these communicated by Invantive SQL to the platform:

  • log-native-calls-to-trace: send request and response data to the Windows trace, which can be read using tools such as DbgView or collected on disk using Invantive’s trace configuration options.
  • log-native-calls-to-disk: send request and response data to disk as plain text files.

These connector attribute names have been available since release 20.1.44 BETA. Log-native-calls-to-trace can also be set using the trace-native-calls option on release 17.32 and later.

Execute the following steps to run a number of queries on a database and collect the actual requests and responses:

  • Start Query Tool.
  • Log on to a database with one or multiple data containers.
  • Enable log collection by setting either or both log-native-calls-to-trace and log-native-calls-to-disk to true.
  • Start dbgview if logging to trace.
  • Run a query.
  • Collect the contents of dbgview or the disk folder and send them to the party requesting them such as the API support of the platform.

Example

In the following sample, a distributed database with Oracle with Invantive Vision, Exact Online and ActiveCampaign is opened and a number of requests are collected.

The following code is used:

--
-- Choose multiple Exact Online companies.
--
use all@eol

--
-- Enable logging to disk in the default 
-- folder %USERPROFILE%\invantive\nativelog.
-- Change the folder using the environment 
-- variable INVANTIVE_CONFIGURATION_NATIVE_LOG_FOLDER.
--
set log-native-calls-to-disk@eol true

set log-native-calls-to-disk@ac true

set log-native-calls-to-disk@ora true

--
-- Run an Oracle query, an Exact Online query
-- and an ActiveCampaign query.
--
select * from bubs_gebruikers_v@ora limit 10

select * from exactonlinerest..journals@eol

select * from campaigns@ac limit 10

Visually:

The contents of the folder %USERPROFILE%\Invantive\NativeLog are the last statement completes is:

The file names are composed of the prefix ‘native’, a time stamp when the connector instance was opened, the data container ID, the optional alias, the name of the connector and a sequence number incrementing per connector instance.

Oracle

The Oracle request log looks like this:

Outbound Execute statement on database started at 2020-05-24 11:58:09 (UTC): 
select * from QBUBS.BUBS_GEBRUIKERS_V e

and includes the direction of the request (outbound), a short description and a timestamp, together with the SQL statement sent in Oracle SQL syntax.

Exact Online

The Exact Online files include both a number of non-visible requests on ReportingBalance to collect statistics on the data volume of the company and the a requests for the journals on every selected company:

Inbound https://start.exactonline.nl/api/v1/39304/financial/Journals?$select=* GET started at 2020-05-24 11:58:15 (UTC): 
{
"d" : {
"results": [
{
"__metadata": {
"uri": "https://start.exactonline.nl/api/v1/39304/financial/Journals(guid'cea3d391-c460-4a71-82b4-6c91a68a4afb')"
, "type": "Exact.Web.Api.Models.Journal"
}
, "AllowVariableCurrency": false
, "AllowVariableExchangeRate": false
, "AllowVAT": false
, "AutoSave": false
, "Bank": null
, "BankAccountBICCode": null
...
}, ...

ActiveCampaign

The ActiveCampaign file contains a request on the instance:

Inbound https://acme.api-us1.com/api/3/campaigns?limit=100 GET started at 2020-05-24 11:58:31 (UTC): 
{"campaigns":[{"type":"single"
,"userid":"1"
,"segmentid":"0"
,"bounceid":"-1"
,"realcid":"0"
...

Differentiated Logging

Starting release 20.2.42, there are a number of new options available to reduce the amount of native calls collected:

  • log-native-calls-to-disk-on-error: Registers native calls to data container backend as disk files when an error occurred. Defaults to false.
  • log-native-calls-to-disk-on-success: Registers native calls to data container backend as disk files when successful. Defaults to false.
  • log-native-calls-to-disk-max-events: Maximum number of events to register from last activation. Defaults to unlimited.
  • log-native-calls-to-disk-max-seconds: Maximum number of seconds to register from last activation. Defaults to unlimited.

Huge Volumes

Starting release 20.2.72, new facilities ease querying millions of calls. The storage format has been changed to use NDJSON instead of plain text.

Please refer to Analyzing large volumes of native call logs on cloud platform APIs:

AFAS Data Replicatie error (-2147180999: Unexpected backend error.)
Itgenaoe027: AFAS geeft "unexpected backend error" bij profit_debtor_invoices en andere GetConnectoren
ExactOnlineXML.XML.EmploymentSalaries niet meer beschikbaar (itgenexl111)
AFAS GetConnector geeft "Invalid Index Field"
Dependent fields veld waarden in Freshdesk
Itgenclr078: Newtonsoft.Json.JsonReaderException / zorgen stabiliteit Exact Online
Itgenpio001 error bij aanmaken Yuki database op Invantive Cloud
Optimalisatie API calls zoals met Exact Online
API-calls loggen in NDJSON formaat voor bijvoorbeeld Elasticsearch
AFAS - Traag ophalen van data
Deal_items Teamleader V1: item_subtitle
Grote verschillen tussen V1 en V2 Timetracking Teamleader
Filteren op velden uit de Twinfield API
Easyflex Data validatie ds_bi_declaratieregels
Teamleader User External Price on Project (Teamleader V1 API)
Waar vind ik de Teamleader V1 API documentatie?
Teamleader Customfieldsbyproject error (400); Ongeldige opdracht
What API calls did Invantive UniversalSQL actually perform?
Massaal testen welke Twinfield administraties een error geven bij General Ledger Details V3
Itgendhb212: After parsing a value an unexpected character was encountered: {. Path 'value[149]', line 1, position 130612
Analyzing large volumes of native call logs on cloud platform APIs
Itgenrst007: The metadata of the columns 'CODE' of table '' specifies that null values should not appear, but there is a null value in row #1
Hoe vind ik %USERPROFILE%\invantive?
Dubbele waarden in loket PayrollRunPayslipTypeComponents?
Teamleader geeft 500 error bij ophalen Invoice-data (backend error itgenoda035)
Error itgenoda483 on purchase order lines query
Report Exact Online Support Questions
Exact Online - ExactOnlineXML.XML.GLAccountTranslations - Lege omschrijving bij grootboekrekening
DataSource.Error: OData: Request failed: The remote server returned an error: (500) Internal Server Error. itgenaoe027
Tabel uit AFAS heeft soms geen data
An error occured - 7b81696d-9da9-45e7-a193-beafd021787d itgensgr140: A duplicate of a previous row was found as row #12 on VismaNet.JournalTransactionV2.JournalTransactionsByPeriodOrDateV2. (820248550)
Wijzigen taal databasetabel Exact Online grootboekrekeningen
Onjuist (ruwe) data
Itgenoda359 en itgenclr217 fout bij inlezen Teamleader.V2.Materials
Itgenoda035 Twinfield.GeneralLedgerIntercompanyV2 error
ExactOnlineREST.Payroll.PayrollTransactions blijft leeg
Gegevens van Exact Online API calls inzien
Invoices 2020 bevat niet alle projectgegevens in deel records op Simplicate
Twinfield BudgetByProfitAndLoss: Gegevens op hoofdniveau zijn ongeldig
Welke API calls heeft Invantive UniversalSQL daadwerkelijk uitgevoerd?