<@U06CE9BN604> I am working on <https://gitlab.com...
# contributing
n
@douwe_maan I am working on https://gitlab.com/meltano/meltano/-/issues/2328 and https://gitlab.com/meltano/target-snowflake/-/issues/29. In order to make this work I added the value processor here https://gitlab.com/vividfront/meltano/meltano/-/blob/2328-upcase-string-processor/src/meltano/core/utils/__init__.py#L138 I don't exactly get if I need to modify anything to use that value processor or what key to toss in the discovery.yml file to get it to start working. How do I use a new value processor? I was also wondering if I need to modify the processor to iterate / what will be passed into a value processor?
d
@nevin_morgan
value_processor
is a property of `SettingDefinition`: https://gitlab.com/meltano/meltano/-/blob/master/src/meltano/core/setting_definition.py#L38 Each of the dictionaries in a plugin definitions's
settings
array is a
SettingDefinition
: https://gitlab.com/meltano/meltano/-/blob/master/src/meltano/core/plugin/base.py#L150 This is the setting definition for
target-snowflake
's
schema
setting: https://gitlab.com/meltano/meltano/blob/master/src/meltano/core/bundle/discovery.yml#L729-731 That's where you'd add
value_processor: upcase_string
SettingDefinition
finds a named
value_processor
by looking in the
VALUE_PROCESSORS
dictionary: https://gitlab.com/meltano/meltano/-/blob/master/src/meltano/core/setting_definition.py#L133-137 So this is where you'd add
"upcase_string": upcase_string
: https://gitlab.com/meltano/meltano/-/blob/master/src/meltano/core/setting_definition.py#L9 Since it's a property of a specific setting, that setting's raw string value will be passed as the only argument to the processor function
n
so value_processor is a property of a given setting and not a setting in and of itself. That is what I was not getting
thanks a bunch @douwe_maan!
@douwe_maan I should have this in my discovery.yml file in the target-snowflake settings array right?
Copy code
- name: schema
        env: SF_SCHEMA
        value: $MELTANO_EXTRACTOR_NAMESPACE
        value_processor: upcase_string
d
@nevin_morgan Exactly
n
👍 I have a bug somewhere then since that didn't work out. I will keep plugging away
d
@nevin_morgan You're sure you're using your development
meltano
CLI?
n
yeah, I am running
make docker_images
and then running my project in the output image to verify. The schema isn't being upper cased so I will need to do some dumping and verify my function is being called
I also checked what is installed through a bash terminal in the container to verify my changed files were present and they are
@douwe_maan thanks for the help and the refactor comments. MR is here https://gitlab.com/meltano/meltano/-/merge_requests/1840