added migration scripts for druid and postgres docs update (#10920)

* added migration scripts for druid and postgres docs update

* postgres docs update
This commit is contained in:
NiharDoshi99 2023-04-04 22:45:19 +05:30 committed by GitHub
parent 9b4e9132ae
commit 325480fb2e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 48 additions and 4 deletions

View File

@ -134,3 +134,11 @@ CREATE TABLE IF NOT EXISTS dashboard_data_model_entity (
PRIMARY KEY (id), PRIMARY KEY (id),
UNIQUE (fullyQualifiedName) UNIQUE (fullyQualifiedName)
); );
UPDATE dbservice_entity
SET json = JSON_INSERT(
JSON_REMOVE(json, '$.connection.config.database'),
'$.connection.config.databaseName', JSON_EXTRACT(json, '$.connection.config.database')
)
where serviceType = 'Druid'
and JSON_EXTRACT(json, '$.connection.config.database') is not null;

View File

@ -138,3 +138,7 @@ CREATE TABLE IF NOT EXISTS dashboard_data_model_entity (
PRIMARY KEY (id), PRIMARY KEY (id),
UNIQUE (fullyQualifiedName) UNIQUE (fullyQualifiedName)
); );
UPDATE dbservice_entity
SET json = jsonb_set(json::jsonb #- '{connection,config,database}', '{connection,config,databaseName}', json#> '{connection,config,database}', true)
WHERE servicetype = 'Druid' and json #>'{connection,config,database}' is not null;

View File

@ -59,10 +59,18 @@ Then, when extracting usage and lineage data, the query log duration will have n
<Note> <Note>
- For usage and lineage grant your user `pg_read_all_stats` permission. #### For usage and lineage grant your user required permission.
- For Postgres version 14 and above
```sql ```sql
GRANT pg_read_all_stats TO your_user; GRANT pg_read_all_stats TO your_user;
```
- For any other Postgres version
```sql
GRANT USAGE ON SCHEMA public TO my_user;
``` ```
</Note> </Note>

View File

@ -59,10 +59,18 @@ Then, when extracting usage and lineage data, the query log duration will have n
<Note> <Note>
- For usage and lineage grant your user `pg_read_all_stats` permission. #### For usage and lineage grant your user required permission.
- For Postgres version 14 and above
```sql ```sql
GRANT pg_read_all_stats TO your_user; GRANT pg_read_all_stats TO your_user;
```
- For any other Postgres version
```sql
GRANT USAGE ON SCHEMA public TO my_user;
``` ```
</Note> </Note>

View File

@ -80,10 +80,18 @@ Then, when extracting usage and lineage data, the query log duration will have n
<Note> <Note>
- For usage and lineage grant your user `pg_read_all_stats` permission. #### For usage and lineage grant your user required permission.
- For Postgres version 14 and above
```sql ```sql
GRANT pg_read_all_stats TO your_user; GRANT pg_read_all_stats TO your_user;
```
- For any other Postgres version
```sql
GRANT USAGE ON SCHEMA public TO my_user;
``` ```
</Note> </Note>

View File

@ -22,10 +22,18 @@ Then, when extracting usage and lineage data, the query log duration will have n
<Note> <Note>
- For usage and lineage grant your user `pg_read_all_stats` permission. #### For usage and lineage grant your user required permission.
- For Postgres version 14 and above
```sql ```sql
GRANT pg_read_all_stats TO your_user; GRANT pg_read_all_stats TO your_user;
```
- For any other Postgres version
```sql
GRANT USAGE ON SCHEMA public TO my_user;
``` ```
</Note> </Note>