Академический Документы
Профессиональный Документы
Культура Документы
8.6.1 Release
Version 2010.06.31.01
ABOUT FYGHTSOFT
F YGHTS OFT P RODUCTS
Our products are created out of real world necessity and based on best business practices. Each of our products aims to solve a business or integration problem that existed at one or more of our current or previous clients. Our products are field tested and battle ready. In order to keep our solutions fresh and products relevant we continually ask our clients and potential buyers of our products to tell us about their integration issues. If you have an idea for a product or an existing integration issue, let us know. Our products are designed to help.
C OPYRIGHT
All rights and ownership of FyghtSoft products are reserved by FyghtSoft, LLC.
T RADEMARKS
Designations used by companies to distinguish their products are often claimed as trademarks or registered trademarks. In all instances in which FyghtSoft is aware of such claim, the product names appear in initial capital or all capital letters. Readers, however, should contact the appropriate companies for more complete information regarding trademarks and registration.
W EBSITE
http://www.fyghtsoft.com
P ARTNERS
FyghtSoft maintains relationships with several organizations, however, mention of any organization within this document does not construe entitlement, relationship, partnership, ownership, or management of any entity unless otherwise explicitly stated.
Page 2
Table of Contents
About FyghtSoft .......................................................................................................................................................... 2 Getting Started with Development/Usage ................................................................................................................... 4 Introduction ............................................................................................................................................................ 4 Overview ................................................................................................................................................................. 4 License Granted....................................................................................................................................................... 4 Pre-Requisites ......................................................................................................................................................... 4 XMLParse Function Breakdown ................................................................................................................................... 6 Overview ................................................................................................................................................................. 6 References .............................................................................................................................................................. 6 Conclusion............................................................................................................................................................... 6 XMLParse Function Syntax........................................................................................................................................... 7 Overview ................................................................................................................................................................. 7 Example XML Document .......................................................................................................................................... 7 XMLParse XPath Syntax ........................................................................................................................................... 8 Disclaimer ............................................................................................................................................................... 9 Conclusion............................................................................................................................................................... 9 Demo Quickstart ....................................................................................................................................................... 10 Using the XMLParse Custom Function........................................................................................................................ 10 Setting up the Demo Environment ......................................................................................................................... 10 Further Understanding .......................................................................................................................................... 15 Conclusion............................................................................................................................................................. 15
Page 3
OVERVIEW
The XMLParse Function is a key integration function developed as a custom extension for Informatica PowerCenter transformations. Usage of the function is limited only to the creative solution imagination of the end users; however a sample mapping and data source are provided to test the function immediately upon your installation of the product. This document provides a basic to advanced look at using the XMLParse function. It briefly tours through the steps needed to run the demo included with the product and shows syntax related to proper operation of the function. As you read through the document, if some information is vague or you simply need more information on this product, please visit our community forums at http://www.fyghtsoft.com/index.php/support and send us an email at support@fyghtsoft.com.
LICENSE GRANTED
Purchase of this product entitles your organization to a single (1) Informatica PowerCenter production server Repository Service license. If you have more than one Informatica PowerCenter Repository Service which will utilize this product, you will need to purchase additional products/licenses to satisfy each instance. Please contact our Sales department (sales@fyghtsoft.com) as volume pricing is available. If you have any questions regarding your license or any compliance thereto, please contact our sales department.
PRE-REQUISITES
As a pre-cursor to reading and utilizing this guide, one should have read and completed the installation of the FyghtSoft Premier Function Toolbox into the Informatica server and client environments. Please reference the Installation Guide included with this product download for this information.
Page 4
XMLParse Function for Informatica PowerCenter User / Developer Guide In addition, as a developer, one will need developer level access to Informatica PowerCenter Designer and the repository under which the Premier Function Toolbox plug-ins were installed. Please confer with the Informatica administrator if necessary to attain this information.
Page 5
3 XMLParse(XMLDoc, Default Value, XPath Statement) String (Max 4000 characters) Using XML and XPath technology the XMLParse function takes 3 parameters and returns a scalar value as the XPath query result. The XPath syntax is similar to the base XPath syntax with minor adjustments in order to retrieve scalar values accurately within Informatica PowerCenter.
REFERENCES
For this and more information regarding some technical definitions of functionality provided within the XMLParse function please reference the following: XPath: o http://www.w3.org/TR/xpath/ o http://www.w3schools.com/xpath/default.asp http://www.w3schools.com/xpath/xpath_syntax.asp
CONCLUSION
The above breakdown of each function provides an immediate syntactical reference and brief understanding for the overall capabilities of this product. Importing and running the demo included with this product is highly recommended in order to see how the functions operate. Please also reference the quickstart videos and guides from http://www.fyghtsoft.com/index.php/resources.
Page 6
Page 7
Example
/purchaseOrder/shipTo/name/text() /purchaseOrder/billTo/@country
Page 8
DISCLAIMER
This product is only officially certified to retrieve scalar/single value using the text() retrieve method at the end of the XPath statement. This has been tested on multiple platforms and varying XML documents without issue. Furthermore, the XPath syntax for attributes using the @ symbol has been certified for use as well. An example of each of these is shown in the matrix above.
CONCLUSION
The above breakdown of each function provides an immediate syntactical reference and brief understanding for the overall capabilities of this product. There are very few caveats inherent within this custom functions product and we sought to highlight those items in this section. Importing and running the demo included with this product is highly recommended in order to see how the functions operate. Please also reference the quickstart section of this guide or visit other support resource from our website at http://www.fyghtsoft.com/index.php/resources.
Page 9
DEMO QUICKSTART
Several quickstart videos have been produced to educate developers on usage of this product. The quickstart videos are not a replacement for the core documentation found here and within the product directory. The quickstart videos can be found on the FyghtSoft website at http://www.fyghtsoft.com/index.php/resources.
2.
The demo that was created for this quickstart is for an Oracle RDBMS. You may convert the SQL to another database if desired, but this quickstart will continue to reference the Oracle RDBMS. Open your favorite RDBMS GUI Editor (SQL*Plus, SQLDeveloper, etc.). /Demo/SQL/ORCL/. Execute the script, Demo_InstallX.sql. Navigate to the folder path
NOTE: An existing database scheme is expected when running the script. Typically for demo purposes our team utilizes the HR schema. Please contact your RDBMS administrator if you are not familiar with a test schema available for use.
Page 10
3.
Confirm that your schema now has the following new objects.
4. 5.
Open Informatica PowerCenter Repository Manager. Connect to a Repository Service that will be used for this demo purpose. The next step requires an importing of objects into a Repository Service. If a demo folder already exists for your testing purposes then you may use it. Otherwise, choose Folder > Create from the menu bar to create a new folder called Demo.
Page 11
6. 7.
From the menu bar choose Repository > Import Objects On the Import Objects wizard, click the Browse button and navigate to the /Demo/Informatica_Objects/ path under the extract product folder. Select the .XML file.
Click Next. 8. Select Add All from the Import Objects step. Click Next.
Page 12
9.
10. Determine any conflict resolutions and complete the import utility.
Page 13
Click Import. Click Done. 11. Open Workflow Manager. 12. Modify your connection to ensure that you have a connection that references the database schema under which you executed the script in Step 2 above.
Page 14
XMLParse Function for Informatica PowerCenter User / Developer Guide Be sure that in the workflow you assign the connection to the session appropriately. 13. You should now be able to successfully run the demo workflow. Execute the workflow and once completed (use Workflow Monitor to view completion), in your favorite GUI IDE, run any of the queries from the script XMLParse_Queries.sql found in the /Demo/SQL/ORCL/ folder of the extracted product.
FURTHER UNDERSTANDING
As detailed above, the XMLParse custom function is based on XPath syntax. Although the demo provides several examples of how the XMLParser function may be used in a real-world situation, there may be several other uses for the function not provided in the quickstart demo. Further understanding may be accomplished by unit testing the function. If there are any issues, please contact the FyghtSoft support team.
CONCLUSION
The above function is unique to Informatica PowerCenter in that FyghtSoft is adding some new approaches to the way that transformation expressions have been utilized in the past. FyghtSoft aims to continue the education of our customers about our products so that ease of use and transparency exists. If there are any questions, comments, or concerns please express these through our forums at http://www.fyghtsoft.com/forums/ so that other users may also share in discovery and solutions.
Page 15