Practical how-to tips
This page collects practical tips for everyday bino work. Use it as a checklist when setting up new bundles or troubleshooting.
Structure your workdir
Section titled “Structure your workdir”- Start with one workdir per logical report bundle (for example
monthly-group-report). - Create subdirectories like
manifests/,data/, andassets/to keep configuration, input data, and images separate. - Keep build output in a dedicated
dist/directory and add it to.gitignore.
Naming and referencing
Section titled “Naming and referencing”- Use descriptive
metadata.namevalues likesalesDailyCsv,revenueByRegion,annualSalesReport. - Remember that
DataSourcenames must be valid unquoted SQL identifiers: lowercase letters, digits, underscores, starting with a letter or underscore. - When refactoring, use
bino graphto understand dependencies before renaming.
Environment variables and configuration
Section titled “Environment variables and configuration”- Use
${VAR}and${VAR:default}to keep paths and secrets out of manifests. - Expect
bino previewto warn but continue with missing variables, whilebino buildwill fail. - Prefer
*FromEnvfields inConnectionSecret(for examplepasswordFromEnv,keyIdFromEnv).
Iterating quickly
Section titled “Iterating quickly”- Use
bino preview --log-sqlwhile designing layouts to see which queries run. - Keep SQL in
DataSetmanifests readable; use CTEs for complex logic. - Use small inline datasources for prototypes, then move to real files or databases.
Performance and stability
Section titled “Performance and stability”- Avoid overly broad file globs; point
DataSource.spec.pathat focused directories. - Use
ephemeral: falsefor large but stable external datasets to benefit from caching. - Raise runtime limits via environment variables only when needed and document them in your project README or CI scripts.
Collaboration
Section titled “Collaboration”- Use
metadata.labelsandmetadata.annotationsto tag manifests with team, domain, or lifecycle information. - Keep how-to notes in your Starlight docs so new team members can follow established patterns.
- Use placeholder screenshots in docs and replace them as real reports stabilize.