नोट
इस पृष्ठ तक पहुंच के लिए प्राधिकरण की आवश्यकता होती है। आप साइन इन करने या निर्देशिकाएँ बदलने का प्रयास कर सकते हैं।
इस पृष्ठ तक पहुंच के लिए प्राधिकरण की आवश्यकता होती है। आप निर्देशिकाएँ बदलने का प्रयास कर सकते हैं।
Applies to:
Databricks Runtime 16.0 and above
Translates a string back from application/x-www-form-urlencoded format, or NULL if the format is incorrect.
Syntax
try_url_decode(str)
Arguments
str: ASTRINGexpression to decode.
Returns
A STRING.
If the string does not comply with the application/x-www-form-urlencoded format, the function returns NULL.
To raise CANNOT_DECODE_URL instead, use the url_decode() function.
Examples
> SELECT url_encode('http://spark.apache.org/path?query=1');
http%3A%2F%2Fspark.apache.org%2Fpath%3Fquery%3D1
> SELECT try_url_decode('http%3A%2F%2Fspark.apache.org%2Fpath%3Fquery%3D1');
http://spark.apache.org/path?query=1
> SELECT try_url_decode('http%3A%2F%2spark.apache.org');
NULL
> SELECT url_decode('http%3A%2F%2spark.apache.org');
Error: CANNOT_DECODE_URL
> 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