Hello, I have done following setup to of tap-sale...
# troubleshooting
r
Hello, I have done following setup to of tap-salesforce and target-mysql tap-salesforce
Copy code
- name: tap-salesforce_1_20240710210159
    inherit_from: tap-salesforce
    capabilities:
    - discover
    - properties
    - state
    config:
      api_type: REST
      is_sandbox: false
      max_workers: 8
      select_fields_by_default: true
      start_date: '2024-02-05T01:00:00Z'
      state_message_threshold: 1000
      username: <mailto:xxxxx@force.com|xxxxx@force.com>
    select:
    - Account.*
target-mysql
Copy code
- name: target-mysql_1_20240605182314
    inherit_from: target-mysql
    capabilities:
    - about
    - schema-flattening
    - stream-maps
    config:
      driver_name: mysql
      sqlalchemy_url: <mysql://user:Password@localhost:3306/database>
      allow_column_alter: true
      lower_case_table_names: true
      replace_null: true
      port: '3306'
      default_target_schema: meltano_db
Now when I try to run meltano for this then I am getting error
Copy code
INFO: {'consumer': True, 'producer': False, 'string_id': 'target-mysql_1_20240605182314', 'cmd_type': 'elb', 'stdio': 'stderr', 'name': 'target-mysql_1_20240605182314', 'event': "KeyError: 'type'", 'level': 'info', 'timestamp': '2024-07-14T11:42:34.130426Z'}
ERROR: Loader failed
ERROR: {'set_number': 0, 'block_type': 'ExtractLoadBlocks', 'success': False, 'err': RunnerError('Loader failed'), 'exit_codes': {<PluginType.LOADERS: 'loaders'>: 1}, 'event': 'Block run completed.', 'level': 'error', 'timestamp': '2024-07-14T11:42:34.471790Z'}
DEBUG: Need help fixing this problem? Visit <http://melta.no/> for troubleshooting steps, or to
join our friendly Slack community.

Run invocation could not be completed as block failed: Loader failed
Can anyone suggest if I am doing anything wrong ? If I run
tap-salesforce
to
target-postgres
then it's working fine. But with
target-mysql
it's giving me error. Thanks in advance.
c
I see
'event': "KeyError: 'type'"
as an info level event, my best guess is that some datatype isn’t supported in the MySQL target which is supported in PostgreSQL (my assumption here that there’s some Python dict that is missing a
type
key). Not sure what that could be. Maybe one of the meltano contributors has some insight. If the number of tables are small, can you compare the schema created for MySQL vs. PostgreSQL?
r
Thanks for the reply @Charles Feduke. I think it makes sense datatype not supported in MySQL and supported in PostgreSQL. Will try to figure out what data type is not supported.
c
it’s going to be something rare… but you’re not the first person to go salesforce -> mysql - so maybe you have a custom salesforce configuration defining a datatype not commonly used - I’d investigate the schema in PostgreSQL and look for hstore or jsonb or something along those lines
r
I am using default datatype of Account object Just for testing purpose I have populated 2 columns 1.Account Name 2.Account Owner Alias So not sure is there something to do with datatype in that Account object. Also when I do same with Hubspot then also it's giving error for MySQL but it's working fine for PosgreSQL So there is a specific datatype which is not compatible in MySQL and that is compatible with PostgreSQL. But that is something need to figure out.