-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Sebastian Sassi
committed
Aug 9, 2024
1 parent
acbbba7
commit 89cd7c7
Showing
10 changed files
with
64 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# DataHub in Datacoves | ||
|
||
These how to guides are dedicated to DataHub in Datacoves. See how to: | ||
|
||
- Manage your DataHub instance from the VSCode terminal |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
|
||
# How to use DataHub's CLI from your VSCode terminal | ||
|
||
Connecting to your DataHub instance via your VSCode terminal might be really helpful to perform some maintenance in your metadata, run ingestions, delete data, etc. | ||
|
||
## Configure DataHub CLI | ||
|
||
### DataHub host url | ||
|
||
First of all, you need to establish a secure connection to your DataHub server. | ||
|
||
Open a terminal on VSCode and run `DataHub init`: | ||
|
||
![DataHub init](./assets/DataHub-init.png) | ||
|
||
Type the DataHub host url, following this pattern: `http://{environment slug}-DataHub-DataHub-gms:8080`, the environment slug can be found next to your environment name in the header. | ||
|
||
![Environment slug](./assets/DataHub-env-slug.png) | ||
|
||
In this example it's `DEV123`, so the url becomes: http://dev123-DataHub-DataHub-gms:8080. | ||
|
||
### DataHub API token | ||
|
||
The next element you need to provide is a DataHub access token: | ||
|
||
![DataHub token](./assets/DataHub-token.png) | ||
|
||
1. On a new tab, navigate to Datacoves and then DataHub | ||
2. Go to `Settings` (gear icon on the top right corner) | ||
3. Click on the `Access Tokens` nav bar menu item | ||
|
||
![DataHub access tokens](./assets/DataHub-access-tokens.png) | ||
|
||
4. Click on `+ Generate new token` link, a popup window will show where you give the token a name, description and expiration date. | ||
|
||
![DataHub new token](./assets/DataHub-new-token.png) | ||
|
||
5. Click on create and right after you'll see the new JWT token generated. | ||
6. Copy the token clicking on this button and don't close the window as you won’t be able to see it again. | ||
|
||
![DataHub copy token](./assets/DataHub-copy-token.png) | ||
|
||
7. Go back to the tab were you have VSCode terminal waiting for your input and paste the copied token. Press Enter. | ||
8. You can validate that the connection was correctly configured by running `DataHub check server-config`: | ||
|
||
![DataHub check](./assets/DataHub-check.png) | ||
|
||
## Useful commands | ||
|
||
Once you successfully configured DataHub CLI, you can run `DataHub` on the terminal and explore the different options the tool has to offer. | ||
|
||
### Delete ingested data | ||
|
||
Sometimes you loaded some data for testing purposes and the DataHub UI does not provide a way to delete it, you can easily achieve that by running `DataHub delete`. | ||
|
||
The command accepts different filters, a straight-forward one is `--platform`, i.e. `DataHub delete --platform dbt`. | ||
|