Comments (10)
from crate.
Hi @jphjsoares, thanks for reporting! Looks like Windows specific bug.
from crate.
I forgot to mention it, but I'm also unable to copy all the data from one table to the other by using the good and old: INSERT INTO table2 (SELECT * FROM table1)
. The command will copy the shards, but Crate reports 0 total records. Does that also have to do with this bug or should I create a separate issue?
from crate.
I forgot to mention it, but I'm also unable to copy all the data from one table to the other by using the good and old:
INSERT INTO table2 (SELECT * FROM table1)
. The command will copy the shards, but Crate reports 0 total records. Does that also have to do with this bug or should I create a separate issue?
Yes please, with details of SHOW CREATE TABLE
for both tables and any error you get in the logs.
Keep in mind, that before opening a concrete github issue, you can also use our community portal: https://community.cratedb.com/
Keep in mind we have an open issue to address this scenario of INSERT INTO ... SELECT
where no error is returned, just number of inserted rows: #12218
from crate.
Sure, here it is:
You can see that the only difference is in the shards. It was an attempt to migrate to a table with less shards.
The query is executed with success, but 0 records are actually copied. Only shards.
CREATE TABLE IF NOT EXISTS "my_schema"."test" (
"test_int" INTEGER,
"test_string" TEXT,
"timestamp" TIMESTAMP WITH TIME ZONE,
"edate" TIMESTAMP WITH TIME ZONE GENERATED ALWAYS AS date_trunc('week', "timestamp")
)
CLUSTERED INTO 4 SHARDS
PARTITIONED BY ("timestamp")
WITH (
"allocation.max_retries" = 5,
"blocks.metadata" = false,
"blocks.read" = false,
"blocks.read_only" = false,
"blocks.read_only_allow_delete" = false,
"blocks.write" = false,
codec = 'default',
column_policy = 'strict',
"mapping.total_fields.limit" = 1000,
max_ngram_diff = 1,
max_shingle_diff = 3,
number_of_replicas = '0-1',
"routing.allocation.enable" = 'all',
"routing.allocation.total_shards_per_node" = -1,
"store.type" = 'fs',
"translog.durability" = 'REQUEST',
"translog.flush_threshold_size" = 536870912,
"translog.sync_interval" = 5000,
"unassigned.node_left.delayed_timeout" = 60000,
"write.wait_for_active_shards" = '1'
)
CREATE TABLE IF NOT EXISTS "my_schema"."test2" (
"test_int" INTEGER,
"test_string" TEXT,
"timestamp" TIMESTAMP WITH TIME ZONE,
"edate" TIMESTAMP WITH TIME ZONE GENERATED ALWAYS AS date_trunc('week', "timestamp")
)
CLUSTERED INTO 1 SHARDS
PARTITIONED BY ("timestamp")
WITH (
"allocation.max_retries" = 5,
"blocks.metadata" = false,
"blocks.read" = false,
"blocks.read_only" = false,
"blocks.read_only_allow_delete" = false,
"blocks.write" = false,
codec = 'default',
column_policy = 'strict',
"mapping.total_fields.limit" = 1000,
max_ngram_diff = 1,
max_shingle_diff = 3,
number_of_replicas = '0-1',
"routing.allocation.enable" = 'all',
"routing.allocation.total_shards_per_node" = -1,
"store.type" = 'fs',
"translog.durability" = 'REQUEST',
"translog.flush_threshold_size" = 536870912,
"translog.sync_interval" = 5000,
"unassigned.node_left.delayed_timeout" = 60000,
"write.wait_for_active_shards" = '1'
)
from crate.
@jphjsoares thanks for the additional information.
Since it's not related to COPY FROM,
please create a new issue with the table schemas you posted above. Also, please post there a result of select count(*) from my_schema.test2
Asking because not sure what you mean by
The command will copy the shards, but Crate reports 0 total records
So you are saying that INSERT works but reports incorrect number of inserted records or you meant something different? In any case, please elaborate in the new dedicated issue.
Thanks!
from crate.
Just created it here, hopefully I was able to explain it a little bit better there 😄
from crate.
Hi @jphjsoares, I could reproduce on a Windows machine but the problem can be resolved by applying a tip from the docs
Tip
If you are using Microsoft Windows, you must include the drive letter in the file URI.
For example:
file://C:/tmp/import_data/quotes.json
copy quotes from 'file:///C:/full/path/te*.json' ;
worked for me locally. Could you please try it?
from crate.
ftr: We do have tests covering such scenario and we even used to run Windows tests on CI in the past.
Tests passes on Windows since we don't use path as a string but compute it like getResource("test_file").toURI()...
and this gets resolved to a correct path with drive, as hinted in docs.
from crate.
Related Issues (20)
- Improvement to the shard allocation logic when `max_shards_per_node` configured HOT 2
- Consider if some words could be allowed as identifier names without quoting HOT 1
- Vector Store: Support for Cosine similarity and Dot Product when creating a FLOAT_VECTOR HOT 2
- fdw: Parquet foreign data wrapper (write support)
- `_raw` returns IDs instead of column names HOT 4
- FDW - Can't query data from remote server using a non-superuser HOT 1
- ElasticsearchUncaughtExceptionHandler] [crate1] uncaught exception in thread [main] HOT 2
- Expand blob data type limitations in the docs
- dev cluster hash join regression HOT 1
- JWT: support public keys caching HOT 3
- Architecture image not readable in dark mode HOT 1
- fdw/jdbc: Support and document adding additional jdbc drivers
- Improve insert performance for partitioned tables HOT 2
- max_shards_per_node not behaving as documented HOT 5
- Improve SQLParseException to include query and approximate position of the error. HOT 2
- Vector Store: Provide distance functions as scalar functions HOT 3
- Support for CREATE TYPE HOT 5
- Unable to copy data between tables using the syntax: `INSERT INTO test2 (SELECT * FROM test)` HOT 5
- Docker image for 5.5.4 unavailable HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from crate.