Skip to content

Commit

Permalink
Merge branch 'master' into feature/gra-682-graphfilter-live-create-an…
Browse files Browse the repository at this point in the history
…d-edit
  • Loading branch information
edlouth authored Aug 21, 2023
2 parents e7050c9 + 5a6f1fd commit f4498e0
Show file tree
Hide file tree
Showing 5 changed files with 187 additions and 77 deletions.
161 changes: 86 additions & 75 deletions docs/components/Integrations.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -291,85 +291,95 @@ const MetabaseIcon = (props) => {
const height = props.height || defaultHeight;
const width = props.width || defaultWidth;
return (
<svg
width={width}
height={height}
viewBox="-34 0 324 324"
xmlns="http://www.w3.org/2000/svg"
preserveAspectRatio="xMidYMid"
>
<g fill="#509EE3">
<ellipse cx="19.3939396" cy="82.7565395" rx="19.3939394" ry="19.703938">

</ellipse>
<ellipse cx="19.3939396" cy="137.927566" rx="19.3939394" ry="19.703938">

</ellipse>
<ellipse opacity="0.2" cx="73.6969698" cy="82.7565395" rx="19.3939394" ry="19.703938">

</ellipse>
<ellipse cx="73.6969698" cy="138.463513" rx="19.3939394" ry="19.703938">

</ellipse>
<ellipse opacity="0.2" cx="128" cy="82.7565395" rx="19.3939394" ry="19.703938">

</ellipse>
<ellipse opacity="0.2" cx="128" cy="19.703938" rx="19.3939394" ry="19.703938">

</ellipse>
<ellipse opacity="0.2" cx="128" cy="138.463513" rx="19.3939394" ry="19.703938">

</ellipse>
<ellipse opacity="0.2" cx="182.30303" cy="82.7565395" rx="19.3939394" ry="19.703938">

</ellipse>
<ellipse cx="236.60606" cy="82.7565395" rx="19.3939394" ry="19.703938">

</ellipse>
<ellipse cx="182.30303" cy="138.463513" rx="19.3939394" ry="19.703938">

</ellipse>
<ellipse cx="236.60606" cy="138.463513" rx="19.3939394" ry="19.703938">

</ellipse>
<ellipse cx="19.3939396" cy="193.098592" rx="19.3939394" ry="19.703938">

</ellipse>
<ellipse opacity="0.2" cx="73.6969698" cy="193.634539" rx="19.3939394" ry="19.703938">

</ellipse>
<ellipse cx="128" cy="193.634539" rx="19.3939394" ry="19.703938">

</ellipse>
<ellipse opacity="0.2" cx="182.30303" cy="193.634539" rx="19.3939394" ry="19.703938">

</ellipse>
<ellipse cx="236.60606" cy="193.634539" rx="19.3939394" ry="19.703938">

</ellipse>
<ellipse cx="19.3939396" cy="248.269618" rx="19.3939394" ry="19.703938">

</ellipse>
<ellipse opacity="0.2" cx="73.6969698" cy="248.805565" rx="19.3939394" ry="19.703938">

</ellipse>
<ellipse opacity="0.2" cx="128" cy="248.805565" rx="19.3939394" ry="19.703938">

</ellipse>
<ellipse opacity="0.2" cx="128" cy="303.976591" rx="19.3939394" ry="19.703938">

</ellipse>
<ellipse opacity="0.2" cx="182.30303" cy="248.805565" rx="19.3939394" ry="19.703938">

</ellipse>
<ellipse cx="236.60606" cy="248.805565" rx="19.3939394" ry="19.703938">
<svg
width={width}
height={height}
viewBox="-34 0 324 324"
xmlns="http://www.w3.org/2000/svg"
preserveAspectRatio="xMidYMid"
>
<g fill="#509EE3">
<ellipse cx="19.3939396" cy="82.7565395" rx="19.3939394" ry="19.703938">
</ellipse>
<ellipse cx="19.3939396" cy="137.927566" rx="19.3939394" ry="19.703938">
</ellipse>
<ellipse opacity="0.2" cx="73.6969698" cy="82.7565395" rx="19.3939394" ry="19.703938">
</ellipse>
<ellipse cx="73.6969698" cy="138.463513" rx="19.3939394" ry="19.703938">
</ellipse>
<ellipse opacity="0.2" cx="128" cy="82.7565395" rx="19.3939394" ry="19.703938">
</ellipse>
<ellipse opacity="0.2" cx="128" cy="19.703938" rx="19.3939394" ry="19.703938">
</ellipse>
<ellipse opacity="0.2" cx="128" cy="138.463513" rx="19.3939394" ry="19.703938">
</ellipse>
<ellipse opacity="0.2" cx="182.30303" cy="82.7565395" rx="19.3939394" ry="19.703938">
</ellipse>
<ellipse cx="236.60606" cy="82.7565395" rx="19.3939394" ry="19.703938">
</ellipse>
<ellipse cx="182.30303" cy="138.463513" rx="19.3939394" ry="19.703938">
</ellipse>
<ellipse cx="236.60606" cy="138.463513" rx="19.3939394" ry="19.703938">
</ellipse>
<ellipse cx="19.3939396" cy="193.098592" rx="19.3939394" ry="19.703938">
</ellipse>
<ellipse opacity="0.2" cx="73.6969698" cy="193.634539" rx="19.3939394" ry="19.703938">
</ellipse>
<ellipse cx="128" cy="193.634539" rx="19.3939394" ry="19.703938">
</ellipse>
<ellipse opacity="0.2" cx="182.30303" cy="193.634539" rx="19.3939394" ry="19.703938">
</ellipse>
<ellipse cx="236.60606" cy="193.634539" rx="19.3939394" ry="19.703938">
</ellipse>
<ellipse cx="19.3939396" cy="248.269618" rx="19.3939394" ry="19.703938">
</ellipse>
<ellipse opacity="0.2" cx="73.6969698" cy="248.805565" rx="19.3939394" ry="19.703938">
</ellipse>
<ellipse opacity="0.2" cx="128" cy="248.805565" rx="19.3939394" ry="19.703938">
</ellipse>
<ellipse opacity="0.2" cx="128" cy="303.976591" rx="19.3939394" ry="19.703938">
</ellipse>
<ellipse opacity="0.2" cx="182.30303" cy="248.805565" rx="19.3939394" ry="19.703938">
</ellipse>
<ellipse cx="236.60606" cy="248.805565" rx="19.3939394" ry="19.703938">
</ellipse>
</g>
</svg>
);
};

</ellipse>
</g>
</svg>
const LookerIcon = (props) => {
const height = props.height || defaultHeight;
const width = props.width || defaultWidth;
return (
<svg
height={height}
width={width}
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 714.71 189.8"
>
<defs>
<style>{`.cls-1{fill:#34a853;}.cls-2{fill:#fbbc04;}.cls-3{fill:#ea4335;}.cls-4{fill:#4285f4;}.cls-5{fill:#5f6368;}`}</style>
</defs>
<g id="Layer_2" data-name="Layer 2">
<g id="specs">
<path class="cls-1" d="M58.49,0A16.6,16.6,0,0,0,44.72,25.86l7.09-7.08a6.88,6.88,0,0,1-.35-2.19,7,7,0,1,1,7,7,6.87,6.87,0,0,1-2.18-.35l-7.08,7.08A16.59,16.59,0,1,0,58.49,0Z"/>
<path class="cls-2" d="M51.89,48.35a25.79,25.79,0,0,0-5.17-15.54L37.52,42A13.19,13.19,0,0,1,35,57.92l5,12.22A25.93,25.93,0,0,0,51.89,48.35Z"/>
<path class="cls-3" d="M26.18,61.54h-.24a13.2,13.2,0,1,1,7.25-24.23l9.11-9.11A25.94,25.94,0,1,0,25.94,74.29a26.53,26.53,0,0,0,5.24-.52Z"/>
<path class="cls-4" d="M58.84,72.11a58.87,58.87,0,0,0-17,2.49l7.29,17.81a40.19,40.19,0,0,1,9.7-1.18,39.71,39.71,0,1,1-28.09,11.63,40.12,40.12,0,0,1,9.47-7L33,78.1a58.87,58.87,0,1,0,25.89-6Z"/>
<path class="cls-5" d="M174.72,24.34h16.55V149.27H252.2V165H174.72Z"/>
<path class="cls-5" d="M276.19,158.23a47.42,47.42,0,0,1-17.66-18.51,53.43,53.43,0,0,1-6.33-25.88A53.43,53.43,0,0,1,258.53,88a47.42,47.42,0,0,1,17.66-18.51,51.17,51.17,0,0,1,51,0A47.56,47.56,0,0,1,344.86,88a53.54,53.54,0,0,1,6.33,25.88,53.54,53.54,0,0,1-6.33,25.88,47.56,47.56,0,0,1-17.66,18.51,51.17,51.17,0,0,1-51,0Zm42-12.18A32.79,32.79,0,0,0,330.5,133.3a39.31,39.31,0,0,0,4.63-19.46,39.34,39.34,0,0,0-4.63-19.46,32.79,32.79,0,0,0-12.28-12.75,32.37,32.37,0,0,0-16.53-4.44,32.84,32.84,0,0,0-29,17.19,39.44,39.44,0,0,0-4.62,19.46,39.42,39.42,0,0,0,4.62,19.46,33,33,0,0,0,45.53,12.75Z"/>
<path class="cls-5" d="M383.77,158.23a47.56,47.56,0,0,1-17.66-18.51,53.54,53.54,0,0,1-6.33-25.88A53.54,53.54,0,0,1,366.11,88a47.56,47.56,0,0,1,17.66-18.51,51.17,51.17,0,0,1,51,0A47.49,47.49,0,0,1,452.44,88a53.54,53.54,0,0,1,6.33,25.88,53.54,53.54,0,0,1-6.33,25.88,47.49,47.49,0,0,1-17.66,18.51,51.17,51.17,0,0,1-51,0Zm42-12.18a32.86,32.86,0,0,0,12.28-12.75,39.42,39.42,0,0,0,4.63-19.46,39.45,39.45,0,0,0-4.63-19.46,32.86,32.86,0,0,0-12.28-12.75,32.37,32.37,0,0,0-16.53-4.44,32.92,32.92,0,0,0-16.63,4.44,32.59,32.59,0,0,0-12.37,12.75,39.34,39.34,0,0,0-4.63,19.46,39.31,39.31,0,0,0,4.63,19.46,32.59,32.59,0,0,0,12.37,12.75,32.92,32.92,0,0,0,16.63,4.44A32.37,32.37,0,0,0,425.81,146.05Z"/>
<path class="cls-5" d="M470.66,24.34H487.2v88.92L537,62.67h21v.78l-42,42.41,40.1,58.4V165H536.26l-31.93-47.7L487.2,134.47V165H470.66Z"/>
<path class="cls-5" d="M577.45,158.42a45.88,45.88,0,0,1-17.1-18.23A55.12,55.12,0,0,1,554.22,114,57.48,57.48,0,0,1,560,88.43a46.28,46.28,0,0,1,16.43-18.8,43.74,43.74,0,0,1,24.47-7q14.16,0,24.56,6.33a42.1,42.1,0,0,1,16,17.48A56.33,56.33,0,0,1,647,112a33.68,33.68,0,0,1-.38,4.91H570.27q.57,11,5.29,18.52a30.89,30.89,0,0,0,12,11.33,32.56,32.56,0,0,0,15.21,3.78q18.88,0,28.52-17.38l13.6,6.61a47.9,47.9,0,0,1-16.81,18.42Q617.31,165,602.2,165A46.92,46.92,0,0,1,577.45,158.42ZM630,103.64a31.32,31.32,0,0,0-3.4-12.09,26.08,26.08,0,0,0-9.45-10.2q-6.42-4.16-16.24-4.16a27.52,27.52,0,0,0-19.27,7.27q-7.93,7.28-10.39,19.18Z"/>
<path class="cls-5" d="M657.68,62.69h15.76v19h.78q2.92-8.18,11.29-13.63A31.66,31.66,0,0,1,703,62.64a28.83,28.83,0,0,1,11.68,2.15V82.5a31,31,0,0,0-14-3.12,23.07,23.07,0,0,0-13.24,4.1,29.53,29.53,0,0,0-9.64,11,31.92,31.92,0,0,0-3.6,14.93V165H657.68Z"/>
</g>
</g>
</svg>
);
};


export {
BigQueryLogoIcon,
DbtLogoIcon,
Expand All @@ -380,4 +390,5 @@ export {
PostgresLogoIcon,
YamlLogoIcon,
MetabaseIcon,
LookerIcon,
};
1 change: 1 addition & 0 deletions docs/pages/integrations/_meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"flat-file": "Flat File",
"yaml": "YAML",
"metabase": "Metabase",
"looker": "Looker",
"other-sources": "Other Sources",
"support-status": "Support Status"
}
97 changes: 97 additions & 0 deletions docs/pages/integrations/looker.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
---
title: Looker
description: Grai integration for Looker to extract Dashboards and LookML output into your data observability stack.
---

import { Callout } from "nextra-theme-docs";
import { LookerIcon } from "../../components/Integrations";
import Image from "next/image";
import InlineLogo from "../../components/InlineLogo";

<InlineLogo logo={<LookerIcon width="200"/>} title="(alpha)" />

The Looker integration synchronizes your Dashboards and LookML from Looker into Grai
In this way you can quickly identify which data is being used by your BI tools, which data is not, and more.

## Web App

<Image
src="/images/docs/core/integrations/looker.png"
height={600}
width={1200}
alt="Metabase Integration Homescreen"
/>

### Fields

| Field | Value | Example |
| --------------- | ------------------------------------------------------------------ | -------- |
| Source | Name of the source for this connection | Looker |
| Name | Name for connection | Looker |
| Namespace | Namespace for the connection, see [namespace](/concepts/namespace) | default |
| base_url | Base url of your looker instance | |
| client_id | Client ID for the Looker API | |
| client_secret | Client Secret for the Looker API | |
| namespaces | An Optional JSON string (see below) | |

You can find more information about generating a client id and secret [here](https://cloud.google.com/looker/docs/admin-panel-users-users#api_keys).

#### Namespaces

<Callout type="info" emoji="ℹ️">
If the namespaces field is not provided, Grai will create a default namespace for each Explore on your behalf.
You can always update the namespaces field later to customize your namespace organization.
</Callout>

In order to automatically tie your data lineage together, Grai needs to know which Grai namespace corresponds to each lookML model.
The namespaces field should be a JSON string with the Grai namespace for each dashboard id e.g.

```json
{
"<model>": "<namespace>"
}
```


## Python Library

### Installation

Install the Metabase Grai integration with pip

```shell copy
pip install grai-source-looker
```

This installs the Grai Looker integration, which is now ready to run in python

### Connecting & Syncing

The integration comes equipped with the client library already but we will need a python terminal or Jupyter Notebook to execute a few commands to establish a connection and begin querying the server.

Spin up your favorite python terminal then:

```python copy
import os
from grai_source_looker.base import LookerIntegration
```

For now we will use the default user credentials though you are free to create a new user / api keys from the server admin interface at http://localhost:8000/admin.

```python copy
client = ClientV1("localhost", "8000", username="null@grai.io", password="super_secret")
```

Using example variables, in order to update the server with your metadata, simply run:

```python copy
from grai_source_looker.base import LookerIntegration

integration = LookerIntegration(base_url=<your_url>,
client_id=<your_client_id>,
client_secret=<your_client_secret>,
namespace=<your_namespace>,
)
nodes, edges = integration.get_nodes_and_edges()
client.post([nodes, edges])
```
5 changes: 3 additions & 2 deletions docs/pages/integrations/support-status.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@ description: Grai integration support status
| Postgres |||
| MySQL |||
| SQL Server |||
| Metabase (alpha) |||
| Metabase |||
| Looker (alpha) |||
| Mariadb |||
| MongoDB |||
| csv || |
| csv || |
| parquet |||
| feather |||
| yaml | ✅ (client) ||
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit f4498e0

Please sign in to comment.