Introduce support for the ::type cast operator in Fabric Data Warehouse as syntactic sugar for the existing CAST(... AS type) expression. The new operator would be functionally equivalent and compile to the same internal representation, providing a more concise and familiar syntax for users coming from PostgreSQL, Snowflake, Databricks, and other modern SQL engines:
Examples
SELECT '123'::INT; SELECT order_date::DATE; SELECT total_amount::DECIMAL(10,2);
Benefits
- Reduces verbosity for common type conversions.
- Improves developer productivity and query readability.
- Aligns Fabric DW with widely adopted SQL dialects that already support ::type.
- Low-risk addition because it is purely syntactic and can be translated internally to existing CAST semantics.
2 Comments
- Simonsabin2
Advocate II
Casting to dates, would like it to be able to take a format, culture
- ESommmarskogNew Member
No, it should be syntactic sugar for CAST/CONVERT. It should be syntactic sugar for TRY_CAST/TRY_CONVERT. That is, a failed conversion should result in NULL, not an error. If not the operator is quite useless.
Recent ideas
Unable to access shortcuts using spark
I have created shortcuts between same tenant lakehouses using a service principal through the REST API endpoints. I am not able to query the tables using spark using either relative or full abfss pat...kasperkærgaard6 hours agoNew MemberNew2Views0likes0Comments