datahub-agent-context 1.3.1.8__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. datahub_agent_context/__init__.py +25 -0
  2. datahub_agent_context/_version.py +16 -0
  3. datahub_agent_context/context.py +97 -0
  4. datahub_agent_context/langchain_tools/__init__.py +8 -0
  5. datahub_agent_context/langchain_tools/builder.py +127 -0
  6. datahub_agent_context/mcp_tools/__init__.py +46 -0
  7. datahub_agent_context/mcp_tools/_token_estimator.py +71 -0
  8. datahub_agent_context/mcp_tools/base.py +325 -0
  9. datahub_agent_context/mcp_tools/descriptions.py +299 -0
  10. datahub_agent_context/mcp_tools/documents.py +473 -0
  11. datahub_agent_context/mcp_tools/domains.py +246 -0
  12. datahub_agent_context/mcp_tools/entities.py +349 -0
  13. datahub_agent_context/mcp_tools/get_me.py +99 -0
  14. datahub_agent_context/mcp_tools/gql/__init__.py +13 -0
  15. datahub_agent_context/mcp_tools/gql/document_search.gql +114 -0
  16. datahub_agent_context/mcp_tools/gql/document_semantic_search.gql +111 -0
  17. datahub_agent_context/mcp_tools/gql/entity_details.gql +1682 -0
  18. datahub_agent_context/mcp_tools/gql/queries.gql +51 -0
  19. datahub_agent_context/mcp_tools/gql/query_entity.gql +37 -0
  20. datahub_agent_context/mcp_tools/gql/read_documents.gql +16 -0
  21. datahub_agent_context/mcp_tools/gql/search.gql +242 -0
  22. datahub_agent_context/mcp_tools/helpers.py +448 -0
  23. datahub_agent_context/mcp_tools/lineage.py +698 -0
  24. datahub_agent_context/mcp_tools/owners.py +318 -0
  25. datahub_agent_context/mcp_tools/queries.py +191 -0
  26. datahub_agent_context/mcp_tools/search.py +239 -0
  27. datahub_agent_context/mcp_tools/structured_properties.py +447 -0
  28. datahub_agent_context/mcp_tools/tags.py +296 -0
  29. datahub_agent_context/mcp_tools/terms.py +295 -0
  30. datahub_agent_context/py.typed +2 -0
  31. datahub_agent_context-1.3.1.8.dist-info/METADATA +233 -0
  32. datahub_agent_context-1.3.1.8.dist-info/RECORD +34 -0
  33. datahub_agent_context-1.3.1.8.dist-info/WHEEL +5 -0
  34. datahub_agent_context-1.3.1.8.dist-info/top_level.txt +1 -0
