You are not logged in.

Dear visitor, welcome to Palo Community Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

  • "Pommie" is male
  • "Pommie" started this thread

Posts: 412

Date of registration: Feb 21st 2007

Location: Lytham UK

Occupation: OLAP consultant specialising in retail

  • Send private message

1

Wednesday, September 2nd 2009, 3:48pm

Calling an ETL Job via VBA

Is there a way to call an ETL 3 job from an Excel spreadsheet?

I am thinking of users being able to trigger a data copy from Actual LY version to Plan TY version to "seed" the plan
Best wishes

John Hobson
The Planning Factory, Lytham, UK
www.planfact.co.uk

dominik_l

Jedox Team

  • "dominik_l" is male

Posts: 348

Date of registration: May 7th 2008

Location: Freiburg / Germany

  • Send private message

2

Wednesday, September 2nd 2009, 5:17pm

I'm no VBA Guru, but if VBA can execute .bat files then you can simply put an etl call of the etl command line client in a .bat file and execute that one.

  • "Pommie" is male
  • "Pommie" started this thread

Posts: 412

Date of registration: Feb 21st 2007

Location: Lytham UK

Occupation: OLAP consultant specialising in retail

  • Send private message

3

Wednesday, September 2nd 2009, 6:42pm

Thanks Dominik

Sounds reasonable as long as I can parameterise the routine - looks like Context Variables may be the answer there. I'll have a root around.
Best wishes

John Hobson
The Planning Factory, Lytham, UK
www.planfact.co.uk

  • "realquo" is male

Posts: 257

Date of registration: Mar 11th 2009

Location: Italy

Occupation: BI Consultant

  • Send private message

4

Wednesday, September 2nd 2009, 6:58pm

I was thinking of the same exact thing, opting for doing it entirely from VBA (code modules can be easily grouped in an excel add-in installed where needed), but I have to say that the idea of doing it from the ETL Server sounds good.
Thanks,
RQ

gleesoto

Master

  • "gleesoto" is male

Posts: 68

Date of registration: Nov 12th 2005

Location: Ireland

Occupation: datasmith

  • Send private message

5

Thursday, September 3rd 2009, 9:44am

ETL Server SOAP interface via VBA

The ETL server exposes its methods via a SOAP interface so by using a VBA friendly soap client such as Simon Fell's PocketSOAP http://www.pocketsoap.com/ you can fully control it from Excel.

Tom

Posts: 173

Date of registration: Jan 4th 2008

Location: Freiburg / Germany

  • Send private message

6

Wednesday, September 9th 2009, 12:00pm

Both ways, via .bat-File and via SOAP-API, are reasonable. And yes, you can parameterize it with context variables: From the command line, it's the option -c e.g. "-c Year=2008 Month=Jan"

tish1

Sage

Posts: 777

Date of registration: Jul 13th 2009

Location: Vienna / Austria

Occupation: Senior Consultant @ Vector SW DV GmbH

  • Send private message

7

Thursday, August 9th 2012, 8:35pm

by using a VBA friendly soap client

can anyone provide an example? Either in this thread or in that one: http://www.jedox.com/community/palo-foru…14831#post14831

vesi

Sage

  • "vesi" is male

Posts: 98

Date of registration: May 11th 2006

Location: Czech Republic

  • Send private message

8

Monday, August 13th 2012, 11:18am

Hi tish1,
here is my code for using ETL via VBA (Allows you to run jobs from client to server).

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
Sub RunETLJob(sProject As String, Optional sJob As String, Optional sParamaters As String, Optional bCreateLogFile As Boolean, Optional bShowLog As Boolean)
Debug.Print
sCurrentUser = 'set user name
sDateTime = Format(Now, "yyyymmdd_hhMM")
sETLServer = 'set ETL server name, f.e. sETLServer=server
sETLClient = 'set ETL client path, f.e. sETLClient="c:\Program Files\Jedox\Palo Suite\tomcat\client"
sETLLogFile = 'set output path for log file, f.e. sETLClient="c:\"
sETLBatFile = 'set output path for bat file, f.e. sETLClient="c:\"
sETLCommand = "etlclient -s " & sETLServer & " -p " & sProject & IIf(sJob <> "", " -j " & sJob, "") & IIf(sParamaters <> "", " -c " & sParamaters, "") & IIf(bCreateLogFile, " 1> """ & sETLLogFile & """", "")
Open sETLBatFile For Output As #1
Print #1, "CD /D " & sETLClient
Print #1, sETLCommand
Print #1, "EXIT"
Close #1
Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & sETLServer & "\root\cimv2")
Set objProcess = objWMIService.Get("Win32_Process")
errReturn = objProcess.Create(sETLBatFile, Null, Null, intProcessID)
If errReturn = 0 Then
    Do While Not Len(Dir$(sETLLogFile & Replace(Replace(Replace(sDateTime & "_" & sCurrentUser & "_" & sProject & IIf(sJob <> "", "_" & sJob, "") & IIf(sParamaters <> "", "_" & sParamaters, ""), " ", "_"), "=", "-"), ".", "") & ".log")) > 0
    Loop
    Do While Not FileLen(sETLLogFile & Replace(Replace(Replace(sDateTime & "_" & sCurrentUser & "_" & sProject & IIf(sJob <> "", "_" & sJob, "") & IIf(sParamaters <> "", "_" & sParamaters, ""), " ", "_"), "=", "-"), ".", "") & ".log") > 0
    Loop
    Application.Wait (Now + TimeValue("0:00:02"))
    If bShowLog Then Shell "NOTEPAD.EXE " & sETLLogFile & Replace(Replace(Replace(sDateTime & "_" & sCurrentUser & "_" & sProject & IIf(sJob <> "", "_" & sJob, "") & IIf(sParamaters <> "", "_" & sParamaters, ""), " ", "_"), "=", "-"), ".", "") & ".log", vbNormalFocus
Else
    MsgBox "Import could not be started on computer " & sETLServer & " due to error: " & errReturn
End If
Kill sETLBatFile
End Sub

Sub test()
RunETLJob "importBiker", , , True, True
End Sub

tish1

Sage

Posts: 777

Date of registration: Jul 13th 2009

Location: Vienna / Austria

Occupation: Senior Consultant @ Vector SW DV GmbH

  • Send private message

9

Monday, August 13th 2012, 9:35pm

Hi,

thank you vesi.
Did you ever try to run a job via WSDL? I'm curious how that would work.

Regards.

vesi

Sage

  • "vesi" is male

Posts: 98

Date of registration: May 11th 2006

Location: Czech Republic

  • Send private message

10

Tuesday, August 14th 2012, 4:04pm

Unfortunately no...

Rate this thread