Skip to content
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

Postgres source: consider renaming schema and table options #391

Open
morsapaes opened this issue Nov 30, 2023 · 3 comments · May be fixed by #419
Open

Postgres source: consider renaming schema and table options #391

morsapaes opened this issue Nov 30, 2023 · 3 comments · May be fixed by #419
Assignees
Labels
breaking change Will cause a breaking change in the next release discussion Issues that warrant a discussion

Comments

@morsapaes
Copy link
Contributor

The schema option takes a list of strings, so it'd be less confusing to call it schemas (= FOR SCHEMAS). The same is true for table (= FOR TABLES).

Not sure if there's a way to change this in a backwards-compatible way. It might be worth double-checking if there are similar examples and patch them all in one go.

@dehume
Copy link
Contributor

dehume commented Nov 30, 2023

Will compile the list of singular vs plural attribute names. We do have situations where we use the singular for an attribute but allow multiple blocks, but that is usually just for nested elements like columns in a table.

resource "materialize_table" "simple_table" {
  name          = "simple_table"
  column {
    name = "column_1"
    type = "text"
  }
  column {
    name    = "column_2"
    type    = "int"
  }

@dehume
Copy link
Contributor

dehume commented Dec 1, 2023

Lists For attributes that use list, we have more cases of singular than plural.

Attribute Resource Type Plural
availability_zones materialize_connection_aws_privatelink List of Strings X
not_null_assertions materialize_materialized_view List of Strings X
start_offset materialize_source_kafka List of Strings
header materialize_source_kafka List of Strings
subsource materialize_source_kafka List of Objects
subsource materialize_source_load_generator List of Objects
schema materialize_source_postgres List of Strings
text_columns materialize_source_postgres List of Strings X
subsource materialize_source_postgres List of Objects
subsource materialize_webhook List of Objects

Blocks We had decided should be singular. There are some blocks that use plural

Attribute Resource Type Plural
auction_options materialize_source_load_generator Block X
counter_options materialize_source_load_generator Block X
marketing_options materialize_source_load_generator Block X
tpch_options materialize_source_load_generator Block X
check_options materialize_webhook Block X
row_properties materialize_type Block X
map_properties materialize_type Block X
list_properties materialize_type Block X

@dehume dehume added the discussion Issues that warrant a discussion label Dec 15, 2023
@dehume dehume self-assigned this Dec 17, 2023
@dehume dehume linked a pull request Dec 19, 2023 that will close this issue
@dehume dehume added the breaking change Will cause a breaking change in the next release label Dec 20, 2023
@dehume
Copy link
Contributor

dehume commented Dec 20, 2023

We rename schema as an allowable attribute in the Postgres source #421

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change Will cause a breaking change in the next release discussion Issues that warrant a discussion
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants