hana数据库导入mysql_在SAP HANA Express Edition里创建数据库表

使用命令行访问hdbsql:

# hdbsql -u SYSTEM -d SYSTEMDB -i 90

输入SYSTEM用户的密码。

在默认的HXE database tenant上启用document store:

ALTER DATABASE HXE ADD 'docstore';

使用下面的命令行创建一个document store collection:

CREATE COLLECTION food_collection;

注:hqlsql主要是用于Administration类型的工作使用,开发过程中最好还是用sqlpad等工具连接SAP HANA express.

往该document store里插入数据:

INSERT INTO food_collection VALUES('{ "name" : "Kiwi", "group" : "Fruits", "subgroup" : "Tropical fruits", "nutrients" : { "Carbohydrate" : 20945.0, "Energy" : 176.0, "Fat" : 1955.0, "Fiber" : 1925.0, "Proteins" : 1421.3 }, "description" : "The kiwifruit, often shortened to kiwi in many parts of the world, is the edible berry of a woody vine in the genus Actinidia. The most common cultivar group of kiwifruit (''Hayward'') is oval, about the size of a large hen''s egg (5?8 centimetres in length and 4.5?5.5 centimetres in diameter). It has a fibrous, dull greenish-brown skin and bright green or golden flesh with rows of tiny, black, edible seeds. The fruit has a soft texture and a sweet but unique flavor, and today is a commercial crop in several countries, such as Italy, New Zealand, Chile, Greece and France." }');

INSERT INTO food_collection VALUES('{ "name" : "Onion", "group" : "Vegetables", "subgroup" : "Onion-family vegetables", "nutrients" : { "Carbohydrate" : 18057.407, "Energy" : 345.333, "Fat" : 0.0, "Fiber" : 2296.154, "Proteins" : 2150.741 }, "description" : "Allium haematochiton is a species of wild onion known by the common name redskin onion. It is native to northern Baja California and southern California. It it grows on the slopes of the coastal hills and mountains, such as those of the Peninsular Ranges, Transverse Ranges, and southern Califo

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值