我正在尝试编写代码以将值从SQL的列数据中剥离
这是“情节”列中的原始数据
enter code here
sql = '''
select
b.name,
b.episode[0] as Episode
from stations a
lateral view inline(a.results) b
'''
如果我在上面的代码段上运行,我将得到此输出
我试图这样写,但是出现错误
enter code here
sql = '''
select
b.name,
SUBSTR(a.episode[],5, 3) AS Episode
from stations a
lateral view inline(a.results) b
'''
及以下是我试图获得的正确答案