Hey, I want to create an alias of a stream in my t...
# troubleshooting
m
Hey, I want to create an alias of a stream in my target and I though of using
stream_maps
. My tap is tap-saasoptics and target is target-mysql When I do this config on the target:
Copy code
..
      stream_maps:
        transactions:
          __alias__: my_prefix_transactions
I get:
Copy code
singer_sdk.exceptions.RecordsWithoutSchemaException: A record for stream 'transactions' was encountered before a corresponding schema. Check that the Tap correctly implements the Singer spec.
When I do that config on the target:
Copy code
..
      stream_maps:
        my_prefix_transactions:
          __source__: transactions
I get two tables being created in MySQL - my_prefix_transactions and transactions Any advice how to achieve that? I mean get only a single table created in MySQL db called my_prefix_transactions.
e
The first thing I'd try is bumping the
singer-sdk
in tap-saasoptics and see if that fixes the issue
m
Solved by installing a mapper and defining a map there
Copy code
mappers:
  - name: meltano-map-transformer
    variant: meltano
    pip_url: git+<https://github.com/MeltanoLabs/meltano-map-transform.git>
    mappings:
    - name: my_prefix
      config:
        stream_maps:
          transactions:
            __alias__: my_prefix_transactions
And then the command is
meltano run tap-saasoptics my_prefix target-redshift