snowflake-cli icon indicating copy to clipboard operation
snowflake-cli copied to clipboard

Introduce entity identifier

Open sfc-gh-turbaszek opened this issue 6 months ago • 0 comments

Pre-review checklist

  • [x] I've confirmed that instructions included in README.md are still correct after my changes in the codebase.
  • [x] I've added or updated automated unit tests to verify correctness of my new code.
  • [x] I've added or updated integration tests to verify correctness of my new code.
  • [ ] I've confirmed that my changes are working by executing CLI's commands manually on MacOS.
  • [ ] I've confirmed that my changes are working by executing CLI's commands manually on Windows.
  • [ ] I've confirmed that my changes are up-to-date with the target branch.
  • [ ] I've described my changes in the release notes.
  • [x] I've described my changes in the section below.

Changes description

This change introduces unified approach for entities identifiers. Following options are possible

entities:
  key_only:
      ...

  fqn.as.key:
      ...

  name_only:
    identifier: name
    ...

  fqn_name_only:
    identifier: database.schema.name
    ...

  fqn_schema:
    identifier:
      name: name
      schema: schema
    ...

  fqn_database:
    identifier:
      name: name
      schema: schema
      database: database
    ...

If identifier specifier is missing then entity key is used as id. On entity level there's fqn property that returns FQN object representing fully qualified name.

sfc-gh-turbaszek avatar Aug 02 '24 10:08 sfc-gh-turbaszek