add suffix partial schema

Merge Request Checklist

  • Link to an issue
  • Include the proposed fix or feature
  • Include and update tests for the modified code
  • Include a documentation change
  • Add an entry in the Unreleased section of the CHANGELOG

Suffix partial schema name addition:

Changes in snowflake_connector.py in order to implement the possibility to use suffix partial schema like database.*_suffix as it is done for prefix like database.prefix_*.

In order to do that I changed the if clauses with a condition checking if the schema_name is starting/ending with *.

-> if a schema name is starting with * (ex: *_suffix) it means we have a suffix and the fetched schemas should be ending with the suffix.

-> if a schema name is ending with * (ex: prefix_*) it means we have a prefix and the fetched schemas should be starting with the suffix.

Bugfix for prefix like '%informative_schema' (and now suffix):

In order to also prevent information_schema to be include in the fetched schema if the suffix or prefix is respectively the end (ex: *_schema) or the start (ex: info*) of informative_schema, the same clause than in the # All Schemas clause have been added.

Black upgrade

As in the MR !111 (merged) I had issues with black and upgraded to 22.3.0

I don't think there is tests for this.

Once your merge request is complete, please assign it the Permifrost maintainers using the /assign_reviewer @gitlab-data/permifrost_maintainers placed in a comment for the review cycle. Once the review cycle is finished, the reviewer shall approve the merge request so it can be merged by any Permifrost developer, maintainer, or owner.

Edited by moreaupascal56

Merge request reports

Loading