6 Replies Latest reply on Sep 22, 2009 11:18 AM by 657263

    FDM - Building Integration Import Scripts

    655855
      Hi All,

      I am trying to write an Integration Script to load SQL Server data into FDM 9.3.1. The script initialises a recordset object for the worktable that the source SQL Server data is loaded into.

      The statement at which my script fails is:

      Set rsAppend = DW.DataAccess.farsTable(strWorkTableName)*

      I have followed the sample script documented in the FDM Admin Guide.

      Does anyone have ideas as to why the script fails at this statement?

      Thanks,
        • 1. Re: FDM - Building Integration Import Scripts
          657263
          Hello,

          If you are trying to execute your script via the Workbench this would explain the issue. The variable strWorkTableName is probably not defined prior to being used. Where as if you were following the appropriate workflow, the variable is defined as part of the import process.

          Thank you.
          • 2. Re: FDM - Building Integration Import Scripts
            655855
            hi,

            Thanks for your reply. However, I am not trying to run this script in Workbench. Its run through the web. So i'm wondering if you could highlight how the initialisation of the WorkTable occurs? Or any other ideas as to why the statement fails.

            Thanks.
            • 3. Re: FDM - Building Integration Import Scripts
              655855
              Hi everyone,

              I was wondering if sending the sample code would help get a clearer picture....

              Function CTIDB2Test(strLoc, lngCatKey, dblPerKey, strWorkTableName)
              '------------------------------------------------------------------
              'Hyperion FDM Integration Import Script:
              '
              'Created By:     admin
              'Date Created:     2/19/2009 1:16:59 PM
              '
              'Purpose: This import integration script connects to the CentroODS database
              ' and imports Actuals data from the generalLedgerMasterFile and glMasterAccount table into FDM
              '
              '------------------------------------------------------------------

              Dim cnSS 'ADO Connection object
              Dim strSQL ' SQL String
              Dim rs ' Source System recordset
              Dim rsAppend ' FDM recordset
              Dim sPOVString
              Dim sPOVPeriod
              Dim sDataCol

              ' Initialise the ADO objects
              Set cnSS = CreateObject("ADODB.Connection")
              Set rs = CreateObject("ADODB.RecordSet")
              Set rsAppend = DW.DataAccess.farsTableAppend(strWorkTableName)


              The script fails at the statement:

              Set rsAppend = DW.DataAccess.farsTableAppend(strWorkTableName)


              Thanks
              • 4. Re: FDM - Building Integration Import Scripts
                KMacintosh
                The original response is correct however heres a bit of confusion going on here.

                The issue here is that the script was fine, however it was not applied to a load location - rookie error.

                Also As mentioned earlier the script must be run within the import workflow. Testing the script in the web interface script editor by using the run button (or in the workbench client) will create a "Data Access" error as the dw.dataaccess.farstable function will not be initialised unless you were to declare it as a private function referencing the upsWDataWindowDM.dll (easier to use the import function for testing)

                The import function in the workflow does initialise the data access class path as part of the SQL insert to FDM and hey presto the script will work a treat.
                • 5. Re: FDM - Building Integration Import Scripts
                  peterlec
                  Hi All,

                  I am also trying to build an integration script as described in the admin guide and the same error is raised at the farsTableAppend(strTableName) statement. The script is executed within the import process and the import format is attached to a location. Any ideas what else could be missing?

                  Many Thanks, Peter
                  • 6. Re: FDM - Building Integration Import Scripts
                    657263
                    Hello Peter,

                    Please include a complete copy of your script.

                    Thank you.