tessl install tessl/npm-lightdash--common@0.2231.5Shared TypeScript library for the Lightdash platform containing common types, utilities, and business logic for analytics workflows
Agent Success
Agent success rate when using this tile
72%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.09x
Baseline
Agent success rate without this tile
66%
Build a function that creates data model configurations with multiple tables connected through join relationships.
@generates
Create a function that constructs a data model configuration combining multiple tables. The function should:
Creating a model with base table "orders" and LEFT joining "customers" ON "orders.customer_id = customers.id" with relationship "one-to-many" returns a config with both tables and correct join settings @test
Creating a model with "orders" base table, LEFT joining "customers" and INNER joining "products" with their ON clauses should include both joins in the configuration @test
Creating a model with FULL join type and "one-to-one" relationship should correctly set the join type in the returned configuration @test
interface JoinConfig {
tableName: string;
joinType: 'left' | 'inner' | 'full' | 'right';
sqlOn: string;
relationship: 'one-to-many' | 'many-to-one' | 'one-to-one' | 'many-to-many';
}
interface TableConfig {
name: string;
sqlTable: string;
}
interface JoinedTable extends TableConfig {
sqlOn: string;
type: 'left' | 'inner' | 'full' | 'right';
}
interface ExploreConfig {
name: string;
baseTable: string;
joinedTables: JoinedTable[];
}
export function createExplore(
baseName: string,
baseTable: TableConfig,
joins: JoinConfig[]
): ExploreConfig;Provides the core type system and utilities for building data exploration models with join configurations.
@satisfied-by
docs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10
scenario-11
scenario-12
scenario-13
scenario-14
scenario-15
scenario-16
scenario-17
scenario-18
scenario-19
scenario-20