Redshift 到 SparkSQL

问题描述 投票:0回答:1

选择 案件 当 d.深度 = 'Level_4' 时 '/' || RTRIM(TRIM(SPLIT_PART(bbn.edge_path_name, '/', 3) || '/' || SPLIT_PART(bbn.edge_path_name, '/', 4) || '/' || SPLIT_PART(bbn.edge_path_name, '/ ', 5) || '/' || SPLIT_PART(bbn.edge_path_name, '/', 6)), '/') 当 d.深度 = 'Level_3' 时 '/' || RTRIM(TRIM(SPLIT_PART(bbn.edge_path_name, '/', 3) || '/' || SPLIT_PART(bbn.edge_path_name, '/', 4) || '/' || SPLIT_PART(bbn.edge_path_name, '/ ', 5)), '/') 当 d.深度 = 'Level_2' 时 '/' || RTRIM(TRIM(SPLIT_PART(bbn.edge_path_name, '/', 3) || '/' || SPLIT_PART(bbn.edge_path_name, '/', 4)), '/') 当 d.深度 = 'Level_1' 时 '/' || TRIM(SPLIT_PART(bbn.edge_path_name, '/', 3)) 当 d.深度 = 'Root_Node' 那么 '/' END AS 表中的 browser_node_path

转换为 SparkSQL 转换为 SparkSQL 转换为 SparkSQL

apache-spark-sql amazon-redshift
1个回答
0
投票

选择 案件 当 d.depth = 'Level_4' 那么 '/' ||康卡特( 实时修剪( 修剪( 康卡特( split(bbn.edge_path_name, '/')[2], '/', split(bbn.edge_path_name, '/')[3], '/', split(bbn.edge_path_name, '/')[4], '/', 分割(bbn.edge_path_name,'/')[5] ) ), '/' ) 当 d.depth = 'Level_3' 那么 '/' ||康卡特( 实时修剪( 修剪( 康卡特( split(bbn.edge_path_name, '/')[2], '/', split(bbn.edge_path_name, '/')[3], '/', 分割(bbn.edge_path_name,'/')[4] ) ), '/' ) 当 d.深度 = 'Level_2' 时 '/' ||康卡特( 实时修剪( 修剪( 康卡特( split(bbn.edge_path_name, '/')[2], '/', split(bbn.edge_path_name, '/')[3] ) ), '/' ) 当 d.depth = 'Level_1' 那么 '/' || TRIM(split(bbn.edge_path_name, '/')[2]) 当 d.深度 = 'Root_Node' 那么 '/' END AS browser_node_path 从表

© www.soinside.com 2019 - 2024. All rights reserved.