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

feat: Added functionality to allow T-SQL agent job steps #43

Merged
merged 1 commit into from
Jun 29, 2022

Conversation

GooseLF
Copy link
Contributor

@GooseLF GooseLF commented Jun 29, 2022

So I done some things and some stuff.

  • .pre-commit-config.yaml
  • src/deploy.py
    • Updated deploy_ssis() to accommodate T-SQL SQL agent job steps
  • src/model.py
    • Made Step.package optional
    • Added Step.sql_string as an optional field
    • Added Step.retry_attempts as an optional field
    • Added Step.retry_interval as an optional field
    • Added Step.post_init() to ensure the correct field, either package or sql_string is set for the correct step type, SSIS or T-SQL respectively
  • src/sql/agent/create_job_step.sql
    • Added retry_attempts and retry_interval parameters
  • src/sql/agent/create_job_step_using_proxy.sql
    • Added retry_attempts and retry_interval parameters
  • src/sql/db.py
    • Added method for creating a SQL Agent Job Step with a T-SQL Subsystem
    • Added retry_interval and retry_attempts to both SSIS and T-SQL Subsystem step methods
  • test/test_model.py
    • Added unit tests for new functionality

Closes #39.

#40 should be done in a separate PR once this PR is merged so we know what we've got to refactor.

@GooseLF GooseLF requested review from EuanMason and gvee-uk June 29, 2022 11:02
@github-actions
Copy link

github-actions bot commented Jun 29, 2022

Unit Test Results

44 tests  +3   43 ✔️ +3   0s ⏱️ ±0s
  1 suites ±0     1 💤 ±0 
  1 files   ±0     0 ±0 

Results for commit 29e8557. ± Comparison against base commit 4f11225.

♻️ This comment has been updated with latest results.

Copy link
Contributor

@gvee-uk gvee-uk left a comment

Choose a reason for hiding this comment

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

Few initial comments before local testing.

src/model.py Outdated Show resolved Hide resolved
src/sql/db.py Show resolved Hide resolved
src/model.py Outdated Show resolved Hide resolved
src/model.py Outdated Show resolved Hide resolved
src/deploy.py Outdated Show resolved Hide resolved
src/deploy.py Show resolved Hide resolved
@GooseLF GooseLF force-pushed the SQL_agent_t_sql_task branch from b5dd11c to e13f161 Compare June 29, 2022 12:48
@GooseLF GooseLF force-pushed the SQL_agent_t_sql_task branch from e13f161 to 29e8557 Compare June 29, 2022 13:00
@GooseLF GooseLF requested a review from gvee-uk June 29, 2022 13:35
@GooseLF GooseLF merged commit a50df8f into main Jun 29, 2022
@GooseLF GooseLF deleted the SQL_agent_t_sql_task branch June 29, 2022 16:18
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.

Support for Transact-SQL Job Steps
2 participants