Skip to content

Commit 1206361

Browse files
authored
Merge pull request #144 from Pibbers/main
FIX: [DataHub]: Updated SQL for permissions and query logging
2 parents 0ed1ed7 + bed38c1 commit 1206361

File tree

3 files changed

+16
-10
lines changed

3 files changed

+16
-10
lines changed

quickstarts/manage-data/configure-a-teradata-vantage-connection-in-datahub.md

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
sidebar_position: 18
33
author: Paul Ibberson
44
email: paul.ibberson2@teradata.com
5-
page_last_update: Deccember 19th, 2023
5+
page_last_update: October 3rd 2024
66
description: Configure a Teradata Vantage connection in DataHub.
77
keywords: [data warehouses, compute storage separation, teradata, vantage, cloud data platform, object storage, business intelligence, enterprise analytics, datahub, data catalog, data lineage]
88
---
@@ -34,25 +34,31 @@ pip install 'acryl-datahub[teradata]'
3434
``` sql
3535
CREATE USER datahub FROM <database> AS PASSWORD = <password> PERM = 20000000;
3636

37-
GRANT SELECT ON dbc.columns TO datahub;
38-
GRANT SELECT ON dbc.databases TO datahub;
39-
GRANT SELECT ON dbc.tables TO datahub;
40-
GRANT SELECT ON DBC.All_RI_ChildrenV TO datahub;
37+
GRANT SELECT ON DBC.DatabasesV TO datahub;
38+
GRANT SELECT ON DBC.TablesV TO datahub;
4139
GRANT SELECT ON DBC.ColumnsV TO datahub;
4240
GRANT SELECT ON DBC.IndicesV TO datahub;
4341
GRANT SELECT ON dbc.TableTextV TO datahub;
44-
GRANT SELECT ON dbc.TablesV TO datahub;
45-
GRANT SELECT ON dbc.dbqlogtbl TO datahub; -- if lineage or usage extraction is enabled
42+
GRANT SELECT ON DBC.All_RI_ChildrenV TO datahub;
43+
44+
-- if lineage or usage extraction is enabled
45+
GRANT SELECT ON dbc.dbqlogtbl TO datahub;
46+
GRANT SELECT ON dbc.QryLogV TO datahub;
47+
GRANT SELECT ON dbc.QryLogSqlV TO datahub;
4648
```
49+
4750
* If you want to run profiling, you need to grant select permission on all the tables you want to profile.
4851

4952
* If you want to extract lineage or usage metadata, query logging must be enabled and it is set to size which will fit for your queries (the default query text size Teradata captures is max 200 chars) An example how you can set it for all users:
5053

5154
``` sql
5255
-- set up query logging on all
53-
54-
REPLACE QUERY LOGGING LIMIT SQLTEXT=2000 ON ALL;
56+
REPLACE QUERY LOGGING WITH SQL LIMIT SQLTEXT=2000 ON ALL;
5557
```
58+
Learn more about query logging in this document:
59+
[https://docs.teradata.com/r/Teradata-VantageCloud-Lake/Database-Reference/Database-Administration/Tracking-Query-Behavior-with-Database-Query-Logging-Operational-DBAs](https://docs.teradata.com/r/Teradata-VantageCloud-Lake/Database-Reference/Database-Administration/Tracking-Query-Behavior-with-Database-Query-Logging-Operational-DBAs)
60+
61+
5662

5763
## Add a Teradata connection to DataHub
5864
With DataHub running, open the DataHub GUI and login. In this example this is running at localhost:9002
@@ -110,7 +116,7 @@ Clicking on "Succeeded" after a sucessful execution will bring up a dialogue sim
110116
* Schema of an entity showing column/field names, data types and usage if it has been captured
111117
![Schema display](../other-integrations/images/configure-a-teradata-connection-in-datahub/schema.png)
112118
* Lineage providing a visual representation of how data is linked between tables and views
113-
![Lineage picture](../other-integrations/images/configure-a-teradata-connection-in-datahub/lineage-weather.png)
119+
![Lineage picture](../other-integrations/images/configure-a-teradata-connection-in-datahub/lineage-example.png)
114120
115121
## Summary
116122
2.06 KB
Loading
422 KB
Loading

0 commit comments

Comments
 (0)