Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CT-2833] Make dimension list available on the semantic model documentation page #434

Closed
siljamardla opened this issue Jul 18, 2023 · 7 comments · May be fixed by #535
Closed

[CT-2833] Make dimension list available on the semantic model documentation page #434

siljamardla opened this issue Jul 18, 2023 · 7 comments · May be fixed by #535
Labels
enhancement New feature or request good_first_issue Good for newcomers Stale triage

Comments

@siljamardla
Copy link

Describe the feature

When I open the documentation of a metric, I would like to see the dimensions available for this metric.

Describe alternatives you've considered

When scanning through the open issues list, I found this issue about exposing the metric yaml in the documentation. If that was exposed, it would provide the same value.

Additional context

When moving to MetricFlow the available dimension list will be extended thanks to additional functionality. However, I'm sure 'dbt compile' actually has to know the available dimension list anyway, so I'm guessing it will not be that much more difficult to make it available in documentation. And considering the MetricFlow functionality, the available dimension list will be even more valuable than in current metrics.

Who will this benefit?

When looking for metrics, it is very important to know at which granularities these metrics are available. Let's say I want to calculate country level 'number of orders' metric. I find the 'number of orders' metric in dbt docs, but I still have no idea if I can actually use it to calculate the country level values.

Are you interested in contributing this feature?

Sure, but I have no idea where to start.

@siljamardla siljamardla added enhancement New feature or request triage labels Jul 18, 2023
@github-actions github-actions bot changed the title Make metric dimension list available on the metric documentation page [CT-2833] Make metric dimension list available on the metric documentation page Jul 18, 2023
@graciegoheen
Copy link

Hello! Thanks for opening up this issue.

We did some work for 1.6.1 to include semantic models in the docs site, would you want dimensions included in the semantic models page?
Screenshot 2023-08-25 at 11 06 10 AM

I think this would be pretty straightforward to add for the semantic models, but not possible (or would take significant effort) for metrics.

Candidly, our team isn't able to prioritize new feature development in dbt-docs, so this isn't something we'd be picking up ourselves.

@siljamardla
Copy link
Author

would you want dimensions included in the semantic models page?

Absolutely!

@siljamardla
Copy link
Author

Seems like you already have an idea of how this could be implemented. How can I support?

@jtcohen6
Copy link
Contributor

The code to add dimensions to the semantic model page would probably be quite similar to the code we already have for displaying entities:

<section class="section" ng-show = "semantic_model.entities.length != 0">
<div class="section-target" id="entities"></div>
<div class="section-content">
<h6>Entities</h6>
<div class="panel">
<div class="detail-group" style="padding-bottom: 0">
<div class="detail-body" style="padding-left: 0">
<dl class="detail" ng-style="{'padding-left': $index == 0 ? 0 : 'auto'}"
ng-repeat="entity in semantic_model.entities">
<dt class="detail-label">Name</dt>
<dd class="detail-value" ng-if="entity.name">{{ entity.name }}</dd>
<dd class="detail-value" ng-if="!entity.name">None</dd>
<dt class="detail-label">Type</dt>
<dd class="detail-value" ng-if="entity.type">{{ entity.type }}</dd>
<dd class="detail-value" ng-if="!entity.type">None</dd>
<dt class="detail-label">Expression</dt>
<dd class="detail-value" ng-if="entity.expr">{{ entity.expr }}</dd>
<dd class="detail-value" ng-if="!entity.expr">None</dd>
</dl>
</div>
</div>
</div>
</div>
</section>

To reiterate Grace above, we won't be able to prioritize this one ourselves - but if you're interested in having a go at it, we'd welcome a PR!

@jtcohen6 jtcohen6 added help_wanted Trickier changes, with a clear starting point, good for previous/experienced contributors and removed triage labels Sep 22, 2023
@jtcohen6 jtcohen6 changed the title [CT-2833] Make metric dimension list available on the metric documentation page [CT-2833] Make dimension list available on the semantic model documentation page Sep 22, 2023
@jtcohen6 jtcohen6 added good_first_issue Good for newcomers and removed help_wanted Trickier changes, with a clear starting point, good for previous/experienced contributors labels Sep 22, 2023
Copy link
Contributor

This issue has been marked as Stale because it has been open for 180 days with no activity. If you would like the issue to remain open, please comment on the issue or else it will be closed in 7 days.

@github-actions github-actions bot added the Stale label Sep 17, 2024
Copy link
Contributor

Although we are closing this issue as stale, it's not gone forever. Issues can be reopened if there is renewed community interest. Just add a comment to notify the maintainers.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Sep 24, 2024
@SOVALINUX
Copy link

Hi
Linked a PR of a friend of mine that might be useful (or even can be merged). I did solve mine issue with simple visualization, but obviously other attributes might be visualized as well and expand/collapse logic might be added.
Hope it's helpful

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good_first_issue Good for newcomers Stale triage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants