Skip to content

Questions about using #13

Open
Open

Description

@LEOnarodoChen
  1. For using CrackSQL installed by Pypl, is it possible to translate a single SQL to another dialect, instead of translating the whole database ?
  2. For using CrackSQL installed by Pypl, can you give an exemple of the document init_config.yaml ?

Activity

  1. code4DB commented on May 24, 2025

    @code4DB
    Collaborator
    1. Yes, CrackSQL translates the input SQL in an one-by-one manner.
    2. You can find the example in the backend/config/init_config.yaml.copy directory.
  2. LEOnarodoChen commented on May 24, 2025

    @LEOnarodoChen
    Author

    That means in the function trainslate, I can ignore some of the parameters like target_db_config as I don't want to translate the whole database directly
    translated_sql, model_ans_list, used_pieces, lift_histories = translate( model_name="DeepSeek-R1-Distill-Qwen-32B", src_sql='SELECT DISTINCT "t1"."id" , EXTRACT(YEAR FROM CURRENT_TIMESTAMP) - EXTRACT(YEAR FROM CAST( "t1"."birthday" AS TIMESTAMP )) FROM "patient" AS "t1" INNER JOIN "examination" AS "t2" ON "t1"."id" = "t2"."id" WHERE "t2"."rvvt" = "+"', src_dialect="postgresql", tgt_dialect="mysql", target_db_config=target_db_config, vector_config=vector_config, out_dir="./", retrieval_on=False, top_k=3 )

  3. code4DB commented on May 26, 2025

    @code4DB
    Collaborator
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions