I have a table with following schema
PK" text,
"SK" text,
":attrs" map<text, blob>,
PRIMARY KEY ("PK", "SK")
I would like to get the string value of a record that I inserted into this table? Currently I am getting the hexadecimal values since it's a blob.
Something like this but I can't get the syntax right
select blobAsText(":attrs"['key_name']) from my_table
First, I don't even know if
:attrsas a column name is supported having special characters other than underscore (_), but let's park that for now.The
blobAsTextnative cql function doesn't support collection column types as you're attempting to do here.See here as an example, this below works:
whereas, this is what will work with collections,
If you want the value for a given key and convert that, you will need to do that at the application side. See latest Java driver docs here as an example.