SqlExpression.SchemaFrom
ExpressionInternalReturns schema information from a SQL-related expression. Intended for internal use only.
Syntax
SqlExpression.SchemaFrom(schema as any) as anyParameters
| Name | Type | Required | Description |
|---|---|---|---|
schema | any | Yes | The schema value to process. |
Return Value
any — Schema information derived from the provided input.
Remarks
SqlExpression.SchemaFrom is an internal-only function as stated in the official Microsoft documentation. It is part of the SqlExpression family of functions that support query folding infrastructure within the Power Query engine.
This function is used internally by the engine and custom SQL-based connectors to extract or process schema information from SQL-related expressions. The schema information is typically used during query folding to map M table types to SQL table schemas.
For standard M query development, this function has no practical use. Custom connector developers working with SQL-based data sources should refer to the Power Query SDK documentation for guidance on implementing query folding using Table.View handlers.
Examples
Example 1: Conceptual usage
let
// SqlExpression.SchemaFrom is used internally by the Power Query engine
// for SQL query folding. It is not intended for direct use in M queries.
//
// Custom connector developers implement query folding via Table.View handlers,
// which may use SqlExpression functions behind the scenes.
Result = "See Table.View for query folding patterns"
in
Result