From 9a05f531b96d0671d24213d90e5b90ad32a394d2 Mon Sep 17 00:00:00 2001 From: Will Baker Date: Mon, 30 Sep 2024 16:50:47 -0400 Subject: [PATCH] materializations: use correct resource path when building InfoSchema in Open Fixes a bug where an uninitialized resource was being used to populate the resourcePaths list. The standard InfoSchema builder only really cares about the "schema" part of the resource path, so this handling was actually working most of the time when a materialization's tables were all in the same schema as its metadata tables. But if there are tables in other schemas, they weren't being property enumerated. --- materialize-sql/driver.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/materialize-sql/driver.go b/materialize-sql/driver.go index 76041d1f5..7ac667f44 100644 --- a/materialize-sql/driver.go +++ b/materialize-sql/driver.go @@ -263,8 +263,8 @@ func (d *Driver) NewTransactor(ctx context.Context, open pm.Request_Open) (m.Tra var tables []Table for index, spec := range open.Materialization.Bindings { + resourcePaths = append(resourcePaths, spec.ResourcePath) var resource = endpoint.NewResource(endpoint) - resourcePaths = append(resourcePaths, resource.Path()) if err := pf.UnmarshalStrict(spec.ResourceConfigJson, resource); err != nil { return nil, nil, fmt.Errorf("resource binding for collection %q: %w", spec.Collection.Name, err)