feat: Install Teradata driver on post-startup for v4.2#1264
Open
malyalaprateeprao wants to merge 1 commit into
Open
feat: Install Teradata driver on post-startup for v4.2#1264malyalaprateeprao wants to merge 1 commit into
malyalaprateeprao wants to merge 1 commit into
Conversation
Add a non-blocking pip install step for teradatasql and teradatasqlalchemy in the post-startup script, so the drivers are available for SMUS notebook SQL cells against Teradata connections. These packages are not published to conda-forge and cannot be added as a bundled SDK/conda dependency, so they are installed here instead, following the same non-blocking pattern used for sm-spark-cli-install.sh. Bounded with 'timeout 15' and '--retries 1' so environments with no internet egress (e.g. fully isolated VpcOnly VPCs) fail fast instead of incurring pip's default multi-minute retry/backoff cycle on every space start. Validated end-to-end via BYOI in a SMUS gamma domain: combined with MaxDomePythonSDK's Teradata connector code (CR-250210917), confirmed sqlutils.sql_stream_with_display() successfully connects to and queries a live Teradata instance. Also validated the driver install succeeds in VpcOnly domains with a NAT Gateway, and fails fast (rather than hanging) in a fully isolated VpcOnly VPC with no internet egress.
malyalaprateeprao
marked this pull request as ready for review
July 13, 2026 22:29
djdax
reviewed
Jul 14, 2026
| # timeout + limited retries bound the delay for environments with no | ||
| # internet egress (e.g. fully isolated VpcOnly), where pip's default | ||
| # retry/backoff can otherwise take several minutes to fail out. | ||
| timeout 15 pip install --retries 1 teradatasql teradatasqlalchemy || echo "Warning: teradata driver installation failed or timed out, continuing..." |
There was a problem hiding this comment.
Why "timeout" ? We should not block at all for this installation. Any time spent here will increase latency of launching JupyterLab. Send it straight to background and log a warning if it fails. "nohup pip install --retries 1 teradatasql teradatasqlalchemy &"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds Teradata driver support to SageMaker Unified Studio by installing
teradatasqlandteradatasqlalchemyvia pip during the v4.2 post-startup script, on JupyterLab space startup. This complements the Teradata connector code being added to MaxDomePythonSDK, enabling SMUS customers to run SQL cells against Teradata data sources.These packages cannot be added as a conda-forge/SMD dependency because their license is not structured for inclusion in SMD (non-Apache/non-MIT) — confirmed with the SMD team. Installing them via pip at post-startup, non-blocking, is the recommended approach for this kind of dependency (per SMD team guidance).
Type of Change
Release Information
How Has This Been Tested?
sqlutils.sql_stream_with_display()successfully connects to and queries a live Teradata instance.VpcOnlydomains with a NAT Gateway (SMUS's default network configuration).VpcOnlyVPC with no internet egress (no NAT Gateway/Internet Gateway): confirmed the unboundedpip installcall takes several minutes to fail out via pip's default retry/backoff before the non-blocking fallback (|| echo "Warning: ...") kicks in. Addedtimeout 15and--retries 1to bound this to ~15 seconds instead, based on real measured successful-install times (3-5 seconds in working-egress environments).bash -n) on the modified script.Checklist:
Related Issues
Related to CR-250210917 (MaxDomePythonSDK Teradata connector support)
Additional Notes
This change only targets
v4.2(the current latest template at time of authoring). Av4.3template did not yet exist in the repo when this was scoped; ifv4.3's template is created as a fresh copy rather than inheriting fromv4.2, this same change will need to be replicated there separately.