BizTalk | Issue with Logical Existence functoid | source node doesn’t exist, still need output in the target - biztalk

I have a requirement to populate the output field in the destination schema though the source field does not exist in the input XML. If it does not exist, I have different logic to populate the target field. I tried using the 'Logical Existence' functoid but it is not giving me the desired output.

Related

Application Insights - How to search by some properties in custom dimension

I am using mobile application i.e Appcenter for recording customevents AzureLogportal.
I am trying to fetch the records by using custom query.
Inside customDimensions Object of array i.e Properties i stored.
Properties = {"1":"Studentname","101":"id","John":"Title"}
I am trying to fetch all the records for title : John in the properties.
Query i tried is :
customEvents
|where customDimensions.Properties.TopicTitle == "John"
But it dont give any result.Please help.
if Properties within customDimensions is a property bag, then the bottom note in this document should have the answer
https://learn.microsoft.com/en-us/azure/kusto/query/parsejsonfunction
Notes
It is somewhat common to have a JSON string describing a property bag in which one of the "slots" is another JSON string. For example:
let d='{"a":123, "b":"{\\"c\\":456}"}';
print d
In such cases, it is not only necessary to invoke parse_json twice, but also to make sure that in the second call, tostring will be used. Otherwise, the second call to parse_json will simply pass-on the input to the output as-is, because its declared type is dynamic:
let d='{"a":123, "b":"{\\"c\\":456}"}';
print d_b_c=parse_json(tostring(parse_json(d).b)).c

How to search for the occurrence of an attribute in any document in Marklogic database if i dont know the value of the attribute?

How do i search for an attribute present anywhere in the Marklogic database using xquery if i dont know the attribute value? i.e. I want to check if an attribute called 'court' is present in any document in my database.
It seems like the exists function https://www.w3.org/TR/xpath-functions/#func-exists should help: exists(//#court).

BizTalk file/ message splitting

I have a requirement in which I have to split the file contents based on value of the first column of the comma separated values in the source file.
Number of files to be generated in output depends on the number of unique values in the first column.
Eg:
FileName.txt
Code001,value11,value12,value13,value14
Code002,value21,value22,value23,value24
Code003,value31,value32,value33,value34
Code001,value15,value16,value17,value14
Code003,value37,value38,value39,value31
Output has to be number of files as the unique values in first column of the file content.
Ex Output: It should be 3 separate files with name and contents as below
Code001.txt
Code001,value11,value12,value13,value14
Code001,value15,value16,value17,value14
Code002.txt
Code002,value21,value22,value23,value24
Code003.txt
Code003,value31,value32,value33,value34
Code003,value37,value38,value39,value31
This can actually be achieved in several ways, but one thing I'm thinking about is the following:
Using a FF disassembler, just disassemble your FF schema to XML (as you would always have to do.
Create an envelope and a document schema, which would fit your output schema. Your document schema would be similar to the output file you want in the end. You would want to work towards a document schema which matches the collection of your unique codes (Code001, Code002 and Code003).
The idea would be to create an orchestration that will map your disassembled FF schema to the envelope schema. This cannot be done using a mapping in a receive/send port.
In the orchestration, execute a receive pipeline, with an XML disassembler configured with your envelope and document schema. This will split your message into several messages.
Bind your orchestration to a send port, which would map the instance to your output schema and send it through a FF assembler.

BizTalk - Delete without a schema

I am importing a file with 200+ records into a master table.
The BizTalk package only services one source, other packages service other sources
I am using strongly type stored procedures for all SQL CRUD
All records inside the file come from the same source
The file does not contain source name or source Id
I want to determine source from package hard coded value
The Master table contains records from several sources
Before import: delete inside Master table existing records from source
Unlike the file import, the delete statement happens once
DELETE FROM Master WHERE SourceID = #SourceID
The file import works, but how can I hard code the delete source ID?
In your delete transform (just above the send shape) you can set up a SourcID property for the outgoing message. You can then populate the message context with this SourceID. This sourceID can then be used in your delete statement.
If I understand correctly, you want to delete all existing records for the SourceID before inserting new ones?
If so, you need to have access to the SourceID value on the inbound message into the orchestration.
To do this, use property promotion.
You can either do this:
inside a pipline component configured on the receive port so that the property is available when the message arrives on the orchestration, or,
inside the orchestration, which will require you moving the construct shape for the InsertCSV message above the delete construct shape, and promoting the property within the contruct shape.
Of these options, the first one is probably the best option as assigning properties should ideally be done during message dissasembly.
Alternatively, you can use an xpath() call within an Expression shape to interrogate the message using xpath, and retrieve the value like that. This way you can avoid thinking about property promotion.
However, while quicker to implement, this approach is not best practise because it makes your orchestration very sensitive to changes in message schema.

intellisense for XSD query in ASP.NET which returns different schema

I have an xsd query returning a different schema than the table it's associated with. How can I define a row in my vb code which would give me the intellisense for that special schema?
In this particular case, I only had one extra field in the schema that wasn't in the associated table. Therefore, I declared a variable with the xsd row object and was able to get the extra value using the .item(index) to get that extra field. I had thought that the item would not be available at all.

Resources