@lightdash/common 3.206.0 → 3.208.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/.tsbuildinfo +1 -1
- package/dist/cjs/compiler/exploreCompiler.d.ts +2 -1
- package/dist/cjs/compiler/exploreCompiler.d.ts.map +1 -1
- package/dist/cjs/compiler/exploreCompiler.js +4 -1
- package/dist/cjs/compiler/exploreCompiler.js.map +1 -1
- package/dist/cjs/compiler/lightdashModelConverter.d.ts.map +1 -1
- package/dist/cjs/compiler/lightdashModelConverter.js +1 -0
- package/dist/cjs/compiler/lightdashModelConverter.js.map +1 -1
- package/dist/cjs/compiler/translator.d.ts +2 -1
- package/dist/cjs/compiler/translator.d.ts.map +1 -1
- package/dist/cjs/compiler/translator.js +179 -121
- package/dist/cjs/compiler/translator.js.map +1 -1
- package/dist/cjs/dbt/schemas/lightdashMetadata.json +20 -0
- package/dist/cjs/schemas/json/lightdash-dbt-2.0.json +304 -267
- package/dist/cjs/schemas/json/model-as-code-1.0.json +8 -0
- package/dist/cjs/types/dbt.d.ts +7 -1
- package/dist/cjs/types/dbt.d.ts.map +1 -1
- package/dist/cjs/types/dbt.js +1 -0
- package/dist/cjs/types/dbt.js.map +1 -1
- package/dist/cjs/types/explore.d.ts +1 -0
- package/dist/cjs/types/explore.d.ts.map +1 -1
- package/dist/cjs/types/explore.js.map +1 -1
- package/dist/cjs/types/lightdashModel.d.ts +1 -0
- package/dist/cjs/types/lightdashModel.d.ts.map +1 -1
- package/dist/cjs/utils/item.d.ts +1 -0
- package/dist/cjs/utils/item.d.ts.map +1 -1
- package/dist/esm/.tsbuildinfo +1 -1
- package/dist/esm/compiler/exploreCompiler.d.ts +2 -1
- package/dist/esm/compiler/exploreCompiler.d.ts.map +1 -1
- package/dist/esm/compiler/exploreCompiler.js +4 -1
- package/dist/esm/compiler/exploreCompiler.js.map +1 -1
- package/dist/esm/compiler/lightdashModelConverter.d.ts.map +1 -1
- package/dist/esm/compiler/lightdashModelConverter.js +1 -0
- package/dist/esm/compiler/lightdashModelConverter.js.map +1 -1
- package/dist/esm/compiler/translator.d.ts +2 -1
- package/dist/esm/compiler/translator.d.ts.map +1 -1
- package/dist/esm/compiler/translator.js +177 -120
- package/dist/esm/compiler/translator.js.map +1 -1
- package/dist/esm/dbt/schemas/lightdashMetadata.json +20 -0
- package/dist/esm/schemas/json/lightdash-dbt-2.0.json +304 -267
- package/dist/esm/schemas/json/model-as-code-1.0.json +8 -0
- package/dist/esm/types/dbt.d.ts +7 -1
- package/dist/esm/types/dbt.d.ts.map +1 -1
- package/dist/esm/types/dbt.js +1 -0
- package/dist/esm/types/dbt.js.map +1 -1
- package/dist/esm/types/explore.d.ts +1 -0
- package/dist/esm/types/explore.d.ts.map +1 -1
- package/dist/esm/types/explore.js.map +1 -1
- package/dist/esm/types/lightdashModel.d.ts +1 -0
- package/dist/esm/types/lightdashModel.d.ts.map +1 -1
- package/dist/esm/utils/item.d.ts +1 -0
- package/dist/esm/utils/item.d.ts.map +1 -1
- package/dist/types/.tsbuildinfo +1 -1
- package/dist/types/compiler/exploreCompiler.d.ts +2 -1
- package/dist/types/compiler/exploreCompiler.d.ts.map +1 -1
- package/dist/types/compiler/exploreCompiler.js +4 -1
- package/dist/types/compiler/exploreCompiler.js.map +1 -1
- package/dist/types/compiler/lightdashModelConverter.d.ts.map +1 -1
- package/dist/types/compiler/lightdashModelConverter.js +1 -0
- package/dist/types/compiler/lightdashModelConverter.js.map +1 -1
- package/dist/types/compiler/translator.d.ts +2 -1
- package/dist/types/compiler/translator.d.ts.map +1 -1
- package/dist/types/compiler/translator.js +177 -120
- package/dist/types/compiler/translator.js.map +1 -1
- package/dist/types/dbt/schemas/lightdashMetadata.json +20 -0
- package/dist/types/schemas/json/lightdash-dbt-2.0.json +304 -267
- package/dist/types/schemas/json/model-as-code-1.0.json +8 -0
- package/dist/types/types/dbt.d.ts +7 -1
- package/dist/types/types/dbt.d.ts.map +1 -1
- package/dist/types/types/dbt.js +1 -0
- package/dist/types/types/dbt.js.map +1 -1
- package/dist/types/types/explore.d.ts +1 -0
- package/dist/types/types/explore.d.ts.map +1 -1
- package/dist/types/types/explore.js.map +1 -1
- package/dist/types/types/lightdashModel.d.ts +1 -0
- package/dist/types/types/lightdashModel.d.ts.map +1 -1
- package/dist/types/utils/item.d.ts +1 -0
- package/dist/types/utils/item.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -420,6 +420,269 @@
|
|
|
420
420
|
"additionalProperties": false,
|
|
421
421
|
"required": [],
|
|
422
422
|
"$defs": {
|
|
423
|
+
"additionalDimension": {
|
|
424
|
+
"type": "object",
|
|
425
|
+
"properties": {
|
|
426
|
+
"type": {
|
|
427
|
+
"type": "string",
|
|
428
|
+
"enum": ["string", "number", "timestamp", "date", "boolean"]
|
|
429
|
+
},
|
|
430
|
+
"label": {
|
|
431
|
+
"type": "string",
|
|
432
|
+
"minLength": 1
|
|
433
|
+
},
|
|
434
|
+
"description": {
|
|
435
|
+
"type": "string",
|
|
436
|
+
"minLength": 1
|
|
437
|
+
},
|
|
438
|
+
"ai_hint": {
|
|
439
|
+
"$ref": "#/$defs/aiHint",
|
|
440
|
+
"description": "Hints for AI-powered query generation"
|
|
441
|
+
},
|
|
442
|
+
"sql": {
|
|
443
|
+
"type": "string",
|
|
444
|
+
"minLength": 1
|
|
445
|
+
},
|
|
446
|
+
"time_intervals": {
|
|
447
|
+
"anyOf": [
|
|
448
|
+
{
|
|
449
|
+
"type": "array",
|
|
450
|
+
"items": {
|
|
451
|
+
"anyOf": [
|
|
452
|
+
{
|
|
453
|
+
"type": "string",
|
|
454
|
+
"enum": [
|
|
455
|
+
"RAW",
|
|
456
|
+
"DAY",
|
|
457
|
+
"WEEK",
|
|
458
|
+
"MONTH",
|
|
459
|
+
"QUARTER",
|
|
460
|
+
"YEAR",
|
|
461
|
+
"HOUR",
|
|
462
|
+
"MINUTE",
|
|
463
|
+
"SECOND",
|
|
464
|
+
"MILLISECOND",
|
|
465
|
+
"WEEK_NUM",
|
|
466
|
+
"MONTH_NUM",
|
|
467
|
+
"MONTH_NAME",
|
|
468
|
+
"DAY_OF_WEEK_NAME",
|
|
469
|
+
"QUARTER_NAME",
|
|
470
|
+
"DAY_OF_WEEK_INDEX",
|
|
471
|
+
"DAY_OF_MONTH_NUM",
|
|
472
|
+
"DAY_OF_YEAR_NUM",
|
|
473
|
+
"QUARTER_NUM",
|
|
474
|
+
"YEAR_NUM",
|
|
475
|
+
"HOUR_OF_DAY_NUM",
|
|
476
|
+
"MINUTE_OF_HOUR_NUM"
|
|
477
|
+
]
|
|
478
|
+
},
|
|
479
|
+
{
|
|
480
|
+
"type": "string"
|
|
481
|
+
}
|
|
482
|
+
]
|
|
483
|
+
}
|
|
484
|
+
},
|
|
485
|
+
{
|
|
486
|
+
"type": "string",
|
|
487
|
+
"enum": ["default", "OFF"]
|
|
488
|
+
}
|
|
489
|
+
]
|
|
490
|
+
},
|
|
491
|
+
"convert_timezone": {
|
|
492
|
+
"type": "boolean",
|
|
493
|
+
"description": "When false, this dimension is rendered in its raw warehouse value and is not converted to the project timezone for display. Filter SQL still converts. Defaults to true."
|
|
494
|
+
},
|
|
495
|
+
"timestamp_domain": {
|
|
496
|
+
"type": "string",
|
|
497
|
+
"enum": ["aware", "naive"],
|
|
498
|
+
"description": "Declares whether this timestamp column stores an instant ('aware') or a bare wall clock ('naive'); overrides the warehouse catalog."
|
|
499
|
+
},
|
|
500
|
+
"hidden": {
|
|
501
|
+
"type": "boolean"
|
|
502
|
+
},
|
|
503
|
+
"round": {
|
|
504
|
+
"type": "number",
|
|
505
|
+
"minimum": 0
|
|
506
|
+
},
|
|
507
|
+
"format": {
|
|
508
|
+
"type": "string"
|
|
509
|
+
},
|
|
510
|
+
"separator": {
|
|
511
|
+
"$ref": "#/$defs/separator"
|
|
512
|
+
},
|
|
513
|
+
"compact": {
|
|
514
|
+
"type": "string",
|
|
515
|
+
"enum": [
|
|
516
|
+
"auto",
|
|
517
|
+
"thousands",
|
|
518
|
+
"millions",
|
|
519
|
+
"billions",
|
|
520
|
+
"trillions",
|
|
521
|
+
"thousand",
|
|
522
|
+
"million",
|
|
523
|
+
"billion",
|
|
524
|
+
"trillion",
|
|
525
|
+
"K",
|
|
526
|
+
"M",
|
|
527
|
+
"B",
|
|
528
|
+
"T",
|
|
529
|
+
"kilobytes",
|
|
530
|
+
"megabytes",
|
|
531
|
+
"gigabytes",
|
|
532
|
+
"terabytes",
|
|
533
|
+
"petabytes",
|
|
534
|
+
"kilobyte",
|
|
535
|
+
"megabyte",
|
|
536
|
+
"gigabyte",
|
|
537
|
+
"terabyte",
|
|
538
|
+
"petabyte",
|
|
539
|
+
"KB",
|
|
540
|
+
"MB",
|
|
541
|
+
"GB",
|
|
542
|
+
"TB",
|
|
543
|
+
"PB",
|
|
544
|
+
"kibibytes",
|
|
545
|
+
"mebibytes",
|
|
546
|
+
"gibibytes",
|
|
547
|
+
"tebibytes",
|
|
548
|
+
"pebibytes",
|
|
549
|
+
"kibibyte",
|
|
550
|
+
"mebibyte",
|
|
551
|
+
"gibibyte",
|
|
552
|
+
"tebibyte",
|
|
553
|
+
"pebibyte",
|
|
554
|
+
"KiB",
|
|
555
|
+
"MiB",
|
|
556
|
+
"GiB",
|
|
557
|
+
"TiB",
|
|
558
|
+
"PiB"
|
|
559
|
+
]
|
|
560
|
+
},
|
|
561
|
+
"group_label": {
|
|
562
|
+
"type": "string",
|
|
563
|
+
"deprecated": true,
|
|
564
|
+
"description": "Deprecated: use groups instead"
|
|
565
|
+
},
|
|
566
|
+
"urls": {
|
|
567
|
+
"type": "array",
|
|
568
|
+
"items": {
|
|
569
|
+
"type": "object",
|
|
570
|
+
"properties": {
|
|
571
|
+
"url": {
|
|
572
|
+
"type": "string",
|
|
573
|
+
"description": "Liquidjs template for the URL. Available variables: ${value.raw}, ${value.formatted}, ${row.table_name.field_name.raw}, ${row.table_name.field_name.formatted}"
|
|
574
|
+
},
|
|
575
|
+
"label": {
|
|
576
|
+
"type": "string"
|
|
577
|
+
}
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
},
|
|
581
|
+
"image": {
|
|
582
|
+
"type": "object",
|
|
583
|
+
"description": "Displays the dimension value as an image",
|
|
584
|
+
"properties": {
|
|
585
|
+
"url": {
|
|
586
|
+
"type": "string",
|
|
587
|
+
"description": "Liquidjs template for the image URL. Available variables: ${value.raw}, ${value.formatted}, ${row.table_name.field_name.raw}, ${row.table_name.field_name.formatted}. Only fields selected in the query are available in row context."
|
|
588
|
+
}
|
|
589
|
+
},
|
|
590
|
+
"required": ["url"]
|
|
591
|
+
},
|
|
592
|
+
"tags": {
|
|
593
|
+
"oneOf": [
|
|
594
|
+
{
|
|
595
|
+
"type": "string"
|
|
596
|
+
},
|
|
597
|
+
{
|
|
598
|
+
"type": "array",
|
|
599
|
+
"items": {
|
|
600
|
+
"type": "string"
|
|
601
|
+
}
|
|
602
|
+
}
|
|
603
|
+
]
|
|
604
|
+
},
|
|
605
|
+
"required_attributes": {
|
|
606
|
+
"type": "object",
|
|
607
|
+
"properties": {},
|
|
608
|
+
"additionalProperties": {
|
|
609
|
+
"oneOf": [
|
|
610
|
+
{
|
|
611
|
+
"type": "array",
|
|
612
|
+
"items": {
|
|
613
|
+
"type": "string"
|
|
614
|
+
}
|
|
615
|
+
},
|
|
616
|
+
{
|
|
617
|
+
"type": "string"
|
|
618
|
+
}
|
|
619
|
+
]
|
|
620
|
+
}
|
|
621
|
+
},
|
|
622
|
+
"any_attributes": {
|
|
623
|
+
"type": "object",
|
|
624
|
+
"properties": {},
|
|
625
|
+
"additionalProperties": {
|
|
626
|
+
"oneOf": [
|
|
627
|
+
{
|
|
628
|
+
"type": "array",
|
|
629
|
+
"items": {
|
|
630
|
+
"type": "string"
|
|
631
|
+
}
|
|
632
|
+
},
|
|
633
|
+
{
|
|
634
|
+
"type": "string"
|
|
635
|
+
}
|
|
636
|
+
]
|
|
637
|
+
}
|
|
638
|
+
},
|
|
639
|
+
"filter_autocomplete": {
|
|
640
|
+
"type": "object",
|
|
641
|
+
"description": "Configure static filter autocomplete suggestions and warehouse fetching for this dimension.",
|
|
642
|
+
"properties": {
|
|
643
|
+
"values": {
|
|
644
|
+
"type": "array",
|
|
645
|
+
"items": {
|
|
646
|
+
"type": "object",
|
|
647
|
+
"properties": {
|
|
648
|
+
"value": {
|
|
649
|
+
"type": "string"
|
|
650
|
+
},
|
|
651
|
+
"label": {
|
|
652
|
+
"type": "string"
|
|
653
|
+
}
|
|
654
|
+
},
|
|
655
|
+
"required": ["value"]
|
|
656
|
+
}
|
|
657
|
+
},
|
|
658
|
+
"fetch_from_warehouse": {
|
|
659
|
+
"type": "boolean",
|
|
660
|
+
"description": "When false, filter autocomplete will not fetch values from the warehouse for this dimension. Defaults to true."
|
|
661
|
+
},
|
|
662
|
+
"label_dimension": {
|
|
663
|
+
"type": "string",
|
|
664
|
+
"description": "Name of another dimension in the same table whose value is shown as the display label for each warehouse-fetched value."
|
|
665
|
+
},
|
|
666
|
+
"options_from_dimension": {
|
|
667
|
+
"type": "object",
|
|
668
|
+
"description": "Fetch autocomplete values from a dimension in another model. Cascading filters are not applied.",
|
|
669
|
+
"properties": {
|
|
670
|
+
"model": {
|
|
671
|
+
"type": "string"
|
|
672
|
+
},
|
|
673
|
+
"dimension": {
|
|
674
|
+
"type": "string"
|
|
675
|
+
},
|
|
676
|
+
"label_dimension": {
|
|
677
|
+
"type": "string"
|
|
678
|
+
}
|
|
679
|
+
},
|
|
680
|
+
"required": ["model", "dimension"]
|
|
681
|
+
}
|
|
682
|
+
}
|
|
683
|
+
}
|
|
684
|
+
}
|
|
685
|
+
},
|
|
423
686
|
"separator": {
|
|
424
687
|
"type": "string",
|
|
425
688
|
"enum": [
|
|
@@ -462,6 +725,25 @@
|
|
|
462
725
|
"modelMeta": {
|
|
463
726
|
"type": "object",
|
|
464
727
|
"properties": {
|
|
728
|
+
"additional_dimensions": {
|
|
729
|
+
"type": "object",
|
|
730
|
+
"description": "Dimensions that are not derived from a single column",
|
|
731
|
+
"patternProperties": {
|
|
732
|
+
"^[a-z0-9_]+$": {
|
|
733
|
+
"allOf": [
|
|
734
|
+
{ "$ref": "#/$defs/additionalDimension" },
|
|
735
|
+
{
|
|
736
|
+
"type": "object",
|
|
737
|
+
"required": ["type", "sql"]
|
|
738
|
+
}
|
|
739
|
+
]
|
|
740
|
+
}
|
|
741
|
+
}
|
|
742
|
+
},
|
|
743
|
+
"combine_joined_fields": {
|
|
744
|
+
"type": "boolean",
|
|
745
|
+
"description": "Combine visible joined fields into shared Dimensions and Metrics sections. Defaults to false; named explores inherit the model setting."
|
|
746
|
+
},
|
|
465
747
|
"joins": {
|
|
466
748
|
"type": "array",
|
|
467
749
|
"items": {
|
|
@@ -1209,6 +1491,27 @@
|
|
|
1209
1491
|
"^[a-zA-Z0-9_]+$": {
|
|
1210
1492
|
"type": "object",
|
|
1211
1493
|
"properties": {
|
|
1494
|
+
"additional_dimensions": {
|
|
1495
|
+
"type": "object",
|
|
1496
|
+
"description": "Dimensions that are not derived from a single column",
|
|
1497
|
+
"patternProperties": {
|
|
1498
|
+
"^[a-z0-9_]+$": {
|
|
1499
|
+
"allOf": [
|
|
1500
|
+
{
|
|
1501
|
+
"$ref": "#/$defs/additionalDimension"
|
|
1502
|
+
},
|
|
1503
|
+
{
|
|
1504
|
+
"type": "object",
|
|
1505
|
+
"required": ["type", "sql"]
|
|
1506
|
+
}
|
|
1507
|
+
]
|
|
1508
|
+
}
|
|
1509
|
+
}
|
|
1510
|
+
},
|
|
1511
|
+
"combine_joined_fields": {
|
|
1512
|
+
"type": "boolean",
|
|
1513
|
+
"description": "Combine visible joined fields into shared Dimensions and Metrics sections. Defaults to false; named explores inherit the model setting."
|
|
1514
|
+
},
|
|
1212
1515
|
"default_filters": {
|
|
1213
1516
|
"type": "array",
|
|
1214
1517
|
"description": "Default filters that are automatically applied when exploring this explore",
|
|
@@ -1859,273 +2162,7 @@
|
|
|
1859
2162
|
"type": "object",
|
|
1860
2163
|
"patternProperties": {
|
|
1861
2164
|
"^[a-z0-9_]+$": {
|
|
1862
|
-
"
|
|
1863
|
-
"properties": {
|
|
1864
|
-
"type": {
|
|
1865
|
-
"type": "string",
|
|
1866
|
-
"enum": [
|
|
1867
|
-
"string",
|
|
1868
|
-
"number",
|
|
1869
|
-
"timestamp",
|
|
1870
|
-
"date",
|
|
1871
|
-
"boolean"
|
|
1872
|
-
]
|
|
1873
|
-
},
|
|
1874
|
-
"label": {
|
|
1875
|
-
"type": "string",
|
|
1876
|
-
"minLength": 1
|
|
1877
|
-
},
|
|
1878
|
-
"description": {
|
|
1879
|
-
"type": "string",
|
|
1880
|
-
"minLength": 1
|
|
1881
|
-
},
|
|
1882
|
-
"ai_hint": {
|
|
1883
|
-
"$ref": "#/$defs/aiHint",
|
|
1884
|
-
"description": "Hints for AI-powered query generation"
|
|
1885
|
-
},
|
|
1886
|
-
"sql": {
|
|
1887
|
-
"type": "string",
|
|
1888
|
-
"minLength": 1
|
|
1889
|
-
},
|
|
1890
|
-
"time_intervals": {
|
|
1891
|
-
"anyOf": [
|
|
1892
|
-
{
|
|
1893
|
-
"type": "array",
|
|
1894
|
-
"items": {
|
|
1895
|
-
"anyOf": [
|
|
1896
|
-
{
|
|
1897
|
-
"type": "string",
|
|
1898
|
-
"enum": [
|
|
1899
|
-
"RAW",
|
|
1900
|
-
"DAY",
|
|
1901
|
-
"WEEK",
|
|
1902
|
-
"MONTH",
|
|
1903
|
-
"QUARTER",
|
|
1904
|
-
"YEAR",
|
|
1905
|
-
"HOUR",
|
|
1906
|
-
"MINUTE",
|
|
1907
|
-
"SECOND",
|
|
1908
|
-
"MILLISECOND",
|
|
1909
|
-
"WEEK_NUM",
|
|
1910
|
-
"MONTH_NUM",
|
|
1911
|
-
"MONTH_NAME",
|
|
1912
|
-
"DAY_OF_WEEK_NAME",
|
|
1913
|
-
"QUARTER_NAME",
|
|
1914
|
-
"DAY_OF_WEEK_INDEX",
|
|
1915
|
-
"DAY_OF_MONTH_NUM",
|
|
1916
|
-
"DAY_OF_YEAR_NUM",
|
|
1917
|
-
"QUARTER_NUM",
|
|
1918
|
-
"YEAR_NUM",
|
|
1919
|
-
"HOUR_OF_DAY_NUM",
|
|
1920
|
-
"MINUTE_OF_HOUR_NUM"
|
|
1921
|
-
]
|
|
1922
|
-
},
|
|
1923
|
-
{
|
|
1924
|
-
"type": "string"
|
|
1925
|
-
}
|
|
1926
|
-
]
|
|
1927
|
-
}
|
|
1928
|
-
},
|
|
1929
|
-
{
|
|
1930
|
-
"type": "string",
|
|
1931
|
-
"enum": ["default", "OFF"]
|
|
1932
|
-
}
|
|
1933
|
-
]
|
|
1934
|
-
},
|
|
1935
|
-
"convert_timezone": {
|
|
1936
|
-
"type": "boolean",
|
|
1937
|
-
"description": "When false, this dimension is rendered in its raw warehouse value and is not converted to the project timezone for display. Filter SQL still converts. Defaults to true."
|
|
1938
|
-
},
|
|
1939
|
-
"timestamp_domain": {
|
|
1940
|
-
"type": "string",
|
|
1941
|
-
"enum": ["aware", "naive"],
|
|
1942
|
-
"description": "Declares whether this timestamp column stores an instant ('aware') or a bare wall clock ('naive'); overrides the warehouse catalog."
|
|
1943
|
-
},
|
|
1944
|
-
"hidden": {
|
|
1945
|
-
"type": "boolean"
|
|
1946
|
-
},
|
|
1947
|
-
"round": {
|
|
1948
|
-
"type": "number",
|
|
1949
|
-
"minimum": 0
|
|
1950
|
-
},
|
|
1951
|
-
"format": {
|
|
1952
|
-
"type": "string"
|
|
1953
|
-
},
|
|
1954
|
-
"separator": {
|
|
1955
|
-
"$ref": "#/$defs/separator"
|
|
1956
|
-
},
|
|
1957
|
-
"compact": {
|
|
1958
|
-
"type": "string",
|
|
1959
|
-
"enum": [
|
|
1960
|
-
"auto",
|
|
1961
|
-
"thousands",
|
|
1962
|
-
"millions",
|
|
1963
|
-
"billions",
|
|
1964
|
-
"trillions",
|
|
1965
|
-
"thousand",
|
|
1966
|
-
"million",
|
|
1967
|
-
"billion",
|
|
1968
|
-
"trillion",
|
|
1969
|
-
"K",
|
|
1970
|
-
"M",
|
|
1971
|
-
"B",
|
|
1972
|
-
"T",
|
|
1973
|
-
"kilobytes",
|
|
1974
|
-
"megabytes",
|
|
1975
|
-
"gigabytes",
|
|
1976
|
-
"terabytes",
|
|
1977
|
-
"petabytes",
|
|
1978
|
-
"kilobyte",
|
|
1979
|
-
"megabyte",
|
|
1980
|
-
"gigabyte",
|
|
1981
|
-
"terabyte",
|
|
1982
|
-
"petabyte",
|
|
1983
|
-
"KB",
|
|
1984
|
-
"MB",
|
|
1985
|
-
"GB",
|
|
1986
|
-
"TB",
|
|
1987
|
-
"PB",
|
|
1988
|
-
"kibibytes",
|
|
1989
|
-
"mebibytes",
|
|
1990
|
-
"gibibytes",
|
|
1991
|
-
"tebibytes",
|
|
1992
|
-
"pebibytes",
|
|
1993
|
-
"kibibyte",
|
|
1994
|
-
"mebibyte",
|
|
1995
|
-
"gibibyte",
|
|
1996
|
-
"tebibyte",
|
|
1997
|
-
"pebibyte",
|
|
1998
|
-
"KiB",
|
|
1999
|
-
"MiB",
|
|
2000
|
-
"GiB",
|
|
2001
|
-
"TiB",
|
|
2002
|
-
"PiB"
|
|
2003
|
-
]
|
|
2004
|
-
},
|
|
2005
|
-
"group_label": {
|
|
2006
|
-
"type": "string",
|
|
2007
|
-
"deprecated": true,
|
|
2008
|
-
"description": "Deprecated: use groups instead"
|
|
2009
|
-
},
|
|
2010
|
-
"urls": {
|
|
2011
|
-
"type": "array",
|
|
2012
|
-
"items": {
|
|
2013
|
-
"type": "object",
|
|
2014
|
-
"properties": {
|
|
2015
|
-
"url": {
|
|
2016
|
-
"type": "string",
|
|
2017
|
-
"description": "Liquidjs template for the URL. Available variables: ${value.raw}, ${value.formatted}, ${row.table_name.field_name.raw}, ${row.table_name.field_name.formatted}"
|
|
2018
|
-
},
|
|
2019
|
-
"label": {
|
|
2020
|
-
"type": "string"
|
|
2021
|
-
}
|
|
2022
|
-
}
|
|
2023
|
-
}
|
|
2024
|
-
},
|
|
2025
|
-
"image": {
|
|
2026
|
-
"type": "object",
|
|
2027
|
-
"description": "Displays the dimension value as an image",
|
|
2028
|
-
"properties": {
|
|
2029
|
-
"url": {
|
|
2030
|
-
"type": "string",
|
|
2031
|
-
"description": "Liquidjs template for the image URL. Available variables: ${value.raw}, ${value.formatted}, ${row.table_name.field_name.raw}, ${row.table_name.field_name.formatted}. Only fields selected in the query are available in row context."
|
|
2032
|
-
}
|
|
2033
|
-
},
|
|
2034
|
-
"required": ["url"]
|
|
2035
|
-
},
|
|
2036
|
-
"tags": {
|
|
2037
|
-
"oneOf": [
|
|
2038
|
-
{
|
|
2039
|
-
"type": "string"
|
|
2040
|
-
},
|
|
2041
|
-
{
|
|
2042
|
-
"type": "array",
|
|
2043
|
-
"items": {
|
|
2044
|
-
"type": "string"
|
|
2045
|
-
}
|
|
2046
|
-
}
|
|
2047
|
-
]
|
|
2048
|
-
},
|
|
2049
|
-
"required_attributes": {
|
|
2050
|
-
"type": "object",
|
|
2051
|
-
"properties": {},
|
|
2052
|
-
"additionalProperties": {
|
|
2053
|
-
"oneOf": [
|
|
2054
|
-
{
|
|
2055
|
-
"type": "array",
|
|
2056
|
-
"items": {
|
|
2057
|
-
"type": "string"
|
|
2058
|
-
}
|
|
2059
|
-
},
|
|
2060
|
-
{
|
|
2061
|
-
"type": "string"
|
|
2062
|
-
}
|
|
2063
|
-
]
|
|
2064
|
-
}
|
|
2065
|
-
},
|
|
2066
|
-
"any_attributes": {
|
|
2067
|
-
"type": "object",
|
|
2068
|
-
"properties": {},
|
|
2069
|
-
"additionalProperties": {
|
|
2070
|
-
"oneOf": [
|
|
2071
|
-
{
|
|
2072
|
-
"type": "array",
|
|
2073
|
-
"items": {
|
|
2074
|
-
"type": "string"
|
|
2075
|
-
}
|
|
2076
|
-
},
|
|
2077
|
-
{
|
|
2078
|
-
"type": "string"
|
|
2079
|
-
}
|
|
2080
|
-
]
|
|
2081
|
-
}
|
|
2082
|
-
},
|
|
2083
|
-
"filter_autocomplete": {
|
|
2084
|
-
"type": "object",
|
|
2085
|
-
"description": "Configure static filter autocomplete suggestions and warehouse fetching for this dimension.",
|
|
2086
|
-
"properties": {
|
|
2087
|
-
"values": {
|
|
2088
|
-
"type": "array",
|
|
2089
|
-
"items": {
|
|
2090
|
-
"type": "object",
|
|
2091
|
-
"properties": {
|
|
2092
|
-
"value": {
|
|
2093
|
-
"type": "string"
|
|
2094
|
-
},
|
|
2095
|
-
"label": {
|
|
2096
|
-
"type": "string"
|
|
2097
|
-
}
|
|
2098
|
-
},
|
|
2099
|
-
"required": ["value"]
|
|
2100
|
-
}
|
|
2101
|
-
},
|
|
2102
|
-
"fetch_from_warehouse": {
|
|
2103
|
-
"type": "boolean",
|
|
2104
|
-
"description": "When false, filter autocomplete will not fetch values from the warehouse for this dimension. Defaults to true."
|
|
2105
|
-
},
|
|
2106
|
-
"label_dimension": {
|
|
2107
|
-
"type": "string",
|
|
2108
|
-
"description": "Name of another dimension in the same table whose value is shown as the display label for each warehouse-fetched value."
|
|
2109
|
-
},
|
|
2110
|
-
"options_from_dimension": {
|
|
2111
|
-
"type": "object",
|
|
2112
|
-
"description": "Fetch autocomplete values from a dimension in another model. Cascading filters are not applied.",
|
|
2113
|
-
"properties": {
|
|
2114
|
-
"model": {
|
|
2115
|
-
"type": "string"
|
|
2116
|
-
},
|
|
2117
|
-
"dimension": {
|
|
2118
|
-
"type": "string"
|
|
2119
|
-
},
|
|
2120
|
-
"label_dimension": {
|
|
2121
|
-
"type": "string"
|
|
2122
|
-
}
|
|
2123
|
-
},
|
|
2124
|
-
"required": ["model", "dimension"]
|
|
2125
|
-
}
|
|
2126
|
-
}
|
|
2127
|
-
}
|
|
2128
|
-
}
|
|
2165
|
+
"$ref": "#/$defs/additionalDimension"
|
|
2129
2166
|
}
|
|
2130
2167
|
}
|
|
2131
2168
|
}
|
|
@@ -14,6 +14,10 @@
|
|
|
14
14
|
"type": "object",
|
|
15
15
|
"required": ["type", "name", "dimensions", "sql_from"],
|
|
16
16
|
"properties": {
|
|
17
|
+
"combine_joined_fields": {
|
|
18
|
+
"type": "boolean",
|
|
19
|
+
"description": "Combine visible joined fields into shared Dimensions and Metrics sections. Defaults to false; named explores inherit the model setting."
|
|
20
|
+
},
|
|
17
21
|
"type": {
|
|
18
22
|
"enum": ["model", "model/v1beta", "model/v1"],
|
|
19
23
|
"description": "Resource type identifier"
|
|
@@ -921,6 +925,10 @@
|
|
|
921
925
|
"Explore": {
|
|
922
926
|
"type": "object",
|
|
923
927
|
"properties": {
|
|
928
|
+
"combine_joined_fields": {
|
|
929
|
+
"type": "boolean",
|
|
930
|
+
"description": "Combine visible joined fields into shared Dimensions and Metrics sections. Defaults to false; named explores inherit the model setting."
|
|
931
|
+
},
|
|
924
932
|
"label": {
|
|
925
933
|
"type": "string",
|
|
926
934
|
"description": "Human-readable label for the explore"
|
package/dist/esm/types/dbt.d.ts
CHANGED
|
@@ -111,6 +111,7 @@ type ExploreConfig = {
|
|
|
111
111
|
*/
|
|
112
112
|
groups?: string[];
|
|
113
113
|
joins?: DbtModelJoin[];
|
|
114
|
+
combine_joined_fields?: boolean;
|
|
114
115
|
case_sensitive?: boolean;
|
|
115
116
|
sql_filter?: string;
|
|
116
117
|
sql_where?: string;
|
|
@@ -151,6 +152,11 @@ export type FieldSetDefinition = {
|
|
|
151
152
|
fields: string[];
|
|
152
153
|
};
|
|
153
154
|
export type DbtModelLightdashConfig = ExploreConfig & SharedDbtModelLightdashConfig & {
|
|
155
|
+
/**
|
|
156
|
+
* Model-level dimensions. They belong to the table, so they are
|
|
157
|
+
* available in every explore that includes it, joins included.
|
|
158
|
+
*/
|
|
159
|
+
additional_dimensions?: Record<string, DbtExploreLightdashAdditionalDimension>;
|
|
154
160
|
metrics?: Record<string, DbtModelLightdashMetric>;
|
|
155
161
|
sets?: Record<string, FieldSetDefinition>;
|
|
156
162
|
order_fields_by?: OrderFieldsByStrategy;
|
|
@@ -183,7 +189,7 @@ export type DbtModelLightdashConfig = ExploreConfig & SharedDbtModelLightdashCon
|
|
|
183
189
|
owner?: string;
|
|
184
190
|
pre_aggregates?: DbtPreAggregateDef[];
|
|
185
191
|
};
|
|
186
|
-
export declare const RESERVED_MODEL_META_KEYS: readonly ["label", "description", "group_label", "groups", "joins", "case_sensitive", "sql_filter", "sql_where", "additional_dimensions", "default_filters", "required_filters", "metrics", "sets", "order_fields_by", "sql_from", "required_attributes", "any_attributes", "group_details", "default_time_dimension", "default_show_underlying_values", "spotlight", "explores", "hidden", "ai_hint", "parameters", "primary_key", "owner", "pre_aggregates"];
|
|
192
|
+
export declare const RESERVED_MODEL_META_KEYS: readonly ["label", "description", "group_label", "groups", "joins", "case_sensitive", "combine_joined_fields", "sql_filter", "sql_where", "additional_dimensions", "default_filters", "required_filters", "metrics", "sets", "order_fields_by", "sql_from", "required_attributes", "any_attributes", "group_details", "default_time_dimension", "default_show_underlying_values", "spotlight", "explores", "hidden", "ai_hint", "parameters", "primary_key", "owner", "pre_aggregates"];
|
|
187
193
|
export type DbtModelGroup = {
|
|
188
194
|
label: string;
|
|
189
195
|
description?: string;
|