Cookiecutter tap.py template not assigning SQLTap as parent class for the tap when initializing a SQL stream type project
Summary
When you initialize a tap with a stream type of SQL using the Meltano SDK v0.4.4 the new tap class in the tap.py file does no have the parent as class of SQLTap it has the parent class of Tap instead. I believe this happens because the tap.py template in keying off cookiecutter.source_name instead of the cookiecutter.stream_type
Steps to reproduce
cookiecutter https://gitlab.com/meltano/sdk --directory="cookiecutter/tap-template"
source_name [MySourceName]: test
admin_name [FirstName LastName]: Dan Norman
tap_id [tap-test]:
library_name [tap_test]:
Select stream_type:
1 - REST
2 - GraphQL
3 - SQL
4 - Other
Choose from 1, 2, 3, 4 [1]: 3
Select auth_method:
1 - API Key
2 - Bearer Token
3 - Basic Auth
4 - OAuth2
5 - JWT
6 - Custom or N/A
Choose from 1, 2, 3, 4, 5, 6 [1]: 3
Select include_cicd_sample_template:
1 - GitHub
2 - None (Skip)
Choose from 1, 2 [1]:
What is the current bug behavior?
In the tap.py file for the tap example above the class looks like this after initialization:
class Taptest(Tap):
What is the expected correct behavior?
I would expect to see the tap class to look like this:
class Taptest(SQLTap):
Relevant logs and/or screenshots
Possible fixes
sdk/cookiecutter/tap-template/{{cookiecutter.tap_id}}/{{cookiecutter.library_name}}/tap.py
line 31:
class Tap{{ cookiecutter.source_name }}({{ 'SQL' if cookiecutter.source_name == 'SQL' else '' }}Tap):
Propose changing line 31 to:
class Tap{{ cookiecutter.source_name }}({{ 'SQL' if cookiecutter.stream_type == 'SQL' else '' }}Tap):