- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Is there any way to cast string to map?
- Labels:
-
Apache Impala
Created 11-19-2021 02:30 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is there any way to cast string to map in Impala?
e.g:
select cast("A:1,B:1,C:1") as map<string, int>
Created 11-22-2021 07:06 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, the complex MAP data type is supported, however it may not be as usable as other simple types. Please see:
https://docs.cloudera.com/runtime/7.2.10/impala-sql-reference/topics/impala-map.html
and
There is a similar "GET_JSON_OBJECT" built-in UDF, which may help you - depending what you need to achieve, please see:
Created 11-22-2021 07:06 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, the complex MAP data type is supported, however it may not be as usable as other simple types. Please see:
https://docs.cloudera.com/runtime/7.2.10/impala-sql-reference/topics/impala-map.html
and
There is a similar "GET_JSON_OBJECT" built-in UDF, which may help you - depending what you need to achieve, please see:
Created 11-30-2021 10:28 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@HareshAmin, Has the reply helped resolve your issue? If so, please mark the appropriate reply as the solution, as it will make it easier for others to find the answer in the future.
Regards,
Vidya Sargur,Community Manager
Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.
Learn more about the Cloudera Community:
