Skip to content

Commit

Permalink
Add end-to-end test for SQL target
Browse files Browse the repository at this point in the history
  • Loading branch information
edgarrmondragon committed May 2, 2023
1 parent e7c3e0c commit 8972966
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,18 @@
{%- set sinkclass = sinkclass_mapping[cookiecutter.serialization_method] %}

{%- if sinkclass == "SQLSink" %}

from singer_sdk.connectors import SQLConnector
{% endif %}
from singer_sdk.sinks import {{ sinkclass }}
{%- else %}

from singer_sdk.sinks import {{ sinkclass }}
{%- endif %}


{%- if sinkclass == "SQLSink" %}


class {{ cookiecutter.destination_name }}Connector(SQLConnector):
"""The connector for {{ cookiecutter.destination_name }}.
Expand Down
12 changes: 12 additions & 0 deletions e2e-tests/cookiecutters/target-sql.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"cookiecutter": {
"destination_name": "MyDestinationName",
"admin_name": "FirstName LastName",
"target_id": "target-sql",
"library_name": "target_sql",
"variant": "None (Skip)",
"serialization_method": "SQL",
"_template": "./sdk/cookiecutter/target-template",
"_output_dir": "."
}
}

0 comments on commit 8972966

Please sign in to comment.