溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

怎么安裝并使用SAP HANA Express Edition

發(fā)布時間:2021-11-26 11:03:46 來源:億速云 閱讀:194 作者:小新 欄目:互聯(lián)網(wǎng)科技

這篇文章主要介紹了怎么安裝并使用SAP HANA Express Edition,具有一定借鑒價值,感興趣的朋友可以參考下,希望大家閱讀完這篇文章之后大有收獲,下面讓小編帶著大家一起了解一下。

文中介紹了一個yaml文件,里面聲明了容器鏡像文件store/saplabs/hanaexpress:2.00.033.00.20180925.2.

安裝完成后,在啟動的pod里有兩個容器,分別運行著SQLPad和HANA Express.

SQLPad是一個基于Nodejs開發(fā)的直接在瀏覽器運行SQL查詢并對結(jié)果進行可視化展示工具。SQLPad支持的數(shù)據(jù)庫非常多,比如:MySQL, Postgres, SQL Server, Vertica, Crate, Presto等。

使用kubectl get services拿到sqlpad的external IP:

怎么安裝并使用SAP HANA Express Edition

在瀏覽器里輸入剛才獲得的IP地址,后面加上默認的3000端口,打開sqlpad的web控制臺:

怎么安裝并使用SAP HANA Express Edition怎么安裝并使用SAP HANA Express Edition

注冊一個帳戶并登錄:

怎么安裝并使用SAP HANA Express Edition

選擇admin-Connections:

怎么安裝并使用SAP HANA Express Edition

新建一個數(shù)據(jù)庫連接:

怎么安裝并使用SAP HANA Express Edition

database driver從下拉菜單里選擇SAP HANA:

怎么安裝并使用SAP HANA Express Edition

回到Google Cloud Platform的cloud shell,使用kubectl get services獲得hxe-connect的external IP:

怎么安裝并使用SAP HANA Express Edition

把這個地址填到數(shù)據(jù)庫創(chuàng)建向?qū)Ю铮?/p>

怎么安裝并使用SAP HANA Express Edition

創(chuàng)建一個名為quotes的collection并插入一些數(shù)據(jù):

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并不是數(shù)據(jù)庫表,而是一種document store(noSQL),實際上只是鍵值對-key value pair.

下面的SQL語句執(zhí)行的操作是把document store里的值取出進行分析,將分析結(jié)果存放到新創(chuàng)建的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”這篇文章對大家有幫助,同時也希望大家多多支持億速云,關注億速云行業(yè)資訊頻道,更多相關知識等著你來學習!

向AI問一下細節(jié)

免責聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權內(nèi)容。

AI