cd /news/developer-tools/awslabs-constructs-for-quicksight-co… · home › topics › developer-tools › article
[ARTICLE · art-179168] src=github.com ↗ pub= topic=developer-tools verified=true sentiment=↑ positive

awslabs/constructs-for-quicksight: Concise business intelligence as code, no ETL

AWS Labs released constructs-for-quicksight version 1.0.0 at stable status, a TypeScript library compiled with jsii that lets developers author Amazon QuickSight dashboards, analyses, datasets, themes and topics as code without ETL. The library provides typed builders over the CloudFormation AWS::QuickSight::* model, a calculated-field expression DSL with type inference, DataPrep v2 and v3 step chains with an offline simulator, a pre-deploy rule engine, and ORM-to-dataset-schema adapters, with one API available in TypeScript, Python, Java, .NET and Go. The @cfq/core package has no CDK dependency and its cfq synth command writes a cfq.out/ directory of CLI-input request bodies, single-resource CloudFormation templates and a dependency-ordered manifest that can be applied via cfq apply, aws cloudformation deploy or the AWS CLI.

key takeaway

@cfq/core 1.0.0 lets teams define QuickSight dashboards, datasets and themes as typed code and emit per-resource --cli-input-json request bodies plus a dependency-ordered manifest via cfq synth, applied with cfq apply, aws cloudformation deploy or the AWS CLI.

read7 min views11 publishedDec 1, 2026
awslabs/constructs-for-quicksight: Concise business intelligence as code, no ETL
Image: Michielbdejong (auto-discovered)

Amazon QuickSight dashboards, analyses, datasets, themes and topics are nested JSON documents. This repository is a library for authoring them as code: typed builders over the CloudFormation AWS::QuickSight::* definition model, a calculated-field expression DSL with type inference, DataPrep v2 and v3 step chains with an offline simulator, a rule engine that checks definitions before deploy, and adapters that turn ORM metadata into dataset schemas.

The core is TypeScript compiled with jsii, so one API is available in TypeScript, Python, Java, .NET and Go. Validation is offline and schema-level: a definition can pass every rule and still be refused by the service (see Limitations and non-goals).

Status: version 1.0.0, stability stable. Each release is a GitHub Release of a tag with every language's build artifacts attached, and you pin that tag to install from it; see Install for how to install from a Release, or build and use the packages from a checkout.

@cfq/cdk wraps every core resource in a construct that emits the matching aws-cdk-lib Cfn* resource. Define the dashboard once with the @cfq/core builders and deploy it with the CDK app and pipeline you already have.

@cfq/core has no CDK dependency. cfq synth runs your app entry with CFQ_OUTDIR set, and the app's synth() writes the cfq.out/ directory. It holds, per resource, one --cli-input-json request body, one single-resource CloudFormation template and, when the resource has permissions, a permissions request body. It also holds a manifest with the dependency order and a .gitignore of *. Apply the files with cfq apply, which runs the plan through the AWS SDK with the service's consistency waits, with aws cloudformation deploy, or with the AWS CLI directly: cfq plan --emit-inputs <dir> writes the plan's steps in order as numbered aws quicksight <operation> --cli-input-json files into <dir>, a subdirectory of the assembly directory that it creates, with a README.md that lists them and their waits. Every file is the step's resolved request body except the update-dashboard-published-version step, which is a template: its VersionNumber is 0 and must be replaced with the version number that the preceding update-dashboard response returned before the service accepts it. A cfq.out/ file is a direct CLI input only when the app had an account and region at synth time.

Important

A plan file inlines data source credentials, the apply result is written beside it, and a run that crashes can leave a .cfq-<random>.tmp temporary beside a plan written outside cfq.out/. None of them belongs in version control. Add these four lines to your project's .gitignore before the first cfq plan.

cfq.out/
*.plan.json
*.apply.json
.cfq-*.tmp

The two jsii libraries carry one identifier per language. The Python names are the distribution names of the wheels attached to each Release. The Java, .NET and Go names are placeholders until a registry release is decided; Install lists them with the install and build steps.

Language @cfq/core @cfq/cdk
TypeScript @cfq/core @cfq/cdk
Python cfq-core (modulecfq_core ) cfq-cdk (modulecfq_cdk )
Java software.amazon.constructsforquicksight:cfq-core software.amazon.constructsforquicksight:cfq-cdk
.NET Cfq.Core Cfq.Cdk
Go github.com/awslabs/constructs-for-quicksight-go/cfqcore github.com/awslabs/constructs-for-quicksight-go/cfqcdk

The Java packages are software.amazon.constructsforquicksight.core and software.amazon.constructsforquicksight.cdk.

The command line, the MCP server and the widgets are plain TypeScript and run on Node 22.13 or later. The ORM adapters are written in the language of the ORM they read and run on that language's runtime; adapters/README.md names the runtimes.

Package What it is
@cfq/cli The cfq command:synth ,plan ,apply ,import andvalidate .
@cfq/mcp The cfq-mcp stdio server. Its README lists the 11 tools;apply exists only with--allow-apply .
@cfq/widgets The KaTeX and lineage pages for a QuickSight custom-content visual. @cfq/cdk bundles it.
ORM adapters SQLAlchemy, Prisma, Drizzle, TypeORM, JPA and Hibernate, EF Core, GORM and ent to a dataset schema.

Install from a GitHub Release as Install describes, or build the packages from a checkout as shown here.

Important

