这篇文章主要介绍了怎么安装并使用SAP HANA Express Edition,具有一定借鉴价值,感兴趣的朋友可以参考下,希望大家阅读完这篇文章之后大有收获,下面让小编带着大家一起了解一下。
创新互联是专业的榕城网站建设公司,榕城接单;提供成都网站制作、成都网站设计、外贸营销网站建设,网页设计,网站设计,建网站,PHP网站建设等专业做网站服务;采用PHP框架,可快速的进行榕城网站开发网页制作和功能扩展;专业做搜索引擎喜爱的网站,专业的做网站团队,希望更多企业前来合作!文中介绍了一个yaml文件,里面声明了容器镜像文件store/saplabs/hanaexpress:2.00.033.00.20180925.2.
安装完成后,在启动的pod里有两个容器,分别运行着SQLPad和HANA Express.
SQLPad是一个基于Nodejs开发的直接在浏览器运行SQL查询并对结果进行可视化展示工具。SQLPad支持的数据库非常多,比如:MySQL, Postgres, SQL Server, Vertica, Crate, Presto等。
使用kubectl get services拿到sqlpad的external IP:
在浏览器里输入刚才获得的IP地址,后面加上默认的3000端口,打开sqlpad的web控制台:
注册一个帐户并登录:
选择admin-Connections:
新建一个数据库连接:
database driver从下拉菜单里选择SAP HANA:
回到Google Cloud Platform的cloud shell,使用kubectl get services获得hxe-connect的external IP:
把这个地址填到数据库创建向导里:
创建一个名为quotes的collection并插入一些数据:
create collection quotes; insert into quotes values ( { "FROM" : 'HOMER', "TO" : 'BART', "QUOTE" : 'I want to share something with you: The three little sentences that will get you through life. Number 1: Cover for me. Number 2: Oh, good idea, Boss! Number 3: It wai like that when I got here.', "MOES_BAR" : 'Point( -86.880306 36.508361 )', "QUOTE_ID" : 1 }); insert into quotes values ( { "EPISODE" : 'GRADE SCHOOL CONFIDENTIAL', "FROM" : 'HOMER', "QUOTE" : 'Wait a minute. Bart''s teacher is named Krabappel? Oh, I''ve been calling her Crandall. Why did not anyone tell me? Ohhh, I have been making an idiot out of myself!', "QUOTE_ID" : 2, "MOES_BAR" : 'Point( 2.161018 41.392641 )' }); insert into quotes values ( { "FROM" : 'HOMER', "QUOTE" : 'Oh no! What have I done? I smashed open my little boy''s piggy bank, and for what? A few measly cents, not even enough to buy one beer. Weit a minute, lemme count and make sure…not even close.', "MOES_BAR" : 'Point( -122.400690 37.784366 )', "QUOTE_ID" : 3 });
注意这个生成的sql collection并不是数据库表,而是一种document store(noSQL),实际上只是键值对-key value pair.
下面的SQL语句执行的操作是把document store里的值取出进行分析,将分析结果存放到新创建的column table里:
--Create a columnar table with a text fuzzy search index create column table quote_analysis ( id integer, homer_quote text FAST PREPROCESS ON FUZZY SEARCH INDEX ON, lon_lat nvarchar(200) ); -- Copy the quotes form the JSON store to the relational table insert into quote_analysis with doc_store as (select quote_id, quote from quotes) select doc_store.quote_id as id, doc_store.quote as homer_quote, 'Point( 2.151255 41.354159 )' from doc_store;
感谢你能够认真阅读完这篇文章,希望小编分享的“怎么安装并使用SAP HANA Express Edition”这篇文章对大家有帮助,同时也希望大家多多支持创新互联,关注创新互联-成都网站建设公司行业资讯频道,更多相关知识等着你来学习!