Kevin Phan
05/08/2025, 12:29 PM- name: decrypt_metadata_mapper
config:
stream_maps:
public-user_details:
decrypted_metadata: >
__import__('transform.utils.decrypt_metadata', fromlist=['decrypt_metadata']).decrypt_metadata(
record['metadata_encrypted'], record['salt']
)
salt: __NULL__
Running tap-core-db-source decrypt_metadata_mapper target-snowflake-core-db-source
I am getting some import errors. Is this the correct way to do this or am i doing an antipattern? What is the pattern for trying to run a python script in flight ? I am trying to decrypt some columns between the tap and target. Is a custom utility a better way ?Edgar Ramírez (Arch.dev)
05/08/2025, 3:36 PMKevin Phan
05/08/2025, 3:39 PMEdgar Ramírez (Arch.dev)
05/08/2025, 3:40 PMKevin Phan
05/08/2025, 3:41 PMEdgar Ramírez (Arch.dev)
05/08/2025, 4:50 PMstream_maps
is definitely not going to work. The simplest version of what you want probably looks something like https://github.com/edgarrmondragon/singer-playground/blob/main/merge_streams/map.py.Kevin Phan
05/12/2025, 6:13 PMMapperPlugin
. I am having trouble passing the meltano install
. I defined in my my transformers yaml like so:
plugins:
mappers:
- name: decrypt-metadata-mapper
namespace: decrypt_metadata_mapper
pip_url: -e ./transform/custom_decrypt_mapper
executable: custom-decrypt-metadata
config:
decryption_targets:
public-user_details:
- encrypted_col: metadata_encrypted
salt_col: salt
output_col: decrypted_metadata
but running into
2025-05-12T18:07:17.963854Z [error ] Mapper 'decrypt-metadata-mapper' could not be installed: Failed to install plugin 'decrypt-metadata-mapper'.
2025-05-12T18:07:17.963916Z [info ] ERROR: ./transform/custom_decrypt_mapper is not a valid editable requirement. It should either be a path to a local project or a VCS URL (beginning with bzr+http, bzr+https, bzr+ssh, bzr+sftp, bzr+ftp, bzr+lp, bzr+file, git+http, git+https, git+ssh, git+git, git+file, hg+file, hg+http, hg+https, hg+ssh, hg+static-http, svn+ssh, svn+http, svn+https, svn+svn, svn+file).
it is a local path ?Kevin Phan
05/12/2025, 6:19 PM