选择 案件 当 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
选择 案件 当 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 从表