-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathbda.sql
95 lines (52 loc) · 1.42 KB
/
bda.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
select *
from bicubes.BDA_LTE_CPS_RAW2
select *
from bicubes.BDA_GN_CPS_RAW2
select *
from bicubes.BDA_LTE_UPS_RAW2
select application, count(*)
from bicubes.BDA_GN_UPS_RAW2
group by application
order by 2 desc
select *
from bicubes.BDA_GN_UPS_RAW2
select count(*)
from bicubes.BDA_GN_UPS_RAW2
where
time > date'2015-07-19'
select * from DBA_HIVE_DATABASES
select * from DBA_HIVE_TABLES
select * from DBA_HIVE_COLUMNS
select *
from dba_external_tables
where
type_name like '%HIVE%'
select 'grant select on ' || owner||'.'||table_name||' to BDA_ROLE;'
from dba_external_tables
where
type_name like '%HIVE%'
----------------------- DRAFT ----------------------
select *
from dba_tables
select *
from dba_tab_privs
where grantee = 'NKARAG'
select *
from dba_role_privs
where grantee = 'NKARAG'
select *
from dba_role_privs
where grantee = 'mcif'
select *
from dba_users
username = 'NKARAG'
select *
from dba_objects
where object_name = upper('bda_gn_cps_raw')
select *
from dba_profiles
where profile = 'SYSTEM_PROFILE_GROUP'
select * from hive_uri$;
select *
from dba_tab_privs
where table_name = 'BDA_GN_UPS_RAW2'