How can Snowflake differentiate between the UDTF and the view when both share the same name?

Snowflake is context-aware, and the syntax for UDTF and the view is different. When using a function or UDTF, you have to add brackets () next to the UDTF name. When using a table name, you do not add brackets. Snowflake can differentiate between these two usages.

UDTF example:

FROM log l
JOIN TABLE(ip_asn(ip)) <----- Please note the brackets after the function ip_asn>>>(ip)<<<<

View example:

FROM ip_asn <----- Notice that there are no brackets next to it.

The reason we do not add the UDTF, function, or “fn” to the function name is to just keep things simple for our users.