Load_Data API
  • 1 Minute to read
  • Dark
    Light
  • PDF

Load_Data API

  • Dark
    Light
  • PDF

Article summary

Usage

Loads data into staging tables of the Planful application.

Use the Load_Data call to load COA Segment / GL data to staging tables in Planful. When a Client application invokes the Load_Data call, it passes in the rule code and collection of strings with custom delimiter (like “,”,”;”,”|_|” etc). Each string in the collection represents a data row of the COA segment / GLData that is to be loaded into Planful.

Upon invocation, the Web Service parses the string collection and (based on the rule code) transfers the COA segment / GL Data to the staging table in the database and returns an operation result object, which contains the status and status message of the operation. The Client application can then use methods for the operation result objects and retrieve information.

The Client application must be logged in with sufficient access rights to load COA segment / GL data.

Request

Shell Syntax

OperationResult = api.Load_Data(String RuleCode, String ObjectArray(), String Delimiter)

XML

<?xml version='1.0' encoding='UTF-8'?>
<ns1:Envelope xmlns:ns1="http://schemas.xmlsoap.org/soap/envelope/">
  <ns1:Body>
    <ns2:BulkStringLoadWithLogin xmlns:ns2="http://www.HostAnalytics.com/API/SOAP/StateFree/Common/2009/03/19">
      <ns2:LoginName></ns2:LoginName>
      <ns2:Password></ns2:Password>
      <ns2:TenantCode></ns2:TenantCode>
      <ns2:Rule></ns2:Rule>
      <ns2:Data>
        <ns2:string></ns2:string>
        <ns2:string></ns2:string>
        <ns2:string></ns2:string>
        <ns2:string></ns2:string>
       </ns2:Data>
      <ns2:strDelimiter>@@</ns2:strDelimiter>
    </ns2:BulkStringLoadWithLogin>
  </ns1:Body>
</ns1:Envelope>

Arguments List

The following table provides a list of arguments that are required for Load_Data method call:

NameTypeDescription

RuleCode

String

The name of the rule that is configured in the ETL of the Planful application.

ObjectArray

String

The collection of strings. Each string item in the collection represents a data row of the COA segment / GL data that is to be loaded to the Planful application.

Delimiter

String

The column separator in each row of the source file. Examples are; Comma (,), Tab (VBTab), | (Pipe), ; (Semicolon)

Response

OperationResult

The Load_Data method call returns an OperationResult object, which contains the status and the status message of the Load_Data method call.

Shell

Private Sub LoadData()
Dim api As New HostAPI()
Dim strRuleCode As String = "", strDelimiter As String = "", objData()
As String, objResult As OperationResult
Try
'Prepare an array of GL Data Strings to pass to the web method
ReDim objData(1)
		objData(0) = "Revenue Acc1|_|Revenue Acc1|_|Revenue Acc
		Parent1|_|Revenue Acc
		Parent1|_|~|_|Revenue|_|Balance|_|YTD|_|Credit|_|Active|_|Leaf|_|EOM|_|Yes|_|Report Category1"
		objData(1) = "Revenue Acc2|_|Revenue Acc2|_|Revenue Acc
		Parent1|_|Revenue Acc
		Parent1|_|~|_|Revenue|_|Balance|_|YTD|_|Credit|_|Active|_|Leaf|_|EOM|_|Yes|_|YES|_|Report Category2"
		objResult = New OperationResult
'Call the web method with the rule code created in Planful and the delimiter used in the data string
		objResult = api.Load_Data("WS - Loading Accounts", objData, "|_|")
		Console.WriteLine(objResult.message)
		Consolde.ReadLine()
Catch ex As Exception
End Try
End Sub

XML

<BulkStringLoadWithLoginResponse xmlns="http://www.HostAnalytics.com/API/SOAP/StateFree/Common/2009/03/19">
  <BulkStringLoadWithLoginResult>
    <Success>true</Success>
    <message>Data loaded into Planful staging environment successfully</message>
  </BulkStringLoadWithLoginResult>
</BulkStringLoadWithLoginResponse>	

Was this article helpful?