how to split data in xml file into different tablesbased on a tag in informatica data integration - informatica

for example:
<root>
<item>
<itemno>1</itemno>
<itemname>orders</itemname>
</item>
<book>
<title>java</title>
<author>over</<author>
</book>
<item>
<itemno>2</itemno>
<itemname>load</itemname>
</item>
</root>
the above is one XML files I want to load item tag to one table and book to another table
1)target table(item):
item no item name
1 orders
2 load
2)target table(book):
title author
java over
I need this task in Informatica cloud data integration
thanks in advance

Related

How to fetch xml data based on attribute value using XSLT

For eg This is my xml data
XML data
I have to prepare an XSLT to handle above type of xml. Here "description" node can come twice if it also has welsh text corressponding to english text and it will come with language attribute..So my requirement is to fetch text under description node with language='W' when it contains some text...else i have to fetch english text coming under "Description" node without language attribute
Can you please help with adding this type of filter in XSLT?

How to set min and max prices for products using Amazon MWS API

Is it possible to set the minimum-seller-allowed-price and maximum-seller-allowed-price prices of products via flat file AND submit it as a feed via the MWS API?
Sellers will have to specify a min and max price for all items from 15th Jan 2015 onwards viz:
"With effect from January 14, 2015, you will not be able to use the Seller Central preferences to select a blanket “opt-out” from all potential low and high-pricing error rules. The aim is to reduce price error risks to sellers and avoid potentially negative buyer experiences. Instead, you will need to set a minimum and maximum allowed selling price for each product in your inventory. If you do not chose pricing limits for each product, Amazon’s default potential pricing error rules will apply to your products...."
So, from reading "https://sellercentral-europe.amazon.com/gp/help/201141430" this implies that it can be done via a "Price & Quantity Inventory" file. However, the solution that I'm after needs to be done via the MWS API.
For normal price feeds, I'd set the feed type to _POST_PRODUCT_PRICING_DATA_ too.
I don't think that you can set the min and max prices via XML as the price feed XSD does not contain a definition for these fields (not that I can find anyway).
Sai.
Here is a small sample if you need for type _POST_PRODUCT_PRICING_DATA_ feed on mws (here it's for amazon.co.uk):
<?xml version="1.0" encoding="utf-8"?>
<AmazonEnvelope xsi:noNamespaceSchemaLocation="amzn-envelope.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Header>
<DocumentVersion>1.01</DocumentVersion>
<MerchantIdentifier>YOUR_ID</MerchantIdentifier>
</Header>
<MessageType>Price</MessageType>
<Message>
<MessageID>1</MessageID>
<Price>
<SKU>YOUR_SKU</SKU>
<StandardPrice currency="GBP">30.75</StandardPrice>
<MinimumSellerAllowedPrice currency="GBP">20</MinimumSellerAllowedPrice>
<MaximumSellerAllowedPrice currency="GBP">40</MaximumSellerAllowedPrice>
</Price>
</Message>
</AmazonEnvelope>
Amazon provides this schema for their Price feed.
The MinimumSellerAllowedPrice and MaximumSellerAllowedPrice fields can be used to specify the min and max prices and they would look like this :
<MinimumSellerAllowedPrice currency="GBP">12.3</MinimumSellerAllowedPrice>
<MaximumSellerAllowedPrice currency="GBP">23.4</MaximumSellerAllowedPrice>
Be aware that if the currency is "EUR" you will have to specify the values for these 2 fields using comma :
<MinimumSellerAllowedPrice currency="EUR">11,1</MinimumSellerAllowedPrice>
Also note that the StandardPrice field should always be using dot for value representation, so 11.1 , even if the currency is "EUR".
#Stefan, not sure how to respond to your comment but below is an example of XML data that I send to update the price (MinimumSellerAllowedPrice = 24.94).
<AmazonEnvelope xsi:noNamespaceSchemaLocation="amzn-envelope.xsd">
<Header>
<DocumentVersion>1.01</DocumentVersion>
<MerchantIdentifier>ABC123</MerchantIdentifier>
</Header>
<MessageType>Price</MessageType>
<Message>
<MessageID>1</MessageID>
<OperationType>Update</OperationType>
<Price>
<SKU>13182</SKU>
<StandardPrice currency="GBP">11.96</StandardPrice>
<MinimumSellerAllowedPrice currency="GBP">11.1</MinimumSellerAllowedPrice>
<MaximumSellerAllowedPrice currency="GBP">24.94</MaximumSellerAllowedPrice>
</Price>
</Message>
</AmazonEnvelope>
And for me, Amazon processes these requests without error, and so if you're getting error code 5000 in the response, contact Amazon support and send them your XML together with the response. They should get back to you with an answer.

Searching Attachments in SharePoint 2010 Lists using CAML

I need help on searching attachments i.e Word Document, PDF etc which are attached to the list during inserting Item in SharePoint 2010 using CAML queries.
I tried with this query
<Query>
<Where>
<Eq>
<FieldRef Name="Attachments" />
<Value Type="Attachments">WordDocument1.docx</Value>
</Eq>
</Where>
</Query>
im not able to get any results if i give this query.
Please help.
The problem here is that the Attachments field of a SharePoint list does not store the attachments itself. This column only return whether a certain list item has an attachment or
not.
The attachments are not stored in a SharePoint list. Therefore I don't think it's possible to retrieve them with a CAML query.

Retrieving an array of values from a web service with SAS 9.2

I'm using SAS 9.2 and trying to retrieve an array of long values from a .NET web service. Here is my setup and call:
filename websvc url 'http://path.to/my/webservice?WSDL';
libname websvc xml92 xmltype=WSDL;
Data d;
dataSchema = "blah";
module = "blah";
run;
data strata;
SET websvc.GetStrataForModuleResponse(parms=d);
run;
The webservice returns XML like this when I invoke it manually without SAS:
<?xml version="1.0" encoding="utf-8"?>
<ArrayOfLong>
<long>1</long>
</ArrayOfLong>
note I snipped the xmlns stuff from the above snippet.
When I call the web service from SAS I get a dataset with 1 variable and 1 observation. The name of the variable is "datatype=string" and the value is blank. With the parameters I should get back exactly what I see above.
I would expect to see a dataset with 1 variable and 1 observation where the variable is named long and the value of the observation is 1.
Is there something I am missing here?
Thanks in advance!
The SAS libname engine is very restricted in the structure is requires. If your XML is not conform the required structure you need to create an XML to tell SAS how to read the XML file. The easiest way to do this is by using the SAS XML Mapper. For you current service the XML map would be like this:
<?xml version="1.0" encoding="UTF-8"?>
<SXLEMAP xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="webservice" version="1.2" xsi:noNamespaceSchemaLocation="http://www.sas.com/xml/schema/sxle12.xsd">
<TABLE name="ArrayOfLong">
<TABLE-PATH syntax="XPath">/ArrayOfLong</TABLE-PATH>
<COLUMN name="long">
<PATH syntax="XPath">/ArrayOfLong/long</PATH>
<TYPE>numeric</TYPE>
<DATATYPE>integer</DATATYPE>
</COLUMN>
</TABLE>
</SXLEMAP>
In your SAS code you should add a filename statement to your map and add the map to your libname statement.
filename wdslmap 'webservice.map';
libname websvc xml92 xmltype=WSDL xmlmap=wdslmap;

Sharepoint Lists - GroupBy?

I'm trying to get data from a Sharepoint list and put it into some Flex graphs. I can call the list data just fine using a CAML query, but I want to use a GroupBy to consolidate the rows by Teams. So, for example Team 1 may have 20 records, Team 2 may have 8 records, and Team 3 might have 25 records... Instead of showing 53 records, I want to show 3... just "Team 1, Team 2, Team 3" and the sum of the cost of each entry.
I see where CAML provides a GroupBy element, but I can't seem to get it to work. Also, I was only able to get the OrderBy element to work when I used the OrderField element instead of the FieldRef element like 90% of the books and websites recommend. If I do use FieldRef, OrderBy doesn't work anymore, which makes no sense to me. Something must be awry...
Here is my CAML Query as it stands...
---------------------------------------------------
<queryRequest xmlns="http://schemas.microsoft.com/sharepoint/dsp">
<dsQuery resultContent="dataOnly" resultRoot="Rows" resultRow="Row" columnMapping="attribute">
<ViewFields>
<FieldRef Name="Team"></FieldRef>
<FieldRef Name="Cost"></FieldRef>
<FieldRef Name="EANo"></FieldRef>
</ViewFields>
<Query>
<GroupBy collapse="true">
<FieldRef Name="Team"/>
</GroupBy>
<OrderBy>
<OrderField Name="Cost"/>
</OrderBy>
</Query>
</dsQuery>
</queryRequest>
---------------------------------------------------
This is with OrderBy working, but GroupBy not working. Help!
Thanks!
I ran the following query and seems to be working fine for me.
<Query>
<GroupBy collapse="true">
<FieldRef Name='Date' />
</GroupBy>
<OrderBy>
<FieldRef Name='Title' />
</OrderBy>
</Query>
I suggest you use the U2U CAML Query Builder tool to build and test your query's