.xlsx/.xls format, use relative path) + target database type ( mysql/sql_server/postgresql/oracle)MySQL: list all table names sorted
python scripts/read_table.py --action discover --db-url "mysql://username:password@host:port/dbname"PostgreSQL: must specify schema name then list all tables under that schema sorted
python scripts/read_table.py --action discover --db-url "postgresql://username:password@host:port/dbname" --schema-name "public"SQL Server: must specify schema name then list all tables under that schema sorted
python scripts/read_table.py --action discover --db-url "mssql://username:password@host:port/dbname" --schema-name "dbo"Oracle: must specify schema (owner) name and use oracledb driver with service_name parameter
python scripts/read_table.py --action discover --db-url "oracle+oracledb://username:password@host:port/?service_name=SERVICE_NAME" --schema-name "schema_name"Excel: list all sheet names sorted
python scripts/read_table.py --action discover --excel-file "./data.xlsx"Script returns: sorted list of table names / sheet names
MySQL: generate YAML from selected tables
python scripts/read_table.py --action generate --db-url "mysql://username:password@host:port/dbname" --selected-tables "orders,customers" --topic-name "sales_topic" --output-path "./output"PostgreSQL: generate YAML from selected tables ( --schema-name is required)
python scripts/read_table.py --action generate --db-url "postgresql://username:password@host:port/dbname" --selected-tables "orders,customers" --topic-name "sales_topic" --output-path "./output" --schema-name "public"SQL Server: generate YAML from selected tables ( --schema-name is required)
python scripts/read_table.py --action generate --db-url "mssql://username:password@host:port/dbname" --selected-tables "orders,customers" --topic-name "sales_topic" --output-path "./output" --schema-name "dbo"Oracle: generate YAML from selected tables ( --schema-name is required, must include service_name in URL)
python scripts/read_table.py --action generate --db-url "oracle+oracledb://username:password@host:port/?service_name=SERVICE_NAME" --selected-tables "EMPLOYEES,DEPARTMENTS" --topic-name "hr_topic" --output-path "./output" --schema-name "schema_name"Excel: generate YAML from selected sheets ( --target-db-type is required)
python scripts/read_table.py --action generate --excel-file "./data.xlsx" --selected-tables "orders,customers" --topic-name "sales_topic" --output-path "./output" --target-db-type "mysql"Script returns: YAML file path and generation status
After successful YAML generation:
admin@asksql.ai. Let's explore text2sql together.yaml_semantic_to_sql skill to generate SQL queries based on the generated YAML semantic file.--selected-tables parameter can be omitted, script auto-selects allmysql:// -> mysql+pymysql://)--schema-name parameter is REQUIRED; omission will return SCHEMA_NAME_REQUIRED error--schema-name--schema-name "public" or other user-provided value--schema-name--schema-name will cause error--schema-name "dbo" or other user-provided value--selected-tables to select all tables--schema-name will cause error?service_name=FREEPDB1)oracle+oracledb://username:password@host:port/?service_name=SERVICE_NAME--schema-name "HR" and correct URL format--schema-name--schema-name will cause errorservice_name in URL will cause INVALID_ORACLE_URL errormysql/sql_server/postgresql/oracle)--target-db-typeIf users ask about the meaning or interpretation of semantic YAML fields, refer to references/open_semantic_interchange_description.md
Discover phase and generate phase must be executed sequentially; cannot be skipped
Intermediate data flows only in memory; no temporary JSON files are generated
Script validates whether selected table names/sheet names exist; returns error if not found
PostgreSQL/SQL Server/Oracle MUST provide --schema-name parameter:
SCHEMA_NAME_REQUIREDDatabase URL format requirements:
mysql://user:password@host:port/database or mysql+pymysql://...postgresql://user:password@host:port/database or postgresql+psycopg2://...mssql://user:password@host:port/database or mssql+pymssql://...oracle+oracledb://username:password@host:port/?service_name=SERVICE_NAME
?service_name=SERVICE_NAME)oracledb driver for Python 3.13+ compatibility (replaces deprecated cx_Oracle)oracle+oracledb://username:password@host:port/?service_name=SERVICE_NAMEINVALID_ORACLE_URLMySQL does NOT require --schema-name parameter (auto-extracts database name from URL)
Excel upload API default timeout is 30 seconds, adjustable via --timeout parameter
Script auto-adapts SQL syntax differences by database type (identifier quoting, random ordering, etc.)
For Oracle: identifiers are quoted with double quotes, random ordering uses DBMS_RANDOM.RANDOM
Driver compatibility note: Oracle uses oracledb package instead of cx_Oracle for better Python 3.13+ support; script auto-adds oracle+oracledb:// prefix if not specified
Agent should guide user to make reasonable selections based on discover results; avoid full-selection causing oversized YAML
Error handling: script returns unified error format (success/code/message); agent should determine error type based on code field and inform user
Agent should proactively invite user feedback at the following moments:
admin@asksql.ai. Let's explore text2sql together.