Skip to content

Commit

Permalink
Merge branch 'current' into update-us-mt-mc-ips
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewshaver authored Dec 4, 2023
2 parents aa13ed9 + de4ac89 commit 4f5f129
Show file tree
Hide file tree
Showing 10 changed files with 120 additions and 44 deletions.
2 changes: 2 additions & 0 deletions website/docs/docs/use-dbt-semantic-layer/gsheets.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ The dbt Semantic Layer offers a seamless integration with Google Sheets through
- You have a Google account with access to Google Sheets.
- You can install Google add-ons.
- You have a dbt Cloud Environment ID and a [service token](/docs/dbt-cloud-apis/service-tokens) to authenticate with from a dbt Cloud account.
- You must have a dbt Cloud Team or Enterprise [account](https://www.getdbt.com/pricing). Suitable for both Multi-tenant and Single-tenant deployment.
- Single-tenant accounts should contact their account representative for necessary setup and enablement.

## Installing the add-on

Expand Down
2 changes: 1 addition & 1 deletion website/docs/docs/use-dbt-semantic-layer/quickstart-sl.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ MetricFlow, a powerful component of the dbt Semantic Layer, simplifies the creat
Use this guide to fully experience the power of the universal dbt Semantic Layer. Here are the following steps you'll take:

- [Create a semantic model](#create-a-semantic-model) in dbt Cloud using MetricFlow
- [Define metrics](#define-metrics) in dbt Cloud using MetricFlow
- [Define metrics](#define-metrics) in dbt using MetricFlow
- [Test and query metrics](#test-and-query-metrics) with MetricFlow
- [Run a production job](#run-a-production-job) in dbt Cloud
- [Set up dbt Semantic Layer](#setup) in dbt Cloud
Expand Down
3 changes: 2 additions & 1 deletion website/docs/docs/use-dbt-semantic-layer/tableau.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ This integration provides a live connection to the dbt Semantic Layer through Ta
- Note that Tableau Online does not currently support custom connectors natively. If you use Tableau Online, you will only be able to access the connector in Tableau Desktop.
- Log in to Tableau Desktop (with Online or Server credentials) or a license to Tableau Server
- You need your dbt Cloud host, [Environment ID](/docs/use-dbt-semantic-layer/setup-sl#set-up-dbt-semantic-layer) and [service token](/docs/dbt-cloud-apis/service-tokens) to log in. This account should be set up with the dbt Semantic Layer.
- You must have a dbt Cloud Team or Enterprise [account](https://www.getdbt.com/pricing) and multi-tenant [deployment](/docs/cloud/about-cloud/regions-ip-addresses). (Single-Tenant coming soon)
- You must have a dbt Cloud Team or Enterprise [account](https://www.getdbt.com/pricing). Suitable for both Multi-tenant and Single-tenant deployment.
- Single-tenant accounts should contact their account representative for necessary setup and enablement.


## Installing the Connector
Expand Down
3 changes: 2 additions & 1 deletion website/snippets/_new-sl-setup.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
You can set up the dbt Semantic Layer in dbt Cloud at the environment and project level. Before you begin:

- You must have a dbt Cloud Team or Enterprise [multi-tenant](/docs/cloud/about-cloud/regions-ip-addresses) deployment. Single-tenant coming soon.
- You must have a dbt Cloud Team or Enterprise account. Suitable for both Multi-tenant and Single-tenant deployment.
- Single-tenant accounts should contact their account representative for necessary setup and enablement.
- You must be part of the Owner group, and have the correct [license](/docs/cloud/manage-access/seats-and-users) and [permissions](/docs/cloud/manage-access/self-service-permissions) to configure the Semantic Layer:
* Enterprise plan — Developer license with Account Admin permissions. Or Owner with a Developer license, assigned Project Creator, Database Admin, or Admin permissions.
* Team plan — Owner with a Developer license.
Expand Down
6 changes: 2 additions & 4 deletions website/snippets/_sl-connect-and-query-api.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
You can query your metrics in a JDBC-enabled tool or use existing first-class integrations with the dbt Semantic Layer.

You must have a dbt Cloud Team or Enterprise [multi-tenant](/docs/cloud/about-cloud/regions-ip-addresses) deployment. Single-tenant coming soon.

- You must have a dbt Cloud Team or Enterprise account. Suitable for both Multi-tenant and Single-tenant deployment.
- Single-tenant accounts should contact their account representative for necessary setup and enablement.
- To learn how to use the JDBC or GraphQL API and what tools you can query it with, refer to [dbt Semantic Layer APIs](/docs/dbt-cloud-apis/sl-api-overview).

* To authenticate, you need to [generate a service token](/docs/dbt-cloud-apis/service-tokens) with Semantic Layer Only and Metadata Only permissions.
* Refer to the [SQL query syntax](/docs/dbt-cloud-apis/sl-jdbc#querying-the-api-for-metric-metadata) to query metrics using the API.

- To learn more about the sophisticated integrations that connect to the dbt Semantic Layer, refer to [Available integrations](/docs/use-dbt-semantic-layer/avail-sl-integrations) for more info.
2 changes: 1 addition & 1 deletion website/snippets/_sl-plan-info.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<span>To define and query metrics with the {props.product}, you must be on a <a href="https://www.getdbt.com/pricing/">{props.plan}</a> multi-tenant plan <a href="https://docs.getdbt.com/docs/cloud/about-cloud/regions-ip-addresses" target="_self"></a>.<br /><br /></span><br />
<span>To define and query metrics with the {props.product}, you must be on a <a href="https://www.getdbt.com/pricing/">{props.plan}</a> account. <a href="https://docs.getdbt.com/docs/cloud/about-cloud/regions-ip-addresses" target="_self"></a> Suitable for both Multi-tenant and Single-tenant accounts. Note: Single-tenant accounts should contact their account representative for necessary setup and enablement.</span><br /><br />

9 changes: 5 additions & 4 deletions website/snippets/_v2-sl-prerequisites.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@

<VersionBlock firstVersion="1.6">

- Have a dbt Cloud Team or Enterprise [multi-tenant](/docs/cloud/about-cloud/regions-ip-addresses) deployment. Single-tenant coming soon.
- Have both your production and development environments running dbt version 1.6 or higher. Refer to [upgrade in dbt Cloud](/docs/dbt-versions/upgrade-core-in-cloud) for more info.
- Have a dbt Cloud Team or Enterprise account. Suitable for both Multi-tenant and Single-tenant deploymnet.
- Note: Single-tenant accounts should contact their account representative for necessary setup and enablement.
- Have both your production and development environments running [dbt version 1.6 or higher](/docs/dbt-versions/upgrade-core-in-cloud).
- Use Snowflake, BigQuery, Databricks, or Redshift.
- Create a successful run in the environment where you configure the Semantic Layer.
- **Note:** Semantic Layer currently supports the Deployment environment for querying. (_development querying experience coming soon_)
- Set up the [Semantic Layer API](/docs/dbt-cloud-apis/sl-api-overview) in the integrated tool to import metric definitions.
- To access the API and query metrics in downstream tools, you must have a dbt Cloud [Team or Enterprise](https://www.getdbt.com/pricing/) account. dbt Core or Developer accounts can define metrics but won't be able to dynamically query them.<br />
- dbt Core or Developer accounts can define metrics but won't be able to dynamically query them.<br />
- Understand [MetricFlow's](/docs/build/about-metricflow) key concepts, which powers the latest dbt Semantic Layer.
- Note that SSH tunneling for [Postgres and Redshift](/docs/cloud/connect-data-platform/connect-redshift-postgresql-alloydb) connections, [PrivateLink](/docs/cloud/secure/about-privatelink), and [Single sign-on (SSO)](/docs/cloud/manage-access/sso-overview) isn't supported yet.
- Note that SSH tunneling for [Postgres and Redshift](/docs/cloud/connect-data-platform/connect-redshift-postgresql-alloydb) connections, [PrivateLink](/docs/cloud/secure/about-privatelink), and [Single sign-on (SSO)](/docs/cloud/manage-access/sso-overview) doesn't supported the dbt Semantic Layer yet.

</VersionBlock>

Expand Down
116 changes: 88 additions & 28 deletions website/src/components/communitySpotlightCard/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react'
import Link from '@docusaurus/Link';
import Head from "@docusaurus/Head";
import styles from './styles.module.css';
import imageCacheWrapper from '../../../functions/image-cache-wrapper';

Expand Down Expand Up @@ -47,44 +48,72 @@ function CommunitySpotlightCard({ frontMatter, isSpotlightMember = false }) {
jobTitle,
companyName,
organization,
socialLinks
socialLinks,
communityAward
} = frontMatter

return (
<SpotlightWrapper isSpotlightMember={isSpotlightMember} frontMatter={frontMatter}>
// Get meta description text
const metaDescription = stripHtml(description)

return (
<SpotlightWrapper
isSpotlightMember={isSpotlightMember}
frontMatter={frontMatter}
>
{isSpotlightMember && metaDescription ? (
<Head>
<meta
name="description"
content={metaDescription}
/>
<meta
property="og:description"
content={metaDescription}
/>
</Head>
) : null}
{communityAward ? (
<div className={styles.awardBadge}>
<span>Community Award Recipient</span>
</div>
) : null}
{image && (
<div className={styles.spotlightMemberImgContainer}>
{id && isSpotlightMember ? (
<img
src={imageCacheWrapper(image)}
alt={title}
/>
<img src={imageCacheWrapper(image)} alt={title} />
) : (
<Link to={`/community/spotlight/${id}`} className={styles.spotlightMemberHeader}>
<img
src={imageCacheWrapper(image)}
alt={title}
/>
<Link
to={`/community/spotlight/${id}`}
className={styles.spotlightMemberHeader}
>
<img src={imageCacheWrapper(image)} alt={title} />
</Link>
)}
</div>
)}
<div className={styles.spotlightMemberContent}>
{!isSpotlightMember && id ? (
<h2>
<Link to={`/community/spotlight/${id}`} className={`${styles.spotlightMemberHeader} ${styles.spotlightMemberHeaderSmall}`}>{title}</Link>
<Link
to={`/community/spotlight/${id}`}
className={`${styles.spotlightMemberHeader} ${styles.spotlightMemberHeaderSmall}`}
>
{title}
</Link>
</h2>
) : (
) : (
<h1 className={styles.spotlightMemberHeader}>{title}</h1>
)}
{pronouns && <div className={styles.spotlightMemberPronouns}>{pronouns}</div>}

{pronouns && (
<div className={styles.spotlightMemberPronouns}>{pronouns}</div>
)}

{isSpotlightMember && (
<div className={styles.spotlightMemberHeaderContain}>
{(jobTitle || companyName) && (
<div className={styles.spotlightMemberInfo}>
{jobTitle && jobTitle}
{jobTitle && companyName && ', '}
{jobTitle && companyName && ", "}
{companyName && companyName}
</div>
)}
Expand All @@ -101,46 +130,60 @@ function CommunitySpotlightCard({ frontMatter, isSpotlightMember = false }) {
</div>
)}
{description && !isSpotlightMember && (
<p className={styles.spotlightMemberDescription} dangerouslySetInnerHTML={{__html: truncateText(description)}} />
<p
className={styles.spotlightMemberDescription}
dangerouslySetInnerHTML={{ __html: truncateText(description) }}
/>
)}
{socialLinks && isSpotlightMember && socialLinks?.length > 0 && (
<div className={styles.spotlightMemberSocial}>
{socialLinks.map((item, i) => (
<>
{item?.name && item?.link && (
<>
{i !== 0 && ' | '}
<a href={item.link} title={item.name} target='_blank' rel='noreferrer'>{item.name}</a>
{i !== 0 && " | "}
<a
href={item.link}
title={item.name}
target="_blank"
rel="noreferrer"
>
{item.name}
</a>
</>
)}
</>
))}
</div>
)}
{id && !isSpotlightMember && (
<Link
to={`/community/spotlight/${id}`}
<Link
to={`/community/spotlight/${id}`}
className={styles.spotlightReadMore}
>Read More</Link>
>
Read More
</Link>
)}
</div>
{description && isSpotlightMember && (
<div className={styles.spotlightMemberDescriptionFull}>
<h2>About</h2>
<p className={styles.spotlightMemberDescription} dangerouslySetInnerHTML={{__html: description}} />

<p
className={styles.spotlightMemberDescription}
dangerouslySetInnerHTML={{ __html: description }}
/>
</div>
)}
</SpotlightWrapper>
)
);
}

// Truncate text
// Truncate description text for community member cards
function truncateText(str) {
// Max length of string
let maxLength = 300

// Check if anchor link starts within first 300 characters
// Check if anchor link starts within maxLength
let hasLinks = false
if(str.substring(0, maxLength - 3).match(/(?:<a)/g)) {
hasLinks = true
Expand All @@ -162,4 +205,21 @@ function truncateText(str) {
: str
}

// Strip HTML for meta description
function stripHtml(desc) {
const maxLength = 130

if(!desc) return null

// Remove HTML elements from string
const strippedHtml = desc?.replace(/(<([^>]+)>)/gi, "")

// Strip new lines and return 130 character substring for description
const updatedDesc = strippedHtml
?.substring(0, maxLength)
?.replace(/(\r\n|\r|\n)/g, "");

return desc?.length > maxLength ? `${updatedDesc}...` : updatedDesc
}

export default CommunitySpotlightCard
20 changes: 16 additions & 4 deletions website/src/components/communitySpotlightCard/styles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,19 @@ header.spotlightMemberCard {
div.spotlightMemberCard {
margin-bottom: 2.5rem;
}
.spotlightMemberCard .awardBadge {
flex: 0 0 100%;
margin-bottom: .5rem;
}
.spotlightMemberCard .awardBadge span {
max-width: fit-content;
color: #fff;
background: var(--ifm-color-primary);
display: block;
border-radius: 1rem;
padding: 5px 10px;
font-size: .7rem;
}
.spotlightMemberCard .spotlightMemberImgContainer {
flex: 0 0 100%;
}
Expand Down Expand Up @@ -81,6 +94,9 @@ div.spotlightMemberCard {
margin-bottom: 0;
padding-left: 0;
}
.spotlightMemberCard .awardBadge span {
font-size: .8rem;
}
.spotlightMemberCard .spotlightMemberImgContainer {
flex: 0 0 346px;
margin-right: 2rem;
Expand All @@ -100,7 +116,3 @@ div.spotlightMemberCard {
line-height: 2rem;
}
}




1 change: 1 addition & 0 deletions website/src/components/communitySpotlightList/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ function CommunitySpotlightList({ spotlightData }) {
<Head>
<title>{metaTitle}</title>
<meta property="og:title" content={metaTitle} />
<meta property="description" content={communityDescription} />
<meta property="og:description" content={communityDescription} />
</Head>
<Hero
Expand Down

0 comments on commit 4f5f129

Please sign in to comment.