Skip to content

[BUG]: Missing sdp_tech field in SwitchConfig causes AttributeError during SDP transpile #2332

@Abhi-chandwadkar

Description

@Abhi-chandwadkar

Is there an existing issue for this?

  • I have searched the existing issues

Category of Bug / Issue

Other

Current Behavior

When running the Switch transpiler with target_type: "sdp", the Python driver attempts to access a field named sdp_tech on the loaded SwitchConfig object:

if target_type == TargetType.SDP.value:
with_user_agent_extra("transpiler_sdp_tech", switch_config.sdp_tech)

However, the current Switch configuration schema and YAML file do not define any field named sdp_tech, as shown in the official Switch documentation and customization guide, which list fields such as target_type, comment_lang, token_count_threshold, and sdp_language but make no mention of sdp_tech.

Expected Behavior

Switch should successfully run SDP conversions using the current configuration schema, where target_type: "sdp" and sdp_language are the documented and supported fields. The Switch configuration format in the official documentation lists parameters such as target_type, comment_lang, concurrency settings, and customizable prompts, but does not include any field named sdp_tech.

Steps To Reproduce

  1. Install or upgrade to the latest version of Lakebridge and Switch

(Switch is listed as an Experimental transpiler and continues to evolve; recent updates introduced new config and telemetry options.) [deepwiki.com]

Create a Switch configuration YAML using the currently documented parameters, for example:
YAMLtarget_type: "sdp"source_format: "sql"comment_lang: "English"log_level: "INFO"token_count_threshold: 20000concurrency: 4max_fix_attempts: 1sdp_language: "python"Show more lines
This YAML structure matches the documented customization fields and supported config parameters.

Load the configuration inside a Lakebridge Switch-driven workflow using:
switch_config = config_loader.load_switch_config(switch_config_path)
target_type = switch_config.target_type
if target_type == TargetType.SDP.value:
with_user_agent_extra("transpiler_sdp_tech", switch_config.sdp_tech)

Pythonswitch_config = config_loader.load_switch_config(switch_config_path)target_type = switch_config.target_typeif target_type == TargetType.SDP.value: with_user_agent_extra("transpiler_sdp_tech", switch_config.sdp_tech)Show more lines
A recent feature request shows Switch config capabilities being expanded (e.g., target_type, YAML overrides), indicating ongoing schema additions — but sdp_tech is not present in the current config contract. [numpy.org]

Run an SDP conversion using llm-transpile or Switch-based workflows described in the Switch documentation, which integrates an LLM-powered conversion engine. [deepwiki.com]

Observe that the transpiler crashes with the error:
AttributeError: 'SwitchConfig' object has no attribute 'sdp_tech'

This occurs because the driver references an SDP telemetry field (sdp_tech) that is not defined in the SwitchConfig schema or configuration file.

Relevant log output or Exception details

Logs Confirmation

  • I ran the command line with --debug
  • I have attached the lsp-server.log under USER_HOME/.databricks/labs/remorph-transpilers/<converter_name>/lib/lsp-server.log

Sample Query

Operating System

Windows

Version

latest via Databricks CLI

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingswitch

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions