0
我想通過spark-sql將'123,456'轉換爲123456(字符串爲int)。如何從spark-sql中的字符串中刪除特定字符
我試過這樣。
REPLACE('123,456', ',', '')
但它沒有工作,因爲火花-SQL不允許REPLACE()
我想通過spark-sql將'123,456'轉換爲123456(字符串爲int)。如何從spark-sql中的字符串中刪除特定字符
我試過這樣。
REPLACE('123,456', ',', '')
但它沒有工作,因爲火花-SQL不允許REPLACE()
假設所有數據都是數字,而存儲在VARCHAR轉換功能應該可以解決您的問題
conv(Column num,
int fromBase,
int toBase)
有沒有演員或轉換功能? – maSTAShuFu
是的,有投射功能。但它不起作用。 – hyeon