 	sv_name_slug_with_geom text;
 	success boolean := false;
 	sv_create text := '';
-	att_view_name text;
+	att_table_name text;
 	g record;
 	tmp_geom_type text;
 begin
 	sv_name_slug := __arches_slugify(spatial_view_name);
-	att_view_name := __arches_create_attribute_view(sv_name_slug, geometry_node_id, attribute_node_list);
+	att_table_name := __arches_create_spatial_view_attribute_table(sv_name_slug, geometry_node_id, attribute_node_list);
 
 	for g in select unnest(string_to_array('ST_Point,ST_LineString,ST_Polygon'::text,',')) as geometry_type
 	loop
-		if att_view_name <> 'error' then
+		if att_table_name <> 'error' then
 		
 			tmp_geom_type := g.geometry_type;
 			sv_name_slug_with_geom := format('%s_%s',sv_name_slug, lower(replace(tmp_geom_type,'ST_','')));

drop function if exists __arches_get_domain_label;
drop function if exists __arches_get_resourceinstance_label;
drop function if exists __arches_get_nodevalue_label;
drop function if exists __arches_slugify;
drop role if exists arches_featureservices;
*/

----------- existing from ROB

create or replace function __arches_slugify(
	"value" text
) returns text as $$

end;
$$;


create or replace function __arches_get_domain_list_label(domain_value_list jsonb, nodeid text) returns text language plpgsql as $$
declare
	return_label text := '';
