Invocation of DS Job of Sequence from Java
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 38
- Joined: Fri Apr 22, 2005 6:07 am
Invocation of DS Job of Sequence from Java
Hi All,
In the existing requirement, we are using Java adapters to fetch the file using different protocols and store it on ETL server. Java is also used to do some intermediate stuff like scheduling, etc.
Just wanted to know if it is possible to invoke DS Job or Sequence directly from Java. Presently we are using Java Adapter to execute unix script which in tern is executing DS jobs. We want to avoid calling unix script in between.
Thanks in advance.
Amit
In the existing requirement, we are using Java adapters to fetch the file using different protocols and store it on ETL server. Java is also used to do some intermediate stuff like scheduling, etc.
Just wanted to know if it is possible to invoke DS Job or Sequence directly from Java. Presently we are using Java Adapter to execute unix script which in tern is executing DS jobs. We want to avoid calling unix script in between.
Thanks in advance.
Amit
If your java adapters can execute scripts it can definately execute datastage jobs. But its better to have a wrapper script to check for return codes, do other household work as well. But to answer your quest, yes it can.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
I think he is asking for the contrary ... how to invoke datastage job without executing shell scripts ... i.e., directly from java.DSguru2B wrote:If your java adapters can execute scripts it can definately execute datastage jobs. But its better to have a wrapper script to check for return codes, do other household work as well. But to answer your quest, yes it can.
Well, there are datastage APIs for doing that, but those are C APIs which can be interfaced with java. The only other way out which I know of is to have SOA edition and publish your jobs as web services and invoke the web services from java.
It took me fifteen years to discover I had no talent for ETL, but I couldn't give it up because by that time I was too famous.
Re: Invocation of DS Job of Sequence from Java
i think that's what Amit is already doing, and doesn't want to do that way, i.e., thru the scripts. He wants to invoke without calling any scripts from java ... or, in other words, he needs a java API to achieve this.Amit Jaiswal wrote: ... Presently we are using Java Adapter to execute unix script which in tern is executing DS jobs. We want to avoid calling unix script in between.
Thanks in advance.
Amit
It took me fifteen years to discover I had no talent for ETL, but I couldn't give it up because by that time I was too famous.
-
- Premium Member
- Posts: 38
- Joined: Fri Apr 22, 2005 6:07 am
Can you 'invoke' a command line O/S function via JAVA? Then just call dsjob directly without any scripting wrapper. Or check the Command Line Interface section of the Server Job Developer's Guide, the APIs that dsjob leverages are documented there.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
I don't think you can do without making a system call ... and that is exactly what he is trying to avoid. But, there is the dsapi.h which is for C but I am sure JAVA can call C functions(JNI).chulett wrote:Can you 'invoke' a command line O/S function via JAVA? Then just call dsjob directly without any scripting wrapper. Or check the Command Line Interface section of the Server Job Developer's Guide, the APIs that dsjob leverages are documented there.
It took me fifteen years to discover I had no talent for ETL, but I couldn't give it up because by that time I was too famous.