MetabaseCollection, MetabaseDashboard, and MetabaseQuestion shipped without a
.creator()/.create() factory, so connectors hand-build their qualifiedNames with
f-strings — duplicating Atlan's QN grammar per connector (the exact anti-pattern
the application-sdk conformance rule P028 flags).
Add creators that own the grammar centrally:
- MetabaseCollection.creator(name, connection_qualified_name, metabase_id)
-> {connection_qualified_name}/collections/{metabase_id}
- MetabaseDashboard.creator(...) -> {connection_qualified_name}/dashboards/{metabase_id}
- MetabaseQuestion.creator(...) -> {connection_qualified_name}/questions/{metabase_id}
The grammar is id-based (a Metabase system id in a typed segment) to match the
qualifiedNames connectors already write in production; a name-based grammar would
not match existing assets. This is a departure from the name-based house
convention and is called out for maintainer review.
Adds the generator method templates (methods/asset + methods/attribute) as the
source of truth, the regenerated asset methods, and parametrized creator tests
(creator, deprecated create warning, missing-param validation, modification).
Problem
MetabaseCollection,MetabaseDashboard, andMetabaseQuestionship without a.creator()/.create()factory (they only havecreate_for_modification). Because there's no factory that owns the qualifiedName grammar, connectors hand-build MetabasequalifiedNames with f-strings — duplicating Atlan's QN grammar per connector. That's exactly the anti-pattern the application-sdk conformance rule P028ManualQualifiedNameFStringflags (11 live warnings on one connector today, unresolvable in the app because no upstream factory exists).Change
Adds creators that own the grammar centrally:
creator(...)MetabaseCollectionname, connection_qualified_name, metabase_id{connection_qualified_name}/collections/{metabase_id}MetabaseDashboardname, connection_qualified_name, metabase_id{connection_qualified_name}/dashboards/{metabase_id}MetabaseQuestionname, connection_qualified_name, metabase_id{connection_qualified_name}/questions/{metabase_id}Each follows the standard pattern:
creator()+ a deprecatedcreate()alias on the asset, and anAttributes.create()that builds the QN and derivesconnector_name.Design note — id-based grammar (for maintainer review)
The house convention builds QN from the name (
{connection_qualified_name}/{name}). The Metabase creators instead use an id-based grammar with a typed segment (/collections/{metabase_id}), because that is the qualifiedName connectors already write in production — a name-based grammar would not match existing assets and would break dedup/lineage on adoption. This PR effectively establishes the canonical Metabase QN grammar; flagging it explicitly in case maintainers prefer a different shape.What's included
methods/asset/metabase_{collection,dashboard,question}.jinja2+methods/attribute/....creator, deprecated-createwarning, missing-parameter validation, andcreate_for_modification/trim_to_required. 24 tests, all passing;ruff checkclean;black-formatted.Notes
metabase_idis typedstr(callers stringify the Metabase system id).HISTORY.mduntouched — it looks release-curated; happy to add an entry in whatever form you prefer.