Flat file Schema (Delimited) creation wizard in Biztalk server 2015 - xsd

i want to add nested child record with elements in Positional File (Flat File schema Creation wizard) using Biztalk,
for Eg. Generated instance to be like this: <Root><Child_Rec1><Child_Ele>ELEMENT</Child_Ele></Child_Rec1></Root>

Sorry, what you are asking for is not possible with the Flat File Disassemler.
It is not supported to have Delimited content within Positional Content.
The way to work around this is the split the delimited content in a Map and set the target fields.

Related

How to prevent saving same named file on CouchDb?

I am using CouchDB with Divan - C# interfacing library for CouchDb.
A file can be uploaded many times on CouchDb. Every time the "id" is changed after file is uploaded, but the "rev" remains the same.
This happens even if all custom attributes defined for file being uploaded are same any existing file on CouchDb with same name.
Is there any way that can avoid uploading same named file if all custom attributes are same? Fetching all files and checking them for file name repetition could be a way, but definitely not preferable for its required time depending on other factors.
Thanking you.
Let's say you have 3 attributes for a file :
name
size in bytes
Date of modification
I see two main possibilities to avoid duplicates in your database.
Client approach
You query the database to check if the document with the same attributes exists with a view. If it's not existing, create it.
User defined id
You could generate an id from the attributes as this library is doing.
For example, if my document has those attributes :
"name":"test.txt",
"size":"512",
"lastModified":"2016-11-08T15:44:29.563Z"
You could build a unique id like this :
"_id":"test.txt/2016-11-08T15:44:29.563Z/512"

CSV to XML trnformation using cloveretl

I want to transform my csv file to XML using cloveretl.
I gone through the basic tutorial, all explains abound direct mapping from csv to xml, csv header column names are used for xml element name.
I have one complex XSD, and I want to map csv to that XSD generated xml.
When I generate metadata using my XSD 213 fmt file generated in cloveretl.
How do map all these together ?
I saw an option to map individually, one csv metadata to one fmt. Like this I have to do 213 mapping and combine all ?
I assume you have two components: UniversalDataReader and XMLWriter. The edge between them should not have the metadata from the XSD schema (you do not have to extract metadata from the XSD at all), it should have metadata extracted from the input CSV file. Otherwise, you would not be able to read the file in the first place.
Then, in XMLWriter, you can set the XSD schema or create the mapping manually. For more information, see http://doc.cloveretl.com/documentation/UserGuide/topic/com.cloveretl.gui.docs/docs/extxmlwriter.html#xsd-mapping
If the CSV and the result XML are simple enough, you do not need the XSD schema at all.

Array of attachment type - how to get a filename for highlighted fragment?

I use ElasticSearch to index resources. I create document for each indexed resource. Each resource can contain meta-data and an array of binary files. I decided to handle these binary files with attachment type. Meta-data is mapped to simple fields of string type. Binary files are mapped to array field of attachment type (field named attachments). Everything works fine - I can find my resources based on contents of binary files.
Another ElasticSearch's feature I use is highlighting. I managed to successfully configure highlighting for both meta-data and binary files, but...
When I ask for highlighted fragments of my attachments field I only get fragments of these files without any information about source of the fragment (there are many files in attachment array field). I need mapping between highlighted fragment and element of attachment array - for instance the name of the file or at least the index in array.
What I get:
"attachments" => ["Fragment <em>number</em> one", "Fragment <em>number</em> two"]
What I need:
"attachments" => [("file_one.pdf", "Fragment <em>number</em> one"), ("file_two.pdf", "Fragment <em>number</em> two")]
Without such mapping, the user of application knows that particular resource contains files with keyword but has no indication about the name of the file.
Is it possible to achieve what I need using ElasticSearch? How?
Thanks in advance.
So what you want here is to store the filename.
Did you send the filename in your json document? Something like:
{
"my_attachment" : {
"_content_type" : "application/pdf",
"_name" : "resource/name/of/my.pdf",
"content" : "... base64 encoded attachment ..."
}
}
If so, you can probably ask for field my_attachment._name.
If it's not the right answer, can you refine a little your question and give a JSON sample document (without the base64 content) and your mapping if any?
UPDATE:
When it come from an array of attachments you can't get from each file it comes because everything is flatten behind the scene. If you really need that, you may want to have a look at nested fields instead.

