none
How to read MDEF (Meter Data Exchange format) file in BizTalk ?

    Question

  • Hi,

    I have a requirement in BizTalk. I have to read the .MDEF (Meter Data Exchange format) file in BizTalk and replace one filed with new value. 

    About MDEF File:-

    MDEF files are used by organizations responsible for sales and distribution of electricity. The MDEF files contain Meter header data, channel header data, interval data and trailer record. These files come in a complicated binary file format. 

    Can you please let me know about your thoughts ?

    Friday, September 1, 2017 10:41 AM

All replies

  • MDEF seems to be a positional file. Have you tries the wizard to try reading the file to create the associated schemas?

    You'd then be able to process the MDEF into XML using the DASM and use XPATH to modify the data and pass it back out using the FFASM.

    Regards.

    • Edited by Shankycheil Friday, September 1, 2017 11:02 AM FF
    Friday, September 1, 2017 10:55 AM
  • So, this shouldn't be that difficult.  MDEF is mostly a flat file bit I recall some of the fields are 'encoded' is some special way, not way out there though.

    You can find some copies of the spec using Bing: https://www.bing.com/search?q=Meter+Data+ExchangeFormat+utility+translation&src=IE-TopResult&FORM=IETR02&conversationid=

    If the utility you're dealing with is of some size, they maybe already have a process that scrubs this data into something easier to work with, so that's worth asking, but you don't really need this. This what happened the one time I've seen this format, but I still had to look as the MDEF source files.

    Friday, September 1, 2017 2:11 PM
    Moderator
  • Hi,

    Thanks for your response. I have tried to create schema using flat file wizard but unable to create because .MDEF file contains binary data. 

    Regards. 

    Friday, September 1, 2017 5:30 PM
  • Sure, but I don't think that's a problem because it's just the field data that's encoded in an otherwise structured format.

    So, you parse the encoded fields as strings, which they are, then 'decode' them later either in a Map or custom Pipeline Component.

    Sunday, September 3, 2017 3:55 PM
    Moderator
  • Depending on how the binary data is represented, you should be able to choose the appropriate data type. Being binary it'd be still of fixed length. In regards to your options for data types to help you refer https://www.xml.com/pub/a/98/07/binary/binary.html for various options permitted in XML. Also refer https://msdn.microsoft.com/en-us/library/ms996427.aspx

    Regards.


    PS: If however the data is not positional but has TLV (Tag-Length-Value) elements then you would have to write your own dissembler/assembler component or look at extending the existing dissembler component (refer https://msdn.microsoft.com/en-us/library/aa560024.aspx)
    • Edited by Shankycheil Monday, September 4, 2017 4:55 AM PS
    Monday, September 4, 2017 4:51 AM
  • Here's where we say 'Welcome to the Integration!  Now you just have to try something.'

    The position you're in is not at all uncommon and the best thing to do is just get started.

    Monday, September 4, 2017 12:23 PM
    Moderator