-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DynamoDB: Add software test for decoding list of objects #246
Conversation
RECORD_UTM = { | ||
"Id": {"N": "101"}, | ||
"utmTags": { | ||
"L": [ | ||
{ | ||
"M": { | ||
"date": {"S": "2024-08-28T20:05:42.603Z"}, | ||
"utm_adgroup": {"L": [{"S": ""}, {"S": ""}]}, | ||
"utm_campaign": {"S": "34374686341"}, | ||
"utm_medium": {"S": "foobar"}, | ||
"utm_source": {"S": "google"}, | ||
} | ||
} | ||
] | ||
}, | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on this input data (DynamoDB table record), and a SQL DDL like
CREATE TABLE IF NOT EXISTS foobar (data OBJECT(DYNAMIC));
[...]
results = cratedb.database.run_sql("SELECT * FROM testdrive.demo;", records=True) # noqa: S608 | ||
assert results[0]["data"] == { | ||
"Id": 101.0, | ||
"utmTags": [ | ||
{ | ||
"date": "2024-08-28T20:05:42.603Z", | ||
"utm_adgroup": ["", ""], | ||
"utm_campaign": "34374686341", | ||
"utm_medium": "foobar", | ||
"utm_source": "google", | ||
} | ||
], | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.... that's the outcome that proves data converges into a CrateDB record well, afaics.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let get this out.
Thanks for acknowledging. It's just a software test. No code has been adjusted, so this will not yield or need another release. |
About
People reported problems converging a list of objects from DynamoDB to CrateDB. Adding a test case to evaluate the situation.
References