-
Notifications
You must be signed in to change notification settings - Fork 322
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
chore(warehouse): handle schema change #2654
Conversation
67b8507
to
c196dbc
Compare
c196dbc
to
40ddf07
Compare
Codecov ReportBase: 45.47% // Head: 45.62% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #2654 +/- ##
==========================================
+ Coverage 45.47% 45.62% +0.14%
==========================================
Files 289 289
Lines 48001 48007 +6
==========================================
+ Hits 21830 21904 +74
+ Misses 24784 24716 -68
Partials 1387 1387
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
1b4dc9e
to
37e1149
Compare
37e1149
to
e06c501
Compare
…re.schema-table_driven-test
warehouse/schema.go
Outdated
const ( | ||
StringDataType = "string" | ||
BooleanDataType = "boolean" | ||
IntDataType = "int" | ||
BigIntDataType = "bigint" | ||
FloatDataType = "float" | ||
JSONDataType = "json" | ||
TextDataType = "text" |
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.
const ( | |
StringDataType = "string" | |
BooleanDataType = "boolean" | |
IntDataType = "int" | |
BigIntDataType = "bigint" | |
FloatDataType = "float" | |
JSONDataType = "json" | |
TextDataType = "text" | |
const ( | |
StringSchemaType SchemaType = "string" | |
BooleanSchemaType = "boolean" | |
IntSchemaType = "int" | |
BigIntSchemaType = "bigint" | |
FloatSchemaType = "float" | |
JSONSchemaType = "json" | |
TextSchemaType = "text" |
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.
Added these. Also, moved this to the models package.
…re.schema-table_driven-test
|
||
const ( | ||
StringDataType SchemaType = "string" | ||
BooleanDataType SchemaType = "boolean" |
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.
only the first constant in this group has an explicit type
https://stackoverflow.com/questions/55282615/golangci-lint-constant-explicit-type
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.
Minor nit.
…re.schema-table_driven-test
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.
thanks for addressing all the comments
Description
Schema Test
Use table-driven tests to handle schema change. The benefit here is we can be able to run these tests parallelly.
Handle Schema Change Behaviour
This is applied to the mismatch of data types between the warehouse schema and staging files schema.
Existing behavior
Current behavior
ErrIncompatibleSchemaConv
, when we are trying to do the conversion of the data but we are not able to do it.ErrSchemaConvNotSupported
, when we don't support the conversion of the data.Notion Ticket
https://www.notion.so/rudderstacks/Handle-schema-table-driven-tests-751462cd730d4e4aaf92fba22c575c34
Security