How to Hardcode sender JDBC action node as EXECUTE
Hi ,
I have JDBC to File scenario ,please suggest me how to hardcode sender JDBC structure nodes <b>action</b> as "EXECUTE" and <b>table</b> as "ST_PROS.Get_Table" while designing the message mapping.
Raju,
In the ase of sendrer JDBC adapters you need to provide the SQL Query in the adapter.
Also, the document name and document namespace will be the values for the Message Type Name and MessageTypeNamespace.
The Messagetype youcreate will have to be of this format,
<MESSAGETYPENAME>
<row> <b> 0 to unbounded</b>
<ColumnName1> </ColumnName1>
<ColumnName2> </ColumnName2>
</row
</MESSAGETYPENAME>
if your select query is
Select name,empno from emptable;
the datatype will be,
<MESSAGETYPENAME>
<row> <b> 0 to unbounded</b>
<name> </name>
<empno> </empno>
</row
</MESSAGETYPENAME>
Regards
Bhavesh
Similar Messages
-
Question:
There is a scenario that users want to send multiple rows returned by Execute SQL Task as Email content to send to someone. With Execute SQL Task, the Full result set is used when the query returns multiple rows, it must map to a variable of the Object data
type, then the return result is a rowset object, so we cannot directly send the result variable as Email content. Is there a way that we can extract the table row values that are stored in the Object variable as Email content to send to someone?
Answer:
To achieve this requirement, we can use a Foreach Loop container to extract the table row values that are stored in the Object variable into package variables, then use a Script Task to write the data stored in packages variables to a variable, and then set
the variable as MessageSource in the Send Mail Task.
Add four variables in the package as below:
Double-click the Execute SQL Task to open the Execute SQL Task Editor, then change the ResultSet property to “Full result set”. Assuming that the SQL Statement like below:
SELECT Category, CntRecords
FROM [table_name]
In the Result Set pane, add a result like below (please note that we must use 0 as the result set name when the result set type is Full result set):
Drag a Foreach Loop Container connects to the Execute SQL Task.
Double-click the Foreach Loop Container to open the Foreach Loop Editor, in the Collection tab, change the Enumerator to Foreach ADO Enumerator, then select User:result as ADO object source variable.
Click the Variable Mappings pane, add two Variables as below:
Drag a Script Task within the Foreach Loop Container.
The C# code that can be used only in SSIS 2008 and above in Script Task as below:
public void Main()
// TODO: Add your code here
Variables varCollection = null;
string message = string.Empty;
Dts.VariableDispenser.LockForWrite("User::Message");
Dts.VariableDispenser.LockForWrite("User::Category");
Dts.VariableDispenser.LockForWrite("User::CntRecords");
Dts.VariableDispenser.GetVariables(ref varCollection);
//Format the query result with tab delimiters
message = string.Format("{0}\t{1}\n",
varCollection["User::Category"].Value,
varCollection["User::CntRecords"].Value
varCollection["User::Message"].Value = varCollection["User::Message"].Value + message;
Dts.TaskResult = (int)ScriptResults.Success;
The VB code that can be used only in SSIS 2005 and above in Script Task as below, please note that in SSIS 2005, we should
change PrecompileScriptIntoBinaryCode property to False and Run64BitRuntime property to False
Public Sub Main()
' Add your code here
Dim varCollection As Variables = Nothing
Dim message As String = String.Empty
Dts.VariableDispenser.LockForWrite("User::Message")
Dts.VariableDispenser.LockForWrite("User::Category")
Dts.VariableDispenser.LockForWrite("User::CntRecords")
Dts.VariableDispenser.GetVariables(varCollection)
'Format the query result with tab delimiters
message = String.Format("{0}" & vbTab & "{1}" & vbLf, varCollection("User::Category").Value, varCollection("User::CntRecords").Value)
varCollection("User::Message").Value = DirectCast(varCollection("User::Message").Value,String) + message
Dts.TaskResult = ScriptResults.Success
End Sub
Drag Send Mail Task to Control Flow pane and connect it to Foreach Loop Container.
Double-click the Send Mail Task to specify the appropriate settings, then in the Expressions tab, use the Message variable as the MessageSource Property as below:
The final design surface like below:
References:
Result Sets in the Execute SQL Task
Applies to:
Integration Services 2005
Integration Services 2008
Integration Services 2008 R2
Integration Services 2012
Integration Services 2014
Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.Thanks,
Is this a supported scenario, or does it use unsupported features?
For example, can we call exec [ReportServer].dbo.AddEvent @EventType='TimedSubscription', @EventData='b64ce7ec-d598-45cd-bbc2-ea202e0c129d'
in a supported way?
Thanks! Josh -
How to call sender JDBC Adaptor, if there is a indication file
Hi All,
I have a requirement need to pull data from Oracle and send it to BI.
Here what i need is like Oracle will give me Indication flat file with 0 records and it will be there in FTP floder, once XI finds that file in the FTP folder then only my JDBC sender adaptor needs to pull data from Oracel and send it BI
Could you pls suggest me how i can achive this hope we can do it with BPM, or any suggestions to do this.
Thanks in advance,
Venkat.Hi,
True that i am new to XI.
Here the problem is i will get 0 bites flat file i will not get any data in that file, so how i can handle that flat file, and once the flat file is there after that i need to start the JDBC sender adaptor to pull the data
1. Receive step for the Flat File
2. Synchronous Send step for Calling JDBC (so you will get some JDBC response back to IP).
3. Asynchronous Send step to send step2 JDBC response to BI system.
as you said the BPM will be like this am i correct
Receive step for File-->Receive step for JDBC-Send step for BI am i correct this process.
could you pls explain me bit more so its like
Thanks inadvance
Venkat -
Two select query in sender JDBC adaptor
Hi
We are doing JDFC-RFC scenario, in which i need to fetch the data from two tables (header and item table) whch correspondes to the 2 table parameter of RFC .
Any clues how to configure sender jdbc CC having 2 select query ??????
Regards
VijaySwatantra,
You can have a look at the below URL for more info on JOIN.
http://www.w3schools.com/sql/sql_join.asp
Best regards,
raj. -
Hi,
i am using XI7.0, Sender JDBC error is below;
when i test to connect to Oracle DB in using JAVA Code with ojdbc14.jar which was deployed into XI J2EE, i have no problem with insert update delete in using same code which was used in JDBC adapter in Configuration Time.
but JDBC Adapter on XI(JDBC2JDBC) is not running as well.
please look at the following and please guide.
JDBC Driver : oracle.jdbc.driver.OracleDriver
connection : jdbc:oracle:thin:@60.7.111.211:1577:AACC
S_SSS_MMM_JDBC_MDMALL001CU Sender Adapter v1402 for Party '', Service 'SSS_BS01_TESTBS01_D':
Configured at 12:29:23 2006-07-10
Last message processing started 12:29:55 2006-07-10
Error: Sending message '4299fec0-0fb4-11db-c508-000d604dde82' - failed with unexpected exception - proceed anyway: java.lang.ClassCastException: $Proxy222
last retry interval started 12:29:55 2006-07-10
length 10,000 secs
does anyone know how to fix it?
thanks
venjaminHi Venjamin,
Just try the follwing,
1. The Select Query in your Sender JDBC adapter. Try executing the same query on your DB client and check if it works fine and the data returned by it is of valid format?
2. Is any of the datatype being returned a CLOB or BLOB?
Regards,
Bhavesh -
using action script 2 how can i send a variable value to a dynamic textbox on a different keyframe?
Thanks for your swift response.
That sounds like a good solution, but the code I have on frame 2 is this
timer = 0;
countup = function(){
timer++;
countupInterval = setInterval(countup,100);
If I added the same actionscript to frame 3 which has a dynamic textbox with a variable timer attached wouldn't it just put the timer back to 0? What I want is the last known value that was given when it was in frame 2.
I am thinking of temple run here, I am trying to caculate the total distance(set in the timer variable) from the previous try.
Hope this makes sense.
Chazwick -
Stored procedure : how to call SP in sender JDBC adapter for mysql
HI friends ,
we have JDBC---->XI--
>SAP scenario. For some business requirement, we have to call STORED PROCEDURE , please let me know how to call SP in sender JDBC adapter for mysql .
Thanks
mojibHi Mojib,
Please create a sample stored procedure like this which contains select statement and in communication channel give
wite stored procedure name only to sql query statment and in update statement write <test>.
I am executing this stored procedure successfully.
Create Proc GetResultX As
Begin
Select * From TESTX
End
Execute statement for stored procedure is :
Exec GetResultX
Regards
Laxmi Bhushan Jha
Rewards point if found usful
I have given same answer to one of the same thread -
How to use Stored Procedure Call in Sender JDBC adapter
Hi All,
Could someone send me a blog on how to use Stored Procedure call in Sender JDBC adapter?
XierHi Xler
refer these links
/people/yining.mao/blog/2006/09/13/tips-and-tutorial-for-sender-jdbc-adapter
http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm
Also, you can check Sriram's blog for executing Stored Procedures,
/people/sriram.vasudevan3/blog/2005/02/14/calling-stored-procs-in-maxdb-using-sap-xi
/people/jegathees.waran/blog/2007/03/02/oracle-table-functions-and-jdbc-sender-adapter
This blog might be helpfull on stored procedures for JDBC
JDBC Stored Procedures
/people/siva.maranani/blog/2005/05/21/jdbc-stored-procedures
Please go through these threads and see if it helps...
Re: How to execute Stored Procedure?
Re: Problem with JDBC stored procedure
Thnaks !! -
How to use a atore procedure in the sender Jdbc adapter
Hi Experts!
I am having a requirement to read multiple data from multiple tables from Oracle database at a time.
In sender side i am using JDBC Adapter. Here i want to know how can we use a store procedure to do this and can any one pls give a blog which guide me in design.
Thanks in advance,
Preethi.Pleasae see this thread
Stored procedure in Sender JDBC Adapter
In space of select statement put
EXEC nameofstoredprocedure
and update statement
Put <TEST> -
How to cofigure the JDBC Sender adaptor
how to cofigure the JDBC Sender adaptor,
i want to do the scenario JDBC>XI>SAP
Thanks & Regards,
priya reddyHI
Database (JDBC) Adapter
The JDBC Adapter allows access to any DB that allows a JDBC driver to access the DB. This driver is not supplied with the adapter but must come from the DB provider or a 3rd party. The adapter converts database content to XML and vice versa.
Database content can be read with any SQL statement using a special XML format. This format enables SQL INSERT, UPDATE, SELECT, DELETE or even stored procedures. A message is always processed in one database transaction.
Refer the following links for further assistance
JDBC ADAPTER:
http://help.sap.com/saphelp_nw2004s/helpdata/en/1d/756b3c0d592c7fe10000000a11405a/frameset.htm
http://help.sap.com/saphelp_nw04s/helpdata/en/7e/5df96381ec72468a00815dd80f8b63/frameset.htm
Use thes step by step guidese
https://wiki.sdn.sap.com/wiki/display/XI/JDBCTOJDBC
https://wiki.sdn.sap.com/wiki/display/XI/XMLFile2XMLFile
tutorial /people/yining.mao/blog/2006/09/13/tips-and-tutorial-for-sender-jdbc-adapter
http://help.sap.com/saphelp_nw2004s/helpdata/en/1d/756b3c0d592c7fe10000000a11405a/frameset.htm for sender side JDBC configuration.
Follow this link
/people/luis.melgar/blog/2008/05/13/synchronous-soap-to-jdbc--end-to-end-walkthrough
cheers
reward points if found useful -
How can i make an action to send photos via email?
hi
under windows xp
how can i make an action to send photos via email?
i know there is a Export Actions
i tried to copy a link of "C:\Programs\Outlook Express\msimn.exe"
but lightroom export the file & open the client , but doesn't open the dialog to send email
how can i do it?For Outlook Express use MAPIMailer from
Lightroom Extra at Downloads/Other Goodies/MAPIMailer
Don
Don Ricklin, MacBook 1.83Ghz Duo 2 Core running 10.4.10 & Win XP, Pentax *ist D
http://donricklin.blogspot.com/ -
Upto how many characters will accept in SELECT query SENDER JDBC (PI 7.1)
Hi Friends,
I have to use Sender JDBC adapter in SAP PI 7.1, I need to use SELECT query only.
I have a SELECT query is around 2 pages. Is this will accepet in SENDER JDBC in PI 7.1
Thanks in advance.Hi Challarapu,
You can check it out and if it is not accepted by the same then you need to check the maximal length @ DB settings or JDBC Settings whether it is limited. If not then you are allowed.
Hope this helps.
Regards
Pothana -
How to attach two files in the send mail action
Hi experts
I want to attach two files in the send mail action . I tried using ; as a separator but it did not work .
Regards,
Antonio R . RubalcabaThanks Jeremy,
Yes I am contemplating the another threat . I still want to send two files because the two files have very distinct type of information . The first one is operational and the second one is about statistics . Of course that I can send both type of inforrmation in only one file . I just want to save time to the end user and let him select what infomation he wants to see .
Thanks and my best wishes for you and your family ,
Antonio -
Sender JDBC Adapter Supports Stored Procedures????
Dear All,
I was trying to use the Sender JDBC adapter to call the Stored procedure in the Sender JDBC adapter is possible to do this???
I don't think Sender JDBC Adapter is supported to execute the Oracle Started Procedures. With my understanding only the Receiver JDBC Adapter will supported for the Stored Procedures using the message mapping Action = EXECUTE and Table = DBO.EmployeeMasterTable.
Please let me know how to achieve the below scenario.
My Scenario JDBC to RFC
Query SQL Statement:
select * from dbo.emp where flag = 'Insert' or flag = 'Update' or flag = 'Delete'
Update SQL Statement:
UPDATE dbo.emp SET flag = null WHERE flag IN ('Insert', 'Update');
DELETE dbo.emp WHERE flag = 'Delete';
In the my update statement I need to update few data flag with Insert , Update and need to delete the of the old records as mentioned above the query.
In the response mapping I am using the Action = INSERT and Table = emp.
Thanks,
Jane F.Hi Jane,
>>My requirment is to select from the DB and update and delete needs to be done. How I need to call this stored procedure in Sender JDBC adapter.
An example of SP call is mentioned in the previous note Note 941317 - XI / PI JDBC Adapter: Known Problems / Incompatibilities
SP Code
---------- pkg1 ----------
CREATE PACKAGE pkg1 AS
TYPE numset_t IS TABLE OF NUMBER;
FUNCTION f1(x NUMBER) RETURN numset_t PIPELINED;
END pkg1;
CREATE PACKAGE BODY pkg1 AS
-- FUNCTION f1 returns a collection of elements (1,2,3,... x)
FUNCTION f1(x NUMBER) RETURN numset_t PIPELINED IS
BEGIN
FOR i IN 1..x LOOP
PIPE ROW(i);
END LOOP;
RETURN;
END;
END pkg1;
In sender channel mention
>> SELECT * FROM TABLE(pkg1.f1(5));
>>Is this need to be in the one stored procedure right. Can ou let me know how it should be handled in JDBC Adapter.
Yes it shoudl be a single SP. Mention a select statement as given in above example.
What is your Oracle version?
Regards
Suraj -
HI,
I want to retrieve the data from Database and send this into Webservice ?
I dont have any Idea How to configure the receiver SOAP adaptor and the creation of WSDL file
Can anyone help me with the complete example of Sender Jdbc -> XI -> Receiver SOAP scenarioAbhsihek,
Sender JDBC adapter is fine, but why u wanna create WSDL? Since the receiving system is webservice, they have to give the URL. So that u can post the data to the URL (which is WSDL). U can see the URL action in SOAP receiver adapter right,there u've to give.
Refer the doc to configure Receiver SOAP Adapter:
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/d23cbe11-0d01-0010-5287-873a22024f79
Hope it helps.
Best regards,
raj.
Maybe you are looking for
-
I Am finding no useful information on the forum overview page. There is no way to tell if the thread has been read, who the last comment was from, or if the thread has been viewed by anyone. In addition to thar, if the thread is a long one, especiall
-
[solved] xorg 1.6 - dual-monitor not working any more
I switched to arch64 and with it came the new xorg 1.6. Now X won't start with the configuaration I used before and I can't figure out what to do about it. I want to use two monitors (laptop + external) with an Intel X4500 HD und xf86-video-intel. I
-
I've edited an image on Lightroom and gone back and edited again. Is there anyway to get back to that original edit of the image?
-
BAPI_MATERIAL_MAINTAINDATA_RT ZZFIELDS
Hello, I am updating mara, marc append structure zfields using BAPI_MATERIAL_MAINTAINDATA_RT. I am using function value as 004. Value is not getting updated to material master. function = '004' material = matnr value plant = plant value field1 = val
-
How can I trade-in my old MacBook for the gift card but transfer my files to the new one?
I currently have the late-2008 unibody Aluminum 13.3" Macbook with 2.4Ghz processor. I love this computer it still works great over five years after buying it. However, I feel like now is a good time to upgrade to the new MacBook Pro with Retina disp