You need Node 22.13 or later (.nvmrc pins 22) and yarn 1 (classic), plus constructs ^10.0.0 beside @cfq/core. To run a .ts entry, cfq synth also needs ts-node and typescript beside @cfq/cli. They are optional peer dependencies, so a plain install does not fetch them; a .js entry needs neither. cfq plan and cfq apply read AWS credentials from the SDK default chain. cfq synth and cfq validate never call AWS.

From the repository root, install and build:

yarn install
yarn build

When you run from a checkout, cfq is a shell alias for node /path/to/constructs-for-quicksight/packages/cli/lib/bin/cfq.js, which the install page sets up.

Write an app that builds a QuickSightApp. The tested program is smoke/typescript/quickstart.ts, the same app that the quickstart builds step by step. Its first half declares the app, a data source and a data set with a DataPrep v2 chain:

import {
  Dashboard,
  DataPrepV2,
  DataSet,
  DataSource,
  Expressions,
  Permissions,
  QsType,
  QuickSightActions,
  QuickSightApp,
  generated,
} from '@cfq/core';

// The app holds the resources. `cfq synth` sets CFQ_OUTDIR; run on its own, the app writes to ./cfq.out.
const app = new QuickSightApp({ awsAccountId: '123456789012', region: 'us-east-1' });

const warehouse = new DataSource(app, 'Warehouse', {
  resourceId: 'warehouse',
  name: 'Warehouse',
  typeProp: 'ATHENA',
  parameters: { athenaParameters: { workGroup: 'primary' } },
});

// A physical table plus a DataPrep v2 chain: keep rows with a positive amount, then add a column.
const sales = new DataSet(app, 'Sales', {
  resourceId: 'sales',
  name: 'Sales',
  dataSource: warehouse,
  catalog: 'AwsDataCatalog',
  schemaName: 'sales_db',
  table: {
    name: 'sales',
    columns: [
      { name: 'amount', qsType: QsType.DECIMAL },
      { name: 'region', qsType: QsType.STRING },
    ],
  },
  dataPrep: DataPrepV2.builder()
    .filter(Expressions.parse('{amount} > 0'))
    .createColumns([{ name: 'net_amount', expr: Expressions.parse('{amount} * 0.9') }])
    .toDataPrep(),
});

The file goes on to declare a Dashboard with one KPI, then calls app.synth(), which validates every resource and writes the assembly. Save the full program as app.ts and run:

cfq synth app.ts
cfq validate --assembly cfq.out
cfq plan --assembly cfq.out --region us-east-1

For the full program, cfq synth prints the program's own output, then the command's count. These are the two lines the quickstart records:

3 resources in /path/to/cfq.out
3 resource(s) in /path/to/cfq.out

cfq validate prints one line per finding, then <n> finding(s), <n> error(s) across <n> resource(s). cfq plan writes cfq.out/cfq.plan.json and prints wrote <file> (<n> steps).

cfq plan takes the region from --region, else from the region the app was built with (the manifest identity), else from AWS_REGION or AWS_DEFAULT_REGION. The quickstart app sets a region, so --region is optional there. cfq apply --plan cfq.out/cfq.plan.json checks the plan's digest and then the caller's account (STS GetCallerIdentity) before any QuickSight call, asks for confirmation unless you pass --yes, and never deletes a resource or revokes a permission.

The documentation index lists every page. The main ones:

  • Install : package identifiers per language and how to build them.

  • Quickstart : a complete app, from synth to apply.

  • Concepts : the assembly layout, manifest, placeholders and findings.

  • Rules : every rule the engine runs, with its severity.

  • Limitations : what the library does not do and how that shows up.

  • Architecture : how the packages fit together.

  • API reference: @cfq/core and@cfq/cdk , generated from the jsii assemblies.

  • Changelog .

  • Validation is offline and schema-level. A definition can pass every rule and still be refused by the service, and cfq apply then stops at the first failed step.

  • cfq plan compares nothing with the deployed state, so every existing resource gets an update step on every plan.

  • cfq apply never deletes a resource or revokes a permission. Remove those with the AWS CLI.

  • The generated model is as current as its schema snapshot. A QuickSight property added after the snapshot has no member until the model is regenerated.

  • On Windows the 0600 file mode does nothing, so keep the assembly directory private.

The limitations page lists the rest and how each one shows up.

packages/core and packages/cdk are jsii libraries managed by projen from the root .projenrc.ts. packages/cli, packages/widgets, packages/mcp and packages/schema-gen are plain TypeScript packages sharing tsconfig.base.json. adapters/<language>/ holds the ORM adapters, each in its own language, with the helpers the TypeScript adapters share in adapters/typescript/common and the Go wire helpers in adapters/go/cfqwire. smoke/ holds the five-language smoke programs and tools/parity/ the parity tool; both are yarn workspaces. docs/ holds the documentation and docs/measurements/ the records of service behavior that some rules cite. The API reference for the two jsii libraries is generated: packages/core/API.md and packages/cdk/API.md.

Node 22 and yarn 1 (classic). yarn install, then yarn build, yarn test, yarn lint. After editing .projenrc.ts run yarn projen; never edit a file that starts with the projen marker comment. yarn scrub-check runs the information-boundary scan by hand through scripts/scrub-check.sh, before a push and before a release. See CONTRIBUTING.md and RELEASE.md.

Open an issue before a larger change, as CONTRIBUTING.md asks. Report a vulnerability through the routes in SECURITY.md, not in a public issue.

── more in #developer-tools 4 stories · sorted by recency
── more on @aws labs 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/awslabs-constructs-f…] indexed:0 read:7min 2026-12-01 · —