Repository navigation
Keep object store credentials out of the task log in Teradata transfers - #72176
Merged
Merged
Conversation
When no AUTHORIZATION object is configured and the store is private, both Teradata transfer operators embed the object store credentials directly in the CREATE TABLE statement. DbApiHook logs every statement it runs, so those values were written to the task log on each run. Suppress the hook's own SQL logging for that statement and log a redacted form in its place, so the statement is still visible without the credential values. The AUTHORIZATION path is unaffected and keeps normal SQL logging. Teradata also records the statement in its own query logs, which Airflow cannot redact; both operator docstrings now say so and point at the AUTHORIZATION object.
potiuk
force-pushed
the
fix-teradata-credential-logging
branch
from
August 28, 2026 14:38
1466dd7 to
31d08ca
Compare
shahar1
approved these changes
Sep 20, 2026
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.
S3ToTeradataOperatorandAzureBlobStorageToTeradataOperatorembed the object store credentials directly in theCREATE MULTISET TABLE ... LOCATIONstatement when the store is private and noteradata_authorization_nameis configured:DbApiHook._run_commandlogs every statement it runs, so those values were written to the task log on each run — readable by anyone who can read that Dag's logs.What changed. Both operators now build a redacted twin of the credentials fragment. When credentials are inline, the hook's own SQL logging is switched off for that statement (
log_sql, already part ofDbApiHook) and the redacted form is logged instead, so operators still see what ran without the values. TheAUTHORIZATIONpath is untouched and keeps normal SQL logging.What this does not fix. Teradata records the statement in its own query logs (DBQL) and monitoring views. Airflow cannot redact those. Both docstrings now say so and point at
teradata_authorization_name, which keeps the credentials in the database rather than in each statement — that remains the right configuration for a private store.Local: 278 passed across the Teradata provider; ruff and mypy clean.
🤖 Generated with Claude Code