Skip to content

don't treat identifiers starting with @@ as macro #5601

@lBilali

Description

@lBilali

In mssql and fabric there are a couple of configuration functions which start with @@

https://learn.microsoft.com/en-us/sql/t-sql/functions/configuration-functions-transact-sql?view=sql-server-ver17

In some cases they are useful.
For instance @@DATEFIRST can be used to find out which day is set as first of week
and use that info to get iso_weekday which has always Monday as first day of week regardless of the configuration

When trying to use them they are treated like macros
we know that they can't be a macro since python does not support function names starting with @ hance no macro can have double @

Alternatively, always check if a macro exists before treating an identifier starting with @ as macro
If there is no macro then leave the code as is

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions