In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Today, when customers are using vertica, they want to use the group_concat () function of MySQL.
The GROUP_CONCAT function returns a string result that is composed of value concatenations in the group. Because this function is not available in vertica. So you need to develop it yourself. Fortunately, someone has already written the expansion package of the third party. Here is a brief description of how to use it in vertica.
First download the extension package that implements the group_concat () function. Here is the download address. Download it and copy it to the server of vertica.
Extract the package with the root user.
[root@v001] unzip vertica-package.zip
Change the owner of this folder.
[root@v001] chown-R dbadmin:verticadba vertica-package/
Switch to the dbadmin user.
[root@v001] su-dbadm
Go to the unzipped folder
[dbadmin@v001] cd vertica-package/
There are many expansion packages under the file, we only need the string-package package, because this package contains the group_concat () function
Enter the folder
[dbadmin@v003 vertica-package] $cd strings_package/
You know through readme.md that you need to compile before you install
If it fails to compile: execute the following statement:
[root@v001] yum-y groupinstall "Development tools" & & yum-y groupinstall "Additional Development"
[dbadmin@v003 strings_package] $make [dbadmin@v003 strings_package] $make install
The following information is prompted even if the installation is successful.
Here's the test:
Connect to the database:
Enter:
Dbadmin= > select group_concat (node_name) over () from nodes
Output result:
Test the following statement again:
Dbadmin= > select schema_name,projection_name,group_concat (node_name) over (partition by schema_name,projection_name) from (select distinct node_name,schema_name,projection_name from storage_containers) sc order by schema_name,projection_name
Output result:
You can see that it has implemented the group_concat () function of MySQL.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.