Hello everyone, I've been having issues with melta...
# troubleshooting
j
Hello everyone, I've been having issues with meltano's target-postgres loader and would really appreciate the help. I currently have a meltano project syncing data from salesforce to a postgres instance, they have different naming schemes for the columns. my current mapping is as follows:
Copy code
mappers:
  - name: meltano-map-transformer
    variant: meltano
    pip_url: meltano-map-transform
    mappings:
    - name: tap-sf-campus-mapper
      config:
        stream_maps:
          Academic_Year__c:
            __alias__: salesforce-academic_year__c
            sfid: Id
            name: Name
            campus__c: Campus__c
            createddate: CreatedDate
            end_date__c: str(datetime.datetime.fromisoformat(End_Date__c).date())
              if End_Date__c else None
            start_date__c: str(datetime.datetime.fromisoformat(Start_Date__c).date())
              if Start_Date__c else None
            isdeleted: IsDeleted
            lastmodifieddate: LastModifiedDate
            systemmodstamp: SystemModstamp
            __key_properties__:
            - sfid
            __else__: __NULL__
Below are the error logs:
Copy code
2025-10-02T08:53:54.910672Z [info     ] On schema['properties']['lastmodifieddate']['anyOf'][2]: cmd_type=elb consumer=True job_name=dev:tap-salesforce-to-target-postgres name=target-postgres producer=False run_id=0199a420-b0db-7353-8ac9-138fcde04031 stdio=stderr string_id=target-postgres
2025-10-02T08:53:54.911472Z [info     ]     'null'                     cmd_type=elb consumer=True job_name=dev:tap-salesforce-to-target-postgres name=target-postgres producer=False run_id=0199a420-b0db-7353-8ac9-138fcde04031 stdio=stderr string_id=target-postgres
2025-10-02T08:53:55.025992Z [error    ] Loader failed
2025-10-02T08:53:55.026346Z [error    ] Block run completed            block_type=ExtractLoadBlocks duration_seconds=4.896 err=RunnerError('Loader failed') exit_codes={<PluginType.LOADERS: 'loaders'>: 1} run_id=0199a420-b0db-7353-8ac9-138fcde04031 set_number=0 success=False
2025-10-02T08:53:55.027430Z [info     ] Run completed                  duration_seconds=4.898 run_id=0199a420-b0db-7353-8ac9-138fcde04031 status=failure
2025-10-02T08:53:55.028307Z [error    ] Need help fixing this problem? Visit <http://melta.no/> for troubleshooting steps, or to join our friendly Slack community.
would anyone have an idea what's causing the error, the postgres table has a nullable column 'lastmodifieddate' so i'm confused why is it complaining about null errors here?
e
Seems like a validation error. It seems the
anyOf
list of types in the schema does not include
"null"
. Do you have the lines right above
On schema ...
?