has anyone seen a custom meta data driven json generator?

  • Hi, we might be interested in abstracting the generation of a union all amongst queries that run over differently formatted purchase order tables.

    What do i mean?  We buy things whose attribute collections/columns  differ in 3 ways and therefore come across in 3 differently formatted  purchase order tables.   But then translating the extracted info into json allows for a union all of the same number and types of columns.  We are picturing a biz rule meta data table that would drive this from a call to one general function we would write or copy.  The meta data biz table would know what columns need to be extracted from each po table and in what order.  the calls to the function would be made by some high level query that passes perhaps table name and core keys to the function in a set based query.

    Here's more.  PO table A might have in addition to key info,  color and weight columns because product lines that go in that table are characterized by only those 2 attributes.    Table B might have height, width and thickness.   and so on.  The json formatted record is shown below for one po table that actually has 29 attributes/columns that are mostly blacked out.  i'm not a json guy but i believe the name to the left of each slash is a section and the name to the right is a specific field contained in that section.

    if we can pull this off, we can modify what is generated by the union all by simply changing the biz table metadata.

    so if anyone is still with me, has anyone seen custom code that does something like this and is posted publicly somewhere for all to share?

    jsonquestion

     

     

  • I've not heard of anything like that, not that I've looked.

    But if you are able to pull together some sample data and desired results, someone here might have a go at coding it for you in T-SQL.

    If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.

  • Haven't seen this. I might look at a specialized view (yikes) or proc that normalizes the data from the differently formatted PO tables and then joins those results.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply