kafkaexport doesn't execute in spring mybatis
This query execute on dbeaver but spring mybatis not work
error message
[Vertica]VJDBC ERROR: Function emptymap() does not exist, or permission is denied for emptymap()
query
SELECT KafkaExport(null, product_id::VARCHAR, maptoString(mapput(emptymap(), 111, 'CCC', product_id, storepid, title, currency_type, price_pc, price_mobile, normal_price, link, link2, mobile_link, mobile_link2, add_image_link, category_name1, category_name2, category_name3, category_name4, naver_category, naver_product_id, condition, import_flag, parallel_import, order_made, product_flag, adult, goods_type, barcode, manufacture_define_number, model_number, brand, src_brand, maker, origin, card_event, event_words, coupon, partner_coupon_download, interest_free_event, point, installation_costs, pre_match_code, search_tag, group_id, vendor_id, coordi_id, minimum_purchase_quantity, review_count, shipping, delivery_grade, delivery_detail, attribute, option_detail, seller_id, age_group, gender, product_type, mall_id, pipe_id, class, mall_name, registerd_time, update_time, agency_id, billing_type, deleted, image_status, image_link, salestart, saleend, freedlvyn, salelimit, salemax, salecnt, modelnm, poplrdgr, display, vendor_product_id, category_master_code, ws_1depth_code, ws_1depth, ws_2depth_code, ws_2depth, ws_3depth_code, ws_3depth, ws_4depth_code, ws_4depth, ws_5depth_code, ws_5depth, cdn_image_path, cdn_image_name, cdn_image_name_orig, image_checksum, image_clustered_yn, reg_images, image_collect_time, category_status, vendor_category_hash, src_deleted, deleted_time, product_hash, brand_id, brand_status USING parameters keys = SetMapKeys('total','uuid','product_id', 'storepid', 'title', 'currency_type', 'price_pc', 'price_mobile', 'normal_price', 'link', 'link2', 'mobile_link', 'mobile_link2', 'add_image_link', 'category_name1', 'category_name2', 'category_name3', 'category_name4', 'naver_category', 'naver_product_id', 'condition', 'import_flag', 'parallel_import', 'order_made', 'product_flag', 'adult', 'goods_type', 'barcode', 'manufacture_define_number', 'model_number', 'brand', 'src_brand', 'maker', 'origin', 'card_event', 'event_words', 'coupon', 'partner_coupon_download', 'interest_free_event', 'point', 'installation_costs', 'pre_match_code', 'search_tag', 'group_id', 'vendor_id', 'coordi_id', 'minimum_purchase_quantity', 'review_count', 'shipping', 'delivery_grade', 'delivery_detail', 'attribute', 'option_detail', 'seller_id', 'age_group', 'gender', 'product_type', 'mall_id', 'pipe_id', 'class', 'mall_name', 'registerd_time', 'update_time', 'agency_id', 'billing_type', 'deleted', 'image_status', 'image_link', 'salestart', 'saleend', 'freedlvyn', 'salelimit', 'salemax', 'salecnt', 'modelnm', 'poplrdgr', 'display', 'vendor_product_id', 'category_master_code', 'ws_1depth_code', 'ws_1depth', 'ws_2depth_code', 'ws_2depth', 'ws_3depth_code', 'ws_3depth', 'ws_4depth_code', 'ws_4depth', 'ws_5depth_code', 'ws_5depth', 'cdn_image_path', 'cdn_image_name', 'cdn_image_name_orig', 'image_checksum', 'image_clustered_yn', 'reg_images', 'image_collect_time', 'category_status', 'vendor_category_hash', 'src_deleted', 'deleted_time', 'product_hash', 'brand_id', 'brand_status'))) USING PARAMETERS brokers = 'kafka:9092', topic='vertica_big3') OVER (PARTITION BEST) FROM wmp_ep_product_dev.products WHERE product_id LIKE 'AAA%'
Answers
select * from user_functions where function_name ilike 'emptymap' limit 1;
shows that EmptyMap is in the public schema.
Maybe when running in spring mybatis, you have a wrong search_path or a user without proper privileges?
This could also be a sign that the flextable udx is not loaded. It should have been loaded by /opt/vertica/packages/flextable/ddl/install.sql