Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/url/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Exact online 将总账交易批量加载到精确在线_Exact Online_Invantive Sql - Fatal编程技术网

Exact online 将总账交易批量加载到精确在线

Exact online 将总账交易批量加载到精确在线,exact-online,invantive-sql,Exact Online,Invantive Sql,出于性能测试的原因,我想将许多总账交易加载到精确的在线数据库中。我在使用OAuth进行身份验证后,通过发布事务,将RESTAPI用于事务及其行 然而,这是相当缓慢的,它涉及到大量的网络往返。我需要加载180.000个事务行。有没有其他方法可以将数据批量加载到Exact Online中?将数据批量加载到Exact Online中的最佳方法是使用XML API。您可以在验证后使用HTTP POST,也可以使用如下脚本。请更改要加载的事务数和每个事务的行数的变量: local remark Speci

出于性能测试的原因,我想将许多总账交易加载到精确的在线数据库中。我在使用OAuth进行身份验证后,通过发布事务,将RESTAPI用于事务及其行


然而,这是相当缓慢的,它涉及到大量的网络往返。我需要加载180.000个事务行。有没有其他方法可以将数据批量加载到Exact Online中?

将数据批量加载到Exact Online中的最佳方法是使用XML API。您可以在验证后使用HTTP POST,也可以使用如下脚本。请更改要加载的事务数和每个事务的行数的变量:

local remark Specify the division code here:

local define DIVISION_CODE "868035"

local remark Originating General Ledger account:

local define GL_ACT_CODE_FROM "8000"

local remark Target General Ledger account:

local define GL_ACT_CODE_TO "8001"

local remark Journal

local define JOURNAL_CODE "90"

local remark Number of GL entries to generate:

local define CNT_TXN_HEADERS "5"

local remark Number of lines per GL entry:

local define CNT_TXN_LINES "50"

use ${DIVISION_CODE}

create or replace table settings@inmemorystorage
as
select '<?xml version="1.0" encoding="utf-8"?>'
       || chr(13)
       || '<eExact xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="eExact-XML.xsd">'
       fileprefix
,      chr(13)
       || '</eExact>'
       filepostfix
from   dual@datadictionary

insert into UploadXMLTopics
( topic
, payload
, division_code
, orig_system_reference
)
select 'GLTransactions' topic
,      stg.fileprefix
       || chr(13)
       || '<GLTransactions>'
       || xml
       || chr(13)
       || '</GLTransactions>'
       || stg.filepostfix
       filecontents
,      '${DIVISION_CODE}' division_code
,      'GLTransactions\SAMPLE.xml'
       filename
from   ( select listagg
                ( chr(13)
                  || '<GLTransaction>'
                  || chr(13)
                  || '<Journal code="'
                  || txn_journalcode
                  || '" />'
                  || chr(13)
                  || '<Date>'
                  || substr(xmlencode(trunc(sysdate)), 1, 10)
                  || '</Date>'
                  || chr(13)
                  || xmlsource
                  || chr(13)
                  || xmltarget
                  || chr(13)
                  || '</GLTransaction>'
                  , ''
                  ) xml
          from    ( select trunc(sysdate) txn_date
                    ,      '${JOURNAL_CODE}' txn_journalcode
                    ,      listagg
                           ( chr(13)
                             || '<GLTransactionLine line="'
                             || id
                             || '" >'
                             || chr(13)
                             || '<Date>'
                             || substr(xmlencode(trunc(sysdate)), 1, 10)
                             || '</Date>'
                             || chr(13)
                             || '<GLAccount code="'
                             || xmlencode('${GL_ACT_CODE_FROM}')
                             || '" />'
                             || chr(13)
                             || '<Description>'
                             || xmlencode('Transaction offset #' || id)
                             || '</Description>'
                             || '<Amount>'
                             || '<Currency code="EUR" />'
                             || '<Value>'
                             || -1
                             || '</Value>'
                             || '</Amount>'
                             || chr(13)
                             || '</GLTransactionLine>'
                             , ''
                           )
                           xmlsource
                    ,      listagg
                           ( chr(13)
                             || '<GLTransactionLine line="'
                             || id
                             || '" >'
                             || chr(13)
                             || '<Date>'
                             || substr(xmlencode(trunc(sysdate)), 1, 10)
                             || '</Date>'
                             || chr(13)
                             || '<GLAccount code="'
                             || xmlencode('${GL_ACT_CODE_TO}')
                             || '" />'
                             || '<Description>'
                             || xmlencode('Transaction #' || id)
                             || '</Description>'
                             || chr(13)
                             || '<Amount>'
                             || '<Currency code="EUR" />'
                             || '<Value>'
                             || 1
                             || '</Value>'
                             || '</Amount>'
                             || chr(13)
                             || '</GLTransactionLine>'
                             , ''
                           )
                           xmltarget
                    from   range(${CNT_TXN_LINES})@datadictionary txnlines
                    group
                    by     txn_date
                    ,      txn_journalcode
                    )
         join  range(${CNT_TXN_HEADERS})@datadictionary txnheaders
       )
join   settings@inmemorystorage stg
on     1=1
where  xml is not null

local remark Check outcome:

select * from UploadXMLTopics
XMLAPI的性能各不相同,但通常在办公时间内性能较慢。我刚刚测试过它;上传500个事务行需要15秒,如脚本中指定的debet/credt x 5 x 50所示。通过使用部门ID,您可以跨多个部门加载以生成公司间的帖子。此脚本需要使用invantive sql的确切联机组合或XML驱动程序,但对于手动HTTP POST,情况类似