url_decode
-Funktion
Gilt für: Databricks SQL Databricks Runtime 11.3 LTS und höher
Übersetzt einen String aus dem Format application/x-www-form-urlencoded zurück.
Syntax
url_decode(str)
Argumente
str
: Ein STRING-Ausdruck, der decodiert werden soll.
Gibt zurück
Die ist ein STRING-Element.
Wenn die Zeichenfolge nicht dem Format application/x-www-form-urlencoded entspricht, gibt die Funktion einen Fehler zurück.
Beispiele
> SELECT url_encode('http://spark.apache.org/path?query=1');
http%3A%2F%2Fspark.apache.org%2Fpath%3Fquery%3D1
> SELECT url_decode('http%3A%2F%2Fspark.apache.org%2Fpath%3Fquery%3D1');
http://spark.apache.org/path?query=1
> SELECT url_decode('http%3A%2F%2spark.apache.org');
Error: Illegal argument
> SELECT parse_url('http://spark.apache.org/path?query=1', 'QUERY', 'query');
1
> SELECT parse_url('http%3A%2F%2Fspark.apache.org%2Fpath%3Fquery%3D1', 'QUERY', 'query');
1