[SNOW-3249917] JDBC removal Step 7b: Replicate getFileTransferMetadatas#1119
Merged
sfc-gh-ggeng merged 6 commits intomasterfrom Mar 27, 2026
Merged
Conversation
b7886dc to
927131e
Compare
bc6c23a to
27d1ee5
Compare
Base automatically changed from
jdbc-removal-step7a-inline-error-helpers
to
master
March 24, 2026 22:39
dafed99 to
eed1c75
Compare
Merged
3 tasks
sfc-gh-alhuang
approved these changes
Mar 27, 2026
…oad) Step 7b: Replicate getFileTransferMetadatas and helper methods verbatim Step 7c: Route uploadWithoutConnection through IcebergFileTransferAgent (which is the existing replication of JDBC's upload stack) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Verbatim replication of static parsing methods from JDBC's SnowflakeFileTransferAgent into IngestFileTransferAgent: - getFileTransferMetadatas (1-arg and 2-arg) - getStageInfo, extractStageCreds, getEncryptionMaterial - expandFileNames, setupUseRegionalUrl, setupUseVirtualUrl - CommandType enum (extracted from SFBaseFileTransferAgent) Swap getFileTransferMetadatas calls in InternalStage to use IngestFileTransferAgent. JDBC's SnowflakeFileTransferAgent import remains (uploadWithoutConnection still uses JDBC — deferred to Step 7c). Temporary: throws clauses on InternalStage methods declare both JDBC's and ingest's SnowflakeSQLException during transition. Will be cleaned up in Step 8 when SnowflakeFileTransferMetadataV1 is replicated. Updated plan: split old Step 7b into 7b (parsing) and 7c (upload). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Verbatim replication of static parsing methods from JDBC's SnowflakeFileTransferAgent into IngestFileTransferAgent: - getFileTransferMetadatas (1-arg and 2-arg) - getStageInfo, extractStageCreds, getEncryptionMaterial - expandFileNames, setupUseRegionalUrl, setupUseVirtualUrl - CommandType enum (extracted from SFBaseFileTransferAgent) The import swap in InternalStage is deferred — swapping now would require declaring both JDBC's and ingest's SnowflakeSQLException in throws clauses. The swap happens in Step 8 when all JDBC types in InternalStage are replaced together. Updated plan: split old Step 7b into 7b (parsing) and 7c (upload). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- IngestFileTransferAgent → SnowflakeFileTransferAgent (same name as JDBC) - CommandType: moved from top-level class to inner enum (matches JDBC's SFBaseFileTransferAgent.CommandType structure) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add SFBaseFileTransferAgent with CommandType enum (matching JDBC structure) - SnowflakeFileTransferAgent now extends SFBaseFileTransferAgent (matching JDBC) - Remove duplicate CommandType inner enum from SnowflakeFileTransferAgent - SFBaseFileTransferAgent omits FixedView infrastructure (not used by replicated methods, depends on JDBC-internal types) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Break down remaining work based on actual JDBC import inventory:
- Step 8a: Replicate StageInfo, RemoteStoreFileEncryptionMaterial
- Step 8b: Replicate SnowflakeFileTransferMetadataV1, ObjectMapperFactory;
swap all InternalStage JDBC imports
- Step 8c: Route uploadWithoutConnection through IcebergFileTransferAgent
- Step 9a: Clean up replicated classes' JDBC imports (SqlState, SFSession,
SFException, SecretDetector)
- Step 9b: Clean up SnowflakeSQLLoggedException telemetry (12 JDBC imports)
- Step 9c: Clean up TelemetryClient JDBC imports (6 imports)
- Step 10: Remove JDBC dependency
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
eed1c75 to
9701b54
Compare
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.
Summary
Verbatim replication of static parsing methods from JDBC's
SnowflakeFileTransferAgentintoIngestFileTransferAgent:getFileTransferMetadatas(1-arg and 2-arg overloads)getStageInfo,extractStageCreds,getEncryptionMaterialexpandFileNames,setupUseRegionalUrl,setupUseVirtualUrlCommandTypeenum (extracted fromSFBaseFileTransferAgent)Note: The import swap in
InternalStageis deferred — swapping now would require declaring both JDBC's and ingest'sSnowflakeSQLExceptionin throws clauses. The swap happens in Step 8 when all JDBC types inInternalStageare replaced together.Updated plan: split old Step 7b into 7b (parsing replication) and 7c (upload migration).
Stacked on #1116.
Replication Verification Diff Report
IngestFileTransferAgent
JDBC source :
net/snowflake/client/jdbc/SnowflakeFileTransferAgent.java@ v3.25.1Ingest copy :
src/main/java/net/snowflake/ingest/streaming/internal/fileTransferAgent/IngestFileTransferAgent.javaPermitted differences (mechanical):
SFLogger/SFLoggerFactory→ ingest's replicated versionsSnowflakeUtil.isNullOrEmpty→StorageClientUtil.isNullOrEmptySnowflakeUtil.systemGetProperty→StorageClientUtil.systemGetPropertyErrorCode→ ingest'sErrorCodeSnowflakeSQLException→ ingest'sSnowflakeSQLExceptionSFBaseFileTransferAgent.CommandType→ top-levelCommandTypeenumUnexpected differences:
net.snowflake.client.jdbc.SnowflakeFileTransferMetadata(JDBC interface) temporarily — will use ingest version in Step 8CommandType→SFBaseFileTransferAgent.CommandTypebridge in constructor call — temporary untilSnowflakeFileTransferMetadataV1is replicated in Step 8CommandType
JDBC source :
net/snowflake/client/jdbc/SFBaseFileTransferAgent.java@ v3.25.1 (inner enum)Ingest copy :
src/main/java/net/snowflake/ingest/streaming/internal/fileTransferAgent/CommandType.javaPermitted differences (mechanical):
Unexpected differences: NONE
Test plan
mvn compiler:compilepassesmvn test-compilepasses./format.shpasses🤖 Generated with Claude Code