You can always write an M computed value, but that's about creating a query expression of M extents and/or values.
Currently in our bits we do not support the ability to reference T-SQL or CLR functions from within an M file (like doing DLLImport in C#).
But, we are seriously considering a feature to do this.
Tell us what you think of that feature.
I think some form of extensibility allowing this would be very useful. An easy and intuitive way would be something like the example above, but if that is not possible then defining GetDate and its' TSQL mapping in a separate assembly and referencing that from within M would work too.
Anyway, I like the
code attributes way of defining "extra" stuff/metadataso I would ask you to consider adding support for attributes in M, a set of built-in standard attributes for common customizations(as in the example above), as well as a way of plugging in customized attributes.Customized attributescouldbe defined in a separate CLR assembly along with related functionality for telling the M compiler how those attributes affects the generated T-SQL, or in a fashion similar to the "GetDate" declaration above.
Kris