@@ -0,0 +1,51 @@
1
+ fragment platformFields on DataPlatform {
2
+ urn
3
+ name
4
+ __typename
5
+ }
6
+
7
+ fragment query on QueryEntity {
8
+ urn
9
+ properties {
10
+ name
11
+ description
12
+ source
13
+ statement {
14
+ value
15
+ language
16
+ }
17
+ # created {
18
+ # time
19
+ # actor
20
+ # }
21
+ lastModified {
22
+ # time
23
+ actor
24
+ }
25
+ }
26
+ platform {
27
+ ...platformFields
28
+ }
29
+ subjects {
30
+ dataset {
31
+ urn
32
+ name
33
+ }
34
+ schemaField {
35
+ urn
36
+ type
37
+ fieldPath
38
+ }
39
+ }
40
+ }
41
+
42
+ query listQueries($input: ListQueriesInput!) {
43
+ listQueries(input: $input) {
44
+ start
45
+ total
46
+ count
47
+ queries {
48
+ ...query
49
+ }
50
+ }
51
+ }
@@ -0,0 +1,37 @@
1
+ query GetQueryEntity($urn: String!) {
2
+ entity(urn: $urn) {
3
+ urn
4
+ type
5
+ ... on QueryEntity {
6
+ urn
7
+ properties {
8
+ name
9
+ description
10
+ source
11
+ statement {
12
+ value
13
+ language
14
+ }
15
+ lastModified {
16
+ actor
17
+ }
18
+ }
19
+ platform {
20
+ urn
21
+ name
22
+ }
23
+ subjects {
24
+ dataset {
25
+ urn
26
+ name
27
+ }
28
+ schemaField {
29
+ urn
30
+ type
31
+ fieldPath
32
+ }
33
+ }
34
+ }
35
+ }
36
+ }
37
+
@@ -0,0 +1,16 @@
1
+ # GraphQL query for fetching document content by URNs
2
+ # Used by grep_documents to search within document content
3
+
4
+ query readDocuments($urns: [String!]!) {
5
+ entities(urns: $urns) {
6
+ urn
7
+ ... on Document {
8
+ info {
9
+ title
10
+ contents {
11
+ text
12
+ }
13
+ }
14
+ }
15
+ }
16
+ }
@@ -0,0 +1,242 @@
1
+ # Simplified platform info for search results
2
+ fragment SimplePlatformFields on DataPlatform {
3
+ urn
4
+ type
5
+ name
6
+ properties {
7
+ displayName
8
+ logoUrl
9
+ }
10
+ }
11
+
12
+ fragment SearchEntityInfo on Entity {
13
+ urn
14
+
15
+ # For some entity types, the urns are not human-readable. For those,
16
+ # we pull the name as well.
17
+ ... on Dataset {
18
+ platform {
19
+ ...SimplePlatformFields
20
+ }
21
+ properties {
22
+ name
23
+ description
24
+ }
25
+ }
26
+ ... on Chart {
27
+ platform {
28
+ ...SimplePlatformFields
29
+ }
30
+ properties {
31
+ name
32
+ description
33
+ }
34
+ }
35
+ ... on Dashboard {
36
+ platform {
37
+ ...SimplePlatformFields
38
+ }
39
+ properties {
40
+ name
41
+ description
42
+ }
43
+ }
44
+ ... on Container {
45
+ platform {
46
+ ...SimplePlatformFields
47
+ }
48
+ properties {
49
+ name
50
+ description
51
+ }
52
+ }
53
+ ... on GlossaryTerm {
54
+ properties {
55
+ name
56
+ description
57
+ }
58
+ }
59
+ ... on GlossaryNode {
60
+ properties {
61
+ name
62
+ description
63
+ }
64
+ }
65
+ ... on Domain {
66
+ properties {
67
+ name
68
+ description
69
+ }
70
+ }
71
+ ... on DataProduct {
72
+ properties {
73
+ name
74
+ description
75
+ }
76
+ }
77
+ ... on DataJob {
78
+ properties {
79
+ name
80
+ description
81
+ }
82
+ }
83
+ ... on DataFlow {
84
+ platform {
85
+ ...SimplePlatformFields
86
+ }
87
+ properties {
88
+ name
89
+ description
90
+ }
91
+ }
92
+ ... on MLModel {
93
+ name
94
+ description
95
+ platform {
96
+ ...SimplePlatformFields
97
+ }
98
+ }
99
+ ... on MLModelGroup {
100
+ name
101
+ description
102
+ platform {
103
+ ...SimplePlatformFields
104
+ }
105
+ }
106
+ ... on MLFeature {
107
+ name
108
+ description
109
+ }
110
+ ... on MLFeatureTable {
111
+ name
112
+ description
113
+ platform {
114
+ ...SimplePlatformFields
115
+ }
116
+ }
117
+ ... on MLPrimaryKey {
118
+ name
119
+ description
120
+ }
121
+ ... on Tag {
122
+ name
123
+ description
124
+ properties {
125
+ name
126
+ description
127
+ }
128
+ }
129
+ ... on StructuredPropertyEntity {
130
+ definition {
131
+ displayName
132
+ qualifiedName
133
+ description
134
+ }
135
+ }
136
+ ... on CorpUser {
137
+ username
138
+ properties {
139
+ displayName
140
+ fullName
141
+ title
142
+ email
143
+ }
144
+ }
145
+ ... on CorpGroup {
146
+ name
147
+ info {
148
+ displayName
149
+ description
150
+ email
151
+ }
152
+ }
153
+ }
154
+
155
+ fragment FacetEntityInfo on Entity {
156
+ ... on Dataset {
157
+ name
158
+ properties {
159
+ name
160
+ }
161
+ }
162
+ ... on Container {
163
+ subTypes {
164
+ typeNames
165
+ }
166
+ properties {
167
+ name
168
+ }
169
+ }
170
+ ... on GlossaryTerm {
171
+ properties {
172
+ name
173
+ }
174
+ }
175
+ ... on Tag {
176
+ name
177
+ properties {
178
+ name
179
+ }
180
+ }
181
+ ... on CorpUser {
182
+ username
183
+ properties {
184
+ displayName
185
+ fullName
186
+ title
187
+ email
188
+ }
189
+ }
190
+ ... on CorpGroup {
191
+ name
192
+ info {
193
+ displayName
194
+ description
195
+ email
196
+ }
197
+ }
198
+ }
199
+
200
+ query search(
201
+ $types: [EntityType!]
202
+ $query: String!
203
+ $orFilters: [AndFilterInput!]
204
+ $count: Int!
205
+ $start: Int!
206
+ $viewUrn: String
207
+ $sortInput: SearchSortInput
208
+ ) {
209
+ searchAcrossEntities(
210
+ input: {
211
+ query: $query
212
+ count: $count
213
+ start: $start
214
+ types: $types
215
+ orFilters: $orFilters
216
+ viewUrn: $viewUrn
217
+ sortInput: $sortInput
218
+ searchFlags: { skipHighlighting: true, maxAggValues: 5 }
219
+ }
220
+ ) {
221
+ start
222
+ count
223
+ total
224
+ searchResults {
225
+ entity {
226
+ ...SearchEntityInfo
227
+ }
228
+ }
229
+ facets {
230
+ field
231
+ displayName
232
+ aggregations {
233
+ value
234
+ count
235
+ displayName
236
+ entity {
237
+ ...FacetEntityInfo
238
+ }
239
+ }
240
+ }
241
+ }
242
+ }