Skip to content

Feature: Dynamic data masking - custom string#140

Merged
oscar60310 merged 3 commits intodevelopfrom
feature/dynamic-data-masking-custom-string
Jan 17, 2023
Merged

Feature: Dynamic data masking - custom string#140
oscar60310 merged 3 commits intodevelopfrom
feature/dynamic-data-masking-custom-string

Conversation

@fredalai
Copy link
Contributor

@fredalai fredalai commented Jan 11, 2023

Description

I made the masking tag, and support the partial masking function.

The built-in tag masking is added using the following syntax:

{% masking <column-name> <masking-function> %}

For an example of SQL

SELECT
  {% masking id partial(2, 'xxxxxxx', 0) %} as id,
  name
FROM user;
SELECT
  {% masking id partial(2, 'xxxxxxx', 2) %} as id,
  name
FROM user;

Issue ticket number

closes #139

test (yarn run jest masking)

螢幕快照 2023-01-13 下午3 31 46

Additional Context

  • Implementing the partial function is based on considering the currently supported connectors and using a generic function to implement it.
  • Per discussion with Ivan before, maybe... in order to cope with different connectors, it may be possible in the future that implement a masking function for each connector

@vercel
Copy link

vercel bot commented Jan 11, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
vulcan-sql-document ✅ Ready (Inspect) Visit Preview Jan 16, 2023 at 9:23AM (UTC)

@codecov-commenter
Copy link

codecov-commenter commented Jan 13, 2023

Codecov Report

Base: 92.89% // Head: 93.00% // Increases project coverage by +0.10% 🎉

Coverage data is based on head (3655a16) compared to base (c908d37).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #140      +/-   ##
===========================================
+ Coverage    92.89%   93.00%   +0.10%     
===========================================
  Files          286      289       +3     
  Lines         4321     4373      +52     
  Branches       571      580       +9     
===========================================
+ Hits          4014     4067      +53     
+ Misses         200      199       -1     
  Partials       107      107              
Flag Coverage Δ
build 95.18% <ø> (ø)
core 94.03% <100.00%> (+0.20%) ⬆️
extension-dbt 97.43% <ø> (ø)
extension-debug-tools 98.11% <ø> (ø)
extension-driver-bq 85.21% <ø> (ø)
extension-driver-duckdb 100.00% <ø> (ø)
extension-driver-pg 96.11% <ø> (ø)
extension-driver-snowflake 94.59% <ø> (ø)
integration-testing 96.15% <ø> (ø)
serve 90.03% <ø> (ø)
test-utility ∅ <ø> (∅)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...c/lib/template-engine/built-in-extensions/index.ts 100.00% <100.00%> (ø)
...mplate-engine/built-in-extensions/masking/index.ts 100.00% <100.00%> (ø)
...e/built-in-extensions/masking/maskingTagBuilder.ts 100.00% <100.00%> (ø)
...ne/built-in-extensions/masking/maskingTagRunner.ts 100.00% <100.00%> (ø)
packages/core/src/models/extensions/tagBuilder.ts 90.00% <0.00%> (+10.00%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@fredalai fredalai marked this pull request as ready for review January 13, 2023 04:21
@fredalai fredalai requested a review from oscar60310 January 13, 2023 04:22
@fredalai fredalai force-pushed the feature/dynamic-data-masking-custom-string branch from 3ca412a to 3655a16 Compare January 13, 2023 05:46
Copy link
Contributor

@oscar60310 oscar60310 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other parts LGTM.

@fredalai fredalai force-pushed the feature/dynamic-data-masking-custom-string branch from 3655a16 to cb03807 Compare January 16, 2023 07:51
@fredalai fredalai force-pushed the feature/dynamic-data-masking-custom-string branch from cb03807 to 972705e Compare January 16, 2023 07:55
@fredalai fredalai force-pushed the feature/dynamic-data-masking-custom-string branch from 972705e to 195b320 Compare January 16, 2023 08:15
@fredalai fredalai force-pushed the feature/dynamic-data-masking-custom-string branch from 195b320 to a1e499c Compare January 16, 2023 08:49
Copy link
Contributor

@oscar60310 oscar60310 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@kokokuo kokokuo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@oscar60310 oscar60310 merged commit 4c0a1eb into develop Jan 17, 2023
@oscar60310 oscar60310 deleted the feature/dynamic-data-masking-custom-string branch January 17, 2023 03:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dynamic data masking - Custom String

4 participants