thoughtspot / thoughtspot/cs_tools

databricks serverless syncer DELTA_FAILED_TO_MERGE_FIELDS

Open
#273 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
2
Forks
7
PR merge metrics
No merged PRs in 30d

Description

First Stop
  • I have read and agreed to the ThoughtSpot LICENSE.
  • I understand that if I have a critical issue with ThoughtSpot, I should reach out to my designated Account Executive and Customer Success Manager instead of cs_tools.
Platform Configuration
                              │                                                                                                                      │                               
                              │           Info snapshot taken on 2025-11-04                                                                          │                               
                              │                                                                                                                      │                               
                              │               CS Tools: 1.6.5                                                                                        │                               
                              │         Python Version: Python 3.9.6 (default, Apr 30 2025, 02:07:17)                                                │                               
                              │    [Clang 17.0.0 (clang-1700.0.13.5)]                                                                                │                               
                              │            System Info: Darwin (detail: macOS-15.4.1-arm64-arm-64bit)                                                │                               
                              │      Configs Directory: /Users/ {anonymous} /Library/Application Support/cs_tools                                    │                               
                              │    Activate VirtualEnv: source "/Users/ {anonymous} /Library/Application Support/cs_tools/.cs_tools/bin/activate"    │                               
                              │          Platform Tags: macosx-10.9-universal2                                                                       │                               
                              │                                                                                                                      │                               
                              ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯     
Description

Initial setup shows MERGE issues, catalog, schema are empty, step command bellow

SYNCER='databricks://server_hostname=xxx.cloud.databricks.com'\
'&http_path=/sql/1.0/warehouses/xxx'\
'&access_token=dapixxx'\
'&catalog=thoughtspot'\
'&schema=cs_tools'\
'&load_strategy=TRUNCATE'\

cs_tools tools searchable metadata \
  --syncer "$SYNCER" \
  --config xxx > log.log
Additional info

Serverless compute connection, ensured have proper library

cs_tools                   1.6.5
databricks-sql-connector   4.1.4
databricks-sqlalchemy      2.0.8

Possibly related to #212, close if duplicate.

Considering adding a log file.

Truncated logs

cs_tools/.cs_tools/lib/python3.9/site-packages/databricks/sql/backend/thrift_backend.py:635 in            │                
               │ _check_command_not_in_error_or_closed_state                                                                                                        │                
               │                                                                                                                                                    │                
               │    632 │   ):                                                                                                                                      │                
               │    633 │   │   if get_operations_resp.operationState == ttypes.TOperationState.ERROR_STATE:                                                        │                
               │    634 │   │   │   if get_operations_resp.displayMessage:                                                                                          │                
               │ ❱  635 │   │   │   │   raise ServerOperationError(                                                                                                 │                
               │    636 │   │   │   │   │   get_operations_resp.displayMessage,                                                                                     │                
               │    637 │   │   │   │   │   {                                                                                                                       │                
               │    638 │   │   │   │   │   │   "operation-id": op_handle                                                                                           │                
               │                                                                                                                                                    │                
               │ ╭──────────────────────────────────────────────────────────────────── locals ────────────────────────────────────────────────────────────────────╮ │                
               │ │ get_operations_resp = TGetOperationStatusResp(status=TStatus(statusCode=0, infoMessages=None, sqlState=None, errorCode=None,                   │ │                
               │ │                       errorMessage=None, displayMessage=None, errorDetailsJson=None), operationState=5, sqlState='22005', errorCode=0,         │ │                
               │ │                       errorMessage="org.apache.hive.service.cli.HiveSQLException: Error running query: [DELTA_FAILED_TO_MERGE_FIELDS]          │ │                
               │ │                       com.databricks.sql.transaction.tahoe.DeltaAnalysisException: [DELTA_FAILED_TO_MERGE_FIELDS] Failed to merge fields       │ │                
               │ │                       'org_id' and 'org_id'.\n\tat                                                                                             │ │   

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the tools searchable metadata command with the provided Databricks serverless SYNCER settings and capture the complete log. Compare the failure with issue #212, focusing on the DELTA_FAILED_TO_MERGE_FIELDS error for org_id. Done means the sync completes and the configured catalog and schema are populated without the merge error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, sql
Domain
data-engineering, databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.