How do I store the contents of an array in tablestorage

I need to store the contents of an array into Azure tablestorage. The array will have between 0 and 100 entries. I don't want to have to create 100 different elements so is there a way I can pack up the array, store it and unpack it later. Any examples would be much appreciated. I just don't know where to start :-(
You need to serialize the array into binary or xml and then use the appropriate column type to store the data (binary object or xml.)
XML will be the most flexible because you can still query the values while they are in storage. (You can't query binary data. Not easily anyway.) Here is an example of serializing and here is one for inserting the value into a table.
Some detail on XML support in Azure:
The xml Data Type
SQL Azure Database supports xml data
type that stores XML data. You can
store xml instances in a column or in
a variable of the xml type.
Support for XML Data Modification
Language
The XML data modification language
(XML DML) is an extension of the
XQuery language. The XML DML adds the
following case-sensitive keywords to
XQuery and they are supported in SQL
Azure Database:
insert (XML DML)
delete (XML DML)
replace value of (XML DML)
Support for xml Data Type Methods
You can use the xml data type methods
to query an XML instance stored in a
variable or column of the xml type.
SQL Azure Database supports the
following xml data type methods:
query() Method (xml data type)
value() Method (xml data type)
exist() Method (xml data type)
modify() Method (xml data type)
nodes() Method (xml data type)
If you really are starting out in Azure Table Storage, then there are a few nice "simple" tutorials around - e.g. http://blogs.msdn.com/b/jnak/archive/2008/10/28/walkthrough-simple-table-storage.aspx
Once you are happy with reading/writing entities then there are several ways you can map your array to Table Storage.
If you ever want to access each element of your array separately from the persistent storage, then you should create 0 to 99 separate entities - each with their own entity in the Table store.
If you don't ever want to access them separately, then you can just store the array in a single entity (row) in the table - e.g. using PartitionKey="MyArrays", RowKey="" and having another column which contains the array serialised to e.g. JSON.
As a variation on 2, you could also store the array items - 0 to 99 - in separate columns ("Array_0",..."Array_99") in the row. There are ways you could map this to a nice C# Array property using the Reading/Writing events on the table storage entity - but this might not be the best place to start if you're beginning with Azure.
Be careful, besides the 1MB entity limit there is a per field limit as well (I think it's 64kb)
Your best bet is to use the Lokad Fat Entity
http://code.google.com/p/lokad-cloud/wiki/FatEntities

Redefine folder structure of document library with metadata

I have a problem in my sharepoint document library structure. Currently the document library consiste of folder sub-folder structure to store a document categorywise. Now our client want to redefine this folder structure with a metadata structure.
Can any one tell me how can I use metadata instade of folder sub folder structure..?
any related articles or links will be appriciated.
Thanks
Sachin
As already stated, you need to use columns for the metadata, preferably through a new Content Type. After creating this Content Type, you need to attach it to the library and convert all documents to it. Lastly, you also need to modify the views of the library, e.g. depending on your metadata you might only want to display certain columns or filter them.
There is an excellent whitepaper from Microsoft on Content Types available here:
http://technet.microsoft.com/en-us/library/cc262729.aspx
You can also read more about content type planning on Technet:
http://technet.microsoft.com/en-us/library/cc262735.aspx
And here's some info about Views:
http://office.microsoft.com/en-us/sharepointtechnology/HA100215771033.aspx
You must define columns for the metadata fields you want to have, create a content type that includes these columns, and assign this content type to your documents.
You might also change the default view of your document library, or create a new view, to make the new metadata columns visible.

Resources