cratedb

Alter Table Primary key - Crate DB

一曲冷凌霜 提交于 2021-02-17 06:56:06
问题 I want to alter a table in my Crate DB to change the primary key constraint to add a column to the existing one. If I need to drop the constraint and create a new one what would be the SQL syntax for the same. I have been trying the conventional SQL syntax and it does not seem to work: alter table my_data_table drop primary key; the above command gives an error: SQLActionException[SQLParseException: line 1:34: no viable alternative at input 'alter table my_data_table drop'] I checked the

Running CrateDB in production

牧云@^-^@ 提交于 2020-01-06 04:53:06
问题 As suggested by https://crate.io/docs/crate/guide/en/latest/deployment/cloud/aws/ec2-setup.html. I've been trying to setup a CrateDb (3.0.2) cluster. However setting network.host: _site_ prevents the node from starting. Setting everything back to default settings of course starts the instance but this is bound to localhost . All I'm trying to do is to evaluate and set up CrateDB cluster. Sadly the error received isn't useful as it seems to complain about heap size (on a fresh Windows install

Backslash (\) and Quote (') in search/insert query jdbc

送分小仙女□ 提交于 2019-12-13 03:20:44
问题 I am using JDBC with cratedb(which almost uses PSQL protocols). It happens that when I try to execute a query like this String query = "select * from test where col1='dhruv\'"; It gives me Parser exception. Caused by: io.crate.shade.org.postgresql.util.PSQLException: Unterminated string literal started at position 39 in SQL select * from test where col1='dhruv\'. Expected char at io.crate.shade.org.postgresql.core.Parser.checkParsePosition(Parser.java:1310) at io.crate.shade.org.postgresql

Querying into CrateDB objects and skip if property not exists

微笑、不失礼 提交于 2019-12-13 00:54:58
问题 I'm trying to make a query into my CrateDB querying in objects where a property may exist. But I'm having some issues getting a ColumnUnknownException . My query looks quite easy: SELECT "attrs","location" FROM "doc"."raw_foo" WHERE attrs['management_entity'] != "" LIMIT 100; attrs column is an object with many attributes and, as I told before, some rows have management_entity property. Thanks! 回答1: Your query should have single quotes around not equal operator SELECT "attrs","location" FROM