thinkwise-software-factory-create-view

Creates and configures views in Thinkwise Software Factory data models via MCP connectors.

5|Updated Aug 25, 2026
One-click install
npx skills add https://github.com/rkortThinkwise/sf-mcp-skills-temp --skill thinkwise-software-factory-create-view-rkortthinkwise
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: thinkwise-software-factory-create-view
Source: https://github.com/rkortThinkwise/sf-mcp-skills-temp/tree/main/thinkwise-software-factory-create-view
Command: npx skills add https://github.com/rkortThinkwise/sf-mcp-skills-temp --skill thinkwise-software-factory-create-view-rkortthinkwise

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Creating a view in a Thinkwise Software Factory model involves a long, error-prone chain of metadata objects — the tab entity, columns, domains, references, control procedures, templates, and program object assignments — where mistakes like wrong dialect SQL, reversed reference direction, or skipped code generation only surface silently. This Skill guides the full lifecycle so views are modeled, coded, generated, and verified correctly the first time. ## Core Features & Use Cases - End-to-end view creation workflow: Covers tab setup with type_of_table = view, column modeling with grain-based primary keys, domain reuse from source tables, and reversed-direction references for view columns. - Template-based SELECT authoring: Guides writing the control procedure template in the correct RDBMS dialect (checked via branch_rdbms_type), wiring it via template_prog_object_item, and generating code with task_generate_code_grp and task_add_job_to_generate_object_code. - Ad hoc query conversion: Converts a user's working SQL query into a properly modeled view, confirming source tables against the live model and diffing the generated SQL against the original query. - Use Case: A user pastes a SQL Server query from SSMS and asks to turn it into a view; the Skill walks through confirming grain and primary key, modeling columns with reused domains, writing a dialect-correct template, generating the view_<tab_id> program object, and verifying the output matches the original query. ## Quick Start Ask the AI to create a view in your Thinkwise Software Factory model from a SQL query or business question, and it will follow this Skill to model, code, generate, and verify it.

Frequently Asked Questions about thinkwise-software-factory-create-view

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a view in Thinkwise Software Factory?

Create a tab with type_of_table = view, model its columns and primary key first, then write the SELECT as a control procedure template and wire it into the generated view_<tab_id> program object via template_prog_object_item. Default to the Template create_view_method, which is what production models use almost exclusively.

How do I convert an ad hoc SQL query into a Thinkwise view?

Confirm every source table and column against the live model rather than trusting the raw SQL, derive the primary key from the query's grain, and rewrite the query as a control procedure template in the model's dialect. Verify by diffing the generated view SQL against the original query.

Why is my Thinkwise view generating SQL in the wrong dialect?

The branch_rdbms_type was not checked before writing the template, so T-SQL may have been written for a PostgreSQL model or vice versa. Writes and generation report success either way, so always query branch_rdbms_type first and create one dialect-specific template per RDBMS type.

Why does my view column have no lookup in the Thinkwise GUI?

Template-method views get no references for free; each FK-shaped column needs an explicit ref and ref_col. The direction is reversed from normal tables: source_tab_id is the real table and target_tab_id is the view, otherwise it renders as a detail grid instead of a lookup.

Can I use OPTION (MAXRECURSION) inside a recursive view on SQL Server?

No, SQL Server rejects query hints inside a view definition with a syntax error at deploy time. Recursive CTE views must also cast domain-backed columns and accumulating arithmetic to exact matching base types between anchor and recursive members.

Does generating view code deploy it to the database?

No, generation only produces prog_object_generated_code inside the model; deployment to a live database is a separate step outside this Skill's scope. Confirm generation succeeded via generate_object_code_status and generated_code_stale = false before considering deployment.