如何生成查询以克隆现有表(How to generate the query to clone an existing table)

编程入门 行业动态 更新时间:2024-10-17 05:02:26
如何生成查询以克隆现有表(How to generate the query to clone an existing table)

我使用社区版的Cassandra(不是DSE)。 早些时候我曾经使用过一种名为descanter的工具。 当我在现有表格中的descanter中单击“克隆”时。 它曾经给我重新创建现有表所需的CQL。

现在在我的新MacOS(High Sierra)上,devcenter工具被打破了。 我在论坛上搜索,发现DataStax无意维护该工具。

所以我现在使用命令行CQLSH。 现在在CQLSH中,如果我有一个现有的表。 如何生成查询以克隆现有表?

我只需要表结构。 我不需要任何数据。

我无法实际登录到Cassandra服务器。 所以一切都需要通过使用CQLSH远程连接到Cassandra来完成。

I use the community edition of Cassandra (not DSE). Earlier I used to use a tool called descanter. when I click "clone" in descanter on an existing table. it used to give me the CQL necessary to re-create the existing table.

Now on my new MacOS (High Sierra) the devcenter tool is broken. I searched on the forums and found that DataStax has no intention of maintaining the tool.

So I am now using the command line CQLSH. Now in CQLSH if I have an existing table. How to generate the query to clone an existing table?

I only need the table structure. I don't need any data.

I cannot physically login to the Cassandra server. So everything needs to be done by connecting to Cassandra remotely using CQLSH.

最满意答案

DESCRIBE命令应该可以帮到你

DESCRIBE command should help you

更多推荐

本文发布于:2023-07-14 14:29:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1105097.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:query   generate   clone   table   existing

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!