인터페이스는 현지화되어 있으며, Skill 소개와 설명 문서는 선택한 언어로 AI가 자동 번역합니다. 코드·명령어·경로·전문 용어는 원문을 유지하며 원작자 문서가 우선합니다.
Skills 둘러보기
데이터 및 연구 · SKILL.md

semantic-layer

semantic-layer

Guides PandasAI semantic dataset creation, schema validation, CSV/Excel/parquet/SQL loading, views, transformations, and query-builder troubleshooting.

Independent GitHub snapshot · Automated classification · Original documentation governs

Skill 문서

GitHub

name: semantic-layer description: "Guides PandasAI semantic dataset creation, schema validation, CSV/Excel/parquet/SQL loading, views, transformations, and query-builder troubleshooting." disable-model-invocation: true metadata: disco-role: operating license: NOASSERTION

Semantic Layer

Use this sub-skill when a task involves PandasAI pai.create, pai.load, read_csv, read_excel, schema.yaml, semantic-layer columns, transformations, SQL connector schemas, or views across datasets.

The semantic layer is the PandasAI v3 surface that turns raw data into named, described, loadable datasets. Created datasets are stored under a project datasets/ directory and then loaded into DataFrame or VirtualDataFrame objects for chat and SQL-backed analysis.

Fast route

  1. Validate the user's goal: local CSV/Excel/parquet, SQL-backed virtual table, or view over existing datasets.
  2. Use organization/dataset path names with lowercase hyphenated segments. PandasAI converts the dataset name to an underscore schema/table name.
  3. For local data, prefer pai.read_csv or pai.read_excel, then pai.create.
  4. For SQL, define a source with type, connection, and table; install only the needed pandasai-sql[...] extension.
  5. For views, ensure every column and relation uses table.column format and that source datasets exist first.
  6. After loading a dataset, route natural-language .chat() behavior to ../conversational-analysis/SKILL.md.

Read next

Boundary decisions

User asks forDo
Loading CSV or Excel directly into a DataFrame for chatUse this sub-skill for read_csv/read_excel, then route chat to conversational analysis
Persistent dataset with metadata/schemaUse pai.create and this sub-skill end-to-end
SQL table represented without local data loadUse SQL source schema; note optional connector dependency
Combining multiple datasetsUse a semantic view with relations and compatible sources
pai dataset create promptsRoute to CLI/project ops; the CLI writes a source schema interactively

Safe validation

Run the schema validator on a YAML file:

python sub-skills/semantic-layer/scripts/validate_semantic_schema.py --schema-yaml schema.yaml

Run the end-to-end local smoke:

python sub-skills/semantic-layer/scripts/create_local_dataset_smoke.py

Both helpers avoid external databases, provider credentials, network, and Docker.

Key gotchas

  • pai.create requires either a PandasAI DataFrame, a valid source, or view=True with relations/columns.
  • Dataset path format is organization/dataset; both segments must be lowercase and hyphenated.
  • Schema names use underscores, not hyphens. Generated SQL must use the schema name, not the original path slug.
  • For views, columns and relation endpoints must be table.column with letters, numbers, and underscores.
  • group_by is strict: every non-aggregated column must be in group_by, and expression columns must not be in group_by.
  • SQL and cloud connector sources are optional-extension workflows; do not assume their packages, services, credentials, or enterprise license are present.
저장한 Skills