Can I Pivot in Snowflake without single quotes, without manually aliasing the column names?

  Kiến thức lập trình

My use case is quite specific, and I couldn’t find a way of doing that as for now.

I am dynamically pivoting my tables using a stored procedure, because my pivoted outputs sometimes have hundreds of different columns. The only issue that I have now is the columns have single quotes around them, and I would very much like to get rid of them in automated way.

Aliasing the columns don’t work, because as I said I have hundreds of different columns for each output. I need a way of pivoting without single quotes or have an easy way of automatically renaming the columns without the quotes. Is there anything that would help me with it?

I’ve never worked with Python code either, but I’ve heard it’s possible to run it in Snowflake directly. I am just looking for a way of doing that automatically.

LEAVE A COMMENT