-
Notifications
You must be signed in to change notification settings - Fork 8
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
MySQL source resource #486
Conversation
return b | ||
} | ||
|
||
func (b *SourceMySQLBuilder) Size(s string) *SourceMySQLBuilder { |
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.
this isn't relevant anymore, right?
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.
This is used by the read func to get the size of the cluster where the source is created in:
COALESCE(mz_sources.size, mz_clusters.size) AS size, |
This was part of the migration that allowed us to remove notion of linked clusters in Terraform.
docs/resources/source_mysql.md
Outdated
- `ownership_role` (String) The owernship role of the object. | ||
- `region` (String) The region to use for the resource connection. If not set, the default region is used. | ||
- `schema_name` (String) The identifier for the source schema. Defaults to `public`. | ||
- `table` (Block List) Specifies the tables to be included in the source. If not specified, all tables are included. (see [below for nested schema](#nestedblock--table)) |
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.
should we also add support for the FOR SCHEMAS
option?
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.
Not planing to add FOR SCHEMAS
option as part of this discussion here which caused some major issues with the Postgres source.
Just reworked an old PR to patch this on the Postgres side, will cherry pick some of the changes here as well.
return diag.FromErr(err) | ||
} | ||
o := materialize.MaterializeObject{ObjectType: "SOURCE", Name: sourceName, SchemaName: schemaName, DatabaseName: databaseName} | ||
// b := materialize.NewSource(metaDb, o) |
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.
is this relevant? should we allow updating a source object at all?
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.
Yes, you can update some propertites like the the name of the source, comments, ownership and etc.
I still have to work on implementing the subsources as well, eg. adding and removing subsources ALTER SOURCE "database"."schema"."source" ADD SUBSOURCE "table_1" AS "table_alias";
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.
Ah got it! Just so you know the ALTER SOURCE
statements are not yet supported for MySQL.
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.
Ah yes, I've created a follow up issue for this: #490
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.
nice work!
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.
test_columns/ignore_columns addition lgtm
This is mainly intended to lay the ground work for the MySQL source resource. Probably there are some missing configuration options that I'll have to add here.