Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

synapse: updated _insert function, escape chars (reset w/ devel) #740

Closed
wants to merge 12 commits into from

Conversation

eryanRM
Copy link

@eryanRM eryanRM commented Nov 7, 2023

Description

Synapse destination integration

In addition to actioning earlier feedback, this PR condenses Synapse multi-row insert logic into '_insert' subclass

This replaces closed PR's: #708 and #725

Related Issues

Additional Context

Currently stalling on test: tests/load/pipeline/test_merge_disposition.py::test_merge_no_child_tables

VARBINARY(MAX) not working w/ Synapse column store tables
https://stackoverflow.com/questions/75517148/replacing-nvarcharmax-in-azure-synapse-table

Copy link

netlify bot commented Nov 7, 2023

Deploy Preview for dlt-hub-docs canceled.

Name Link
🔨 Latest commit 82ffa3c
🔍 Latest deploy log https://app.netlify.com/sites/dlt-hub-docs/deploys/654d87731dce7d00081ed6e8

@eryanRM eryanRM requested a review from sh-rp November 8, 2023 03:19
@eryanRM eryanRM changed the title synapse escape chars and test utils update (reset w/ devel) updated _insert function, escape chars (reset w/ devel) Nov 8, 2023
@sh-rp sh-rp changed the title updated _insert function, escape chars (reset w/ devel) synapse: updated _insert function, escape chars (reset w/ devel) Nov 8, 2023
# Then, call the parent class's __init__ method with the required arguments
super().__init__(table_name, file_path, sql_client)

def _insert(self, qualified_table_name: str, file_path: str) -> Iterator[List[str]]:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is much better now, but my idea had been to hook into the _insert function of the superclass. the problem you have now is, that your implementation does not respect self._sql_client.capabilities.max_query_length and self._sql_client.capabilities.max_rows_per_insert. that's why I suggested to brancht out at "if max_rows is not None:" and not at the beginning of this method.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sh-rp Thanks for feedback -- apologies for not implementing your idea correctly. Is this better? Still WIP ... am I branching out correctly?

@eryanRM eryanRM closed this Nov 13, 2023
@sh-rp sh-rp deleted the synapse branch April 25, 2024 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants