datacontract-cli icon indicating copy to clipboard operation
datacontract-cli copied to clipboard

feature export excel add an alternative template parameter , schema tab add Property row a PIVOT column of CustomProperties as Key (column header) Value (cell)

Open dmaresma opened this issue 6 months ago • 10 comments

Allow the datacontract-cli to customize the excel template to use as : datacontract export excel --output datacontract.xlsx datacontract.yaml --template https:\\www.github.com\company\odcs.alternative.excel.template.xlsx

and add column header and value from the Pivot of Properties customProperties

Image

dmaresma avatar May 29 '26 20:05 dmaresma

Custom properties can have description as well, and will get additional values such as vendor and authoriativeDefinitions in ODCS 3.2. This makes it hard to manage them via the pivot.

simonharrer avatar May 31 '26 19:05 simonharrer

Hi, if the customProperty vendor, authoritativeDefinition and description are related to the property and not the value, I suggest to add a dedicated customProperties Lexical Tab in the excel sheet with the property(a.k.a property (name), description, vendor and authoritativeDefinitions. I did not expect the schema.property.customProperties description, vendor and authoritative changes at each value of property, I'll implement the CP Lexical Tab. There is 'forms' Tab as Schema <table_name> and 'meta' tab as Instruction and Fundamentals.

dmaresma avatar May 31 '26 19:05 dmaresma

Yes, a single custom property can have its own description (string, already supported by ODCS 3.1), vendor (string), and authoritativeDefinitions (array of objects, again with type, url, description)

Hm, not sure what is the best approach.

Places where it can be put:

  • "Custom Properties" register card
  • "Schema XYZ" register card: Columns with indexed notation linke customProperty[0].property, customProperty[0].value, ...
  • "Schema XYZ" register card: lexical tab below the properties tab

I am unsure what the best approach is. My current preference is probably the one with customProperty[0].property in the schema register card. But I am open for other ideas. We had the same issue with quality checks, and added an additional quality register card.

It is even worse: how to map the actual type? Perhaps we need to add that information as well, defaulting to a string if not specified.

simonharrer avatar May 31 '26 20:05 simonharrer

The customProperty behaves as a key–value store (3.1.0). If the standard extends customProperty, and if description, vendor, and authoritativeDefinition are attributes related to the key (which is fine), then to manage duplicate properties shared across different vendors, we can adopt a reverse‑DNS notation such as:

  • property: vendor.propertyKeyName
  • value: propertyValue

This way, customProperty continues to behave as a simple key–value pair, while the reverse‑DNS notation provides a lightweight namespace mechanism for vendor‑specific behavior.

Example:
property: com.vendor.myQualityEngine.Rule
value: Entrypoint(0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55)

This is how I would manage it in the 3.1 specification.

I’m fine with the new attributes (vendor, description, authoritativeDefinition). I agree that governance needs explicit key properties. But how the rules are defined or implemented is our internal concern — going beyond that would be too intrusive.

Auguronomics avatar May 31 '26 21:05 Auguronomics

Let's wait until ODCS 3.2 gets released in the next few days, so that the design fits to the actual changes to customProperties. But if we want to support everything that the standard offers, the solution I currently like the most is an extension of the existing "Custom Properties" register card so that it can be used for specifying all kinds of custom properties, not just scoped to the whole contract:

Image

In this sketch, the left column could be a dropdown that supports all the locations where customProperties are supported in the standard. I based the additional columns on the right on this for now.

Whether this is a good approach in terms of usability depends on the way custom properties are used. I can think of solutions that would be more convenient, but unfortunately most of them would somehow limit possibilities.

jschoedl avatar Jun 27 '26 11:06 jschoedl

I like the Custom Properties lexical behaviour, and keep a Single pivot property(key) as column name and value as column and row intersection, I understand it introduces a kind of aggregation process to build the CustomerProperties lexical tab, but this what it is.

dmaresma avatar Sep 02 '26 17:09 dmaresma

I understand that a combined solution would be more convenient. I'll take a look if that works out:

  • new columns for Custom Properties in the register card of the schema as shown in your screenshot, which allows to set key/value pairs only
  • extension of the "Custom Properties" register card as shown in my screenshot, which supports the full range of ODCS 3.2 options
  • they should not specify different properties for the same column - in case of a conflict, there is a warning on import, but the dedicated "Custom Properties" register card has precedence over the schema-specific register card because it's more fine-grained

This entails a change at the Template as well as the support in the Data Contract CLI and the Excel import at Entropy Data.

jschoedl avatar Sep 04 '26 08:09 jschoedl

With PR #1610, we now support the whole ODCS 3.2.0 spec in the Excel import and export. Custom properties can now be set using both the Custom Properties sheet and dedicated columns on the right end of all sheets where it fits, as discussed.

jschoedl avatar Sep 09 '26 17:09 jschoedl

@dmaresma If you have feedback on the template changes, feel free to share it on GitHub or slack!

jschoedl avatar Sep 09 '26 18:09 jschoedl

@jschoedl I try it, and it's an amazing PR thank you so much, You rock !!!!

dmaresma avatar Sep 09 '26 18:09 dmaresma