Comments (4)
@scalar-kato
結果
テストしたところ、テーブルのフォーマットとデータのフォーマットが異なる場合、エラーが発生しました, それ以外は問題ありませんでした。Scalardb 2.x.x, と 3.0.0 使用した.
動けるのやり方
// table_format.json
{
"test.sample": {
"transaction": true,
"partition-key": [
"c1"
],
"clustering-key": [
"c2"
],
"columns": {
"c1": "TEXT",
"c2": "TEXT"
}
}
}
// data.json
[{
"c1": "foo",
"c2": "bar"
}]
それとも
[{
"c1": "foo",
"c2": "bar",
"c3": "",
}]
// 実行するのコマンド
build/install/data_loader/bin/data_loader --properties=src/main/resources/scalardb.properties --table-schema=src/main/resources/table.json --data-file=src/main/resources/data.json
// データベースで
c1 | c2 | before_c2 | before_c3 | before_tx_committed_at | before_tx_id | before_tx_prepared_at | before_tx_state | before_tx_version | c3 | tx_committed_at | tx_id | tx_prepared_at | tx_state | tx_version
----------+------+-----------+-----------+------------------------+--------------+-----------------------+-----------------+-------------------+------+-----------------+--------------------------------------+----------------+----------+------------
sad | help | null | null | null | null | null | null | null | | 1618371834744 | d5c177a5-4c5d-4ef2-8867-41e87b95cad3 | 1618371834607 | 3 | 1
sadss | help | null | null | null | null | null | null | null | 123 | 1618372084147 | 5514574a-f89e-460b-af82-d373d1a4eb3d | 1618372084088 | 3 | 1
sadss1 | help | null | null | null | null | null | null | null | | 1618372097629 | 10ea2783-a998-4214-abad-7b393dbab87f | 1618372097560 | 3 | 1
sadss112 | help | null | null | null | null | null | null | null | null | 1618372289174 | a26b5bde-eb83-4009-ae55-e8b2b86225d1 | 1618372289122 | 3 | 1
sadss11 | help | null | null | null | null | null | null | null | null | 1618372223439 | aa941be1-b98c-491a-b243-327f126da6f3 | 1618372223381 | 3 | 1
Additional Context
因みに、どのようにしてデータベースにデータを挿入するのかを知りたいのですが、データやテーブルのフォーマットを見せてもいいんですか?
また、どのようにしてエラーをリプロデュースすることができますか?
from scalardb.
@scalarindetail
実際のテーブルではないですが、例えばこのようなテーブル構成でテーブルを作成し、
// table_format.json
{
"test.sample": {
"transaction": true,
"partition-key": [
"c1"
],
"clustering-key": [
"c2"
],
"columns": {
"c1": "TEXT",
"c2": "TEXT",
"c3": "TEXT",
"c4": "TEXT"
}
}
}
下のようなデータ挿入を行いたいです。
今はエラーになると思います。
// data1.json
[{
"c1": "foo",
"c2": "bar"
}]
挿入するデータを下のようにするとエラーが起こらないことは把握していますが、私たちがやりたいことはdata1.jsonのやり方です。
// data2.json
[{
"c1": "foo",
"c2": "bar",
"c3": "hoge",
"c4": "hogehoge",
}]
from scalardb.
@scalar-kato
なるほど、そ言えば、data loaderのソースコードを修正が必要です。
from scalardb.
The existing data loader is obsolete and not maintained anymore. We are working on a new data loader, so please wait for a moment.
from scalardb.
Related Issues (20)
- ScalarDB prints ? instead of values HOT 1
- Scan after put doesn't return the written value, nor raise an error for EXTRA_READ HOT 2
- data_loaderをscalardb3.0.0に対応して欲しい HOT 1
- scalar-schemaを使ってパーティションキーあり、クラスタリーキーなし、セカンダリインデックスありの条件のテーブルをAmazon DynamoDBに登録したい HOT 5
- Scalar DB Schema Tool fails due to parser tool updates. HOT 3
- transaction.commit() unexpectedly succeeded without clustering keys HOT 1
- [Question]How to use ScalarDB in a way that data is stored in DynamoDBLocal? HOT 1
- Schema generator tool seems to be broken
- Non-serializable execution with write skew in some cases HOT 1
- Non-serializable execution (lost update) when a recode is deleted HOT 3
- Put operation without preceding Get operation fails after the first attempt HOT 3
- Refactor request: branching by SQLSTATE
- Add automated integration test to check server's backward compatiblity
- `DynamoAdmin.namespaceExists()`check only prefixes of namespaces
- update fails if immediately followed by an put
- Add missing table name to this exception message `StorageRuntimeException: no table information found` HOT 1
- Typecast issue exists in scalardb with cosmos db. HOT 4
- Backport to branch(3.8) failed: Bump com.scalar-labs:scalar-admin from 2.1.0 to 2.1.1 HOT 1
- Backport to branch(3.9) failed: Records should not be rolled back in rollback() when the transaction state is marked as COMMITTED in 2PC HOT 1
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 scalardb.