Skip to content

Commit

Permalink
fix(ingest/sql-server): update queries to use escaped procedure name (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
mayurinehate authored Oct 27, 2023
1 parent 379ffc8 commit 5166d90
Show file tree
Hide file tree
Showing 6 changed files with 1,324 additions and 763 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ def _get_procedure_inputs(
def _get_procedure_code(
conn: Connection, procedure: StoredProcedure
) -> Tuple[Optional[str], Optional[str]]:
query = f"EXEC [{procedure.db}].dbo.sp_helptext '{procedure.full_name}'"
query = f"EXEC [{procedure.db}].dbo.sp_helptext '{procedure.escape_full_name}'"
try:
code_data = conn.execute(query)
except ProgrammingError:
Expand Down Expand Up @@ -567,7 +567,7 @@ def _get_procedure_properties(
create_date as date_created,
modify_date as date_modified
FROM sys.procedures
WHERE object_id = object_id('{procedure.full_name}')
WHERE object_id = object_id('{procedure.escape_full_name}')
"""
)
properties = {}
Expand Down
Loading

0 comments on commit 5166d90

Please sign in to comment.