Search code examples
snowflake-cloud-data-platform

What's the difference between withColumn and with_column in Snowflake?


I have seen that there are many DataFrame functions that are the same - the only difference that one is written in camelCase and other in the snake_case. Does there any performance difference between those functions? What is the purpose of it? Why some of them have duplicates and some of them not?

For example: DataFrame.withColumn and DataFrame.with_column - there are more examples

More details in documentation: https://docs.snowflake.com/en/developer-guide/snowpark/reference/python/latest/api/snowflake.snowpark.DataFrame.select_expr

I tested both of the functions and it seems that they are working as intended.


Solution

  • There is no difference. Snowflake often has aliases for function names for convenience. This specific case can be seen in the dataframe.py source code.