Governed Agentic Analytics with Spark and Knowledge Catalog

Governed Agentic Analytics with Spark and Knowledge Catalog

Guides an AI agent through gathering requirements and designing a governed agentic analytics solution on Google Cloud with Spark and a metadata catalog across multi-cloud data.

Skill files6 files

assets/

references/

SKILL.md326 lines
1
---
2
name: google-cloud-solution-agentic-analytics-spark-knowledge-catalog
3
metadata:
4
version: "1.0.2"
5
category: MultiProductSolutions
6
description: >-
7
Discovers requirements and designs an end-to-end governed agentic analytics
8
solution using Knowledge Catalog and Managed Service for Apache Spark
9
(Lightning Engine). Use when designing data science and analytics workflows
10
across structured and unstructured distributed data (including in S3, Azure
11
Blob, AlloyDB, and Iceberg), establishing metadata governance with Knowledge
12
Catalog aspect types, or grounding agentic IDEs (VS Code, Antigravity) by
13
using the Google Cloud Data Agent Kit. Don't use for provisioning borderless
14
data lakehouse infrastructure (use
15
google-cloud-solution-agentic-ai-borderless-data-lakehouse instead).
16
---
17
18
# Agentic analytics across cloud providers and data types
19
20
This skill provides a workflow to design and implement a governed, secure
21
pipeline for agentic analytics solution across structured and unstructured data
22
that's distributed across Google Cloud, on-premises systems, and other cloud
23
providers.
24
25
## Attribution
26
27
**MUST READ**: Before executing any `gcloud`, REST API, or MCP command, you
28
MUST read and follow the instructions in
29
[Usage Attribution](references/attribution.md).
30
31
## Overview of the workflow
32
33
The workflow consists of the following phases:
34
* **Phase 1: Requirements discovery**. Gather detailed requirements related to
35
the cloud workload or use case that the user needs assistance for.
36
* **Phase 2: Solution architecture**. Use the requirements that were gathered
37
in Phase 1 to generate a detailed solution architecture for the cloud
38
workload or use case.
39
* **Phase 3: Solution validation**. Create a plan to validate the generated
40
solution, generate validation instructions and scripts, and run the
41
validation.
42
* **Phase 4: Solution packing and presentation**. Consolidate the generated
43
content and present the solution.
44
45
**Important notes about the workflow**:
46
* **Strict phase separation**: During Phase 1 (Requirements discovery), when
47
you ask the user clarifying questions, DON'T recommend, propose, or outline
48
any architectural designs, technical decompositions, cloud services, or
49
component mappings.
50
* **When you can skip certain phases**: If the user's prompt indicates that a
51
specific phase or task in this workflow is already completed or approved
52
(e.g., "requirements discovery stage is completed", "product selection is
53
approved", or "architecture is confirmed"), DON'T repeat that phase or task.
54
Instead, skip directly to the requested task (such as generating the
55
technical decomposition, recommending products, or compiling the solution
56
guide).
57
58
## Phase 1: Requirements discovery and analysis
59
60
1. Request the user to describe the functional requirements (business
61
processes, activities, and use cases) of their workload. Ask the user the
62
following questions, one question at a time:
63
- What are your primary inventory data sources? Are they unstructured
64
(e.g., PDF flavor recipes, invoices) or structured (e.g., historical
65
sales in Iceberg)?
66
- Where are these sources hosted? Are they split across AWS S3, Azure
67
Blob, Google Cloud Storage, or databases like AlloyDB?
68
- How do you manage and federate metadata across your data
69
sources within Google Cloud and in external locations (such as other
70
cloud providers)?
71
- What are your analytical and computational requirements to join, clean,
72
and run forecast models over large-scale distributed data?
73
- What types of natural language prompts do your data scientists or
74
operational agents expect to execute in their agentic IDE (VS Code or
75
Antigravity IDE)?
76
2. Request the user to describe the non-functional requirements of their
77
workload.
78
79
The following are examples of questions you can ask to gather non-functional
80
requirements:
81
- **Security, privacy, and compliance**: What data privacy rules,
82
regulatory compliance (e.g., GDPR, HIPAA), or data governance
83
requirements must the system adhere to?
84
- **Reliability**: What are your uptime, high-availability,
85
fault-tolerance, and disaster recovery objectives (RTO/RPO)?
86
- **Performance**: What target query latencies and SLA expectations does
87
your workload require?
88
- **Operations**: What operational monitoring metrics do your data
89
scientists and engineers need?
90
- **Cost & Sustainability**: Do you have specific budget constraints and
91
data egress/transfer cost requirements?
92
3. Ask the user whether the workload currently runs on other cloud providers or
93
on-premises.
94
* If the user answers "yes", then ask the user to describe the
95
architecture of the current deployment.
96
* If the user answer "no", then proceed to the next step.
97
4. Request the user to describe dependencies, if any, on other workloads,
98
products, or tools. The following are examples of questions that you can
99
ask to get information about the dependencies:
100
* Do you have any upstream or downstream dependencies on external systems
101
(e.g., identity providers, data curation platforms, CI/CD pipelines, or
102
active data catalogs)?
103
* Are there any requirements for your general data-engineering software
104
delivery lifecycle (e.g., version control, testing, data quality
105
assurance)? Provide the path to a directory or examples of these
106
artifacts.
107
5. Review the input that the user has provided so far, and check whether there
108
are any ambiguities or contradictions.
109
110
If you identify any ambiguities or contradictions in the requirements that
111
the user has provided (e.g., zero-copy vs copying data to a repository), then
112
do the following for each ambiguity or contradiction that you identify:
113
* Describe the ambiguity or contradiction (e.g., explain why copying data
114
contradicts the zero-copy requirement and also incurs data-transfer
115
costs).
116
* Ask the user how they wish to resolve the ambiguity or contradiction.
117
* If the user delegates the choice to you (e.g., the user replies with
118
"do what you think is best" or "you decide"), then provide a clear
119
suggestion to resolve the ambiguity or contradiction (e.g., suggest
120
prioritizing zero-copy remote queries), explain your reasoning
121
(e.g., to eliminate multi-cloud fees and data duplication), and ask
122
the user to approve your suggestion.
123
124
**Critical**: Until all the ambiguities and contradictions that you identify
125
are resolved according to the preceding guidance, you must NOT recommend or
126
generate any architecture design, technical decomposition, or Google Cloud
127
product recommendations.
128
129
6. **Important**: DON'T start this step if there are unresolved contradictions
130
or ambiguities from Step 5.
131
132
Generate a technical decomposition of the components of the workload.
133
* The technical decomposition must break down the solution into logical
134
components.
135
* The decomposition MUST address role-based security and credentials
136
within the relevant layers.
137
* The decomposition MUST be organized under the following four layers,
138
which represent a standard architectural pattern for agentic analytics
139
solutions, flowing from user interaction through data context and
140
governance to core data processing:
141
* **User-interaction layer (IDE)**: e.g., agentic development
142
environment.
143
* **Grounding and trusted data**: e.g., foundation model, MCP servers,
144
and data warehouse in the cloud.
145
* **Metadata curation**: e.g., metadata scanning.
146
* **Data processing and analytics**: e.g., analytics workflows, Spark
147
data processing, and external data stores.
148
7. Request the user to approve the generated technical decomposition.
149
8. If the user requests changes, then generate an updated technical
150
decomposition.
151
9. Repeat steps 5 through 8 until the user approves the generated technical
152
decomposition.
153
10. After the user approves the technical decomposition, proceed to Phase 2.
154
**Important**: Don't proceed to the next phase until the user approves the
155
generated technical decomposition of the workload.
156
157
## Phase 2: Solution architecture
158
159
### Ground all generated content
160
161
For each task in this phase, to ensure that the generated content aligns with
162
the latest and official Google Cloud guidance, ground the generated content by
163
using the following resources:
164
* Google Developer Knowledge MCP server
165
* Instructions to connect to the MCP Server:
166
https://developers.google.com/knowledge/mcp.md.txt
167
* Server: https://developerknowledge.googleapis.com/mcp
168
* Tools:
169
* `developerknowledge:search_documents`
170
* `developerknowledge:get_documents`
171
* `developerknowledge:answer_query`
172
* Relevant skills from https://github.com/google/skills
173
* Official Google Cloud documentation, including the following:
174
* Reference architecture for agentic cross-cloud analytics workflows
175
across multi-cloud data lakes, structured data warehouses, and
176
unstructured data stores:
177
https://docs.cloud.google.com/architecture/agentic-ai-cross-cloud-analytics.md.txt
178
* Decision-making guides for the products and topics that are relevant to
179
the workload:
180
https://github.com/google/skills/blob/main/skills/cloud/google-cloud-solution-architecture/references/decision-making-guides.md
181
* Best-practices guides for the products and topics that are relevant to
182
the workload:
183
https://github.com/google/skills/blob/main/skills/cloud/google-cloud-solution-architecture/references/best-practices-guides.md
184
185
### Task 2.1: Identify Google Cloud products and features required for the workload.
186
187
1. For each component in the confirmed technical decomposition, identify the
188
appropriate Google Cloud products and features, based on the guidance in the
189
following resources and adjusted suitably based on the approved technical
190
decomposition:
191
- `references/product-selection-guidance.md`
192
- `https://github.com/google/skills/blob/main/skills/cloud/google-cloud-solution-architecture/references/decision-making-guides.md`
193
2. Present the generated product recommendations and ask the user to approve
194
the recommendations.
195
3. If the user requests changes, then make the required changes.
196
4. Repeat steps 2 and 3 until the user approves the product recommendations.
197
5. After the user approves the product recommendations, proceed to Task 2.2.
198
199
### Task 2.2: Generate an architecture diagram.
200
201
1. Generate an architecture diagram in Mermaid format:
202
https://github.com/mermaid-js/mermaid.
203
2. Present the generated diagram to the user and ask the user to approve the
204
architecture diagram.
205
3. If the user requests changes, then make the required changes.
206
4. Repeat steps 2 and 3 until the user approves the architecture diagram.
207
5. After the user approves the architecture diagram, proceed to Task 2.3.
208
209
### Task 2.3: Generate an architecture description.
210
211
1. Generate a description that explains the purpose of each component, the
212
relationships between the components, and the task flow or data flow.
213
2. Present the generated architecture description to the user and ask the user
214
to approve the description.
215
3. If the user requests any changes, then make the required changes.
216
4. Repeat steps 2 and 3 until the user approves the architecture description.
217
5. After the user approves the architecture description, proceed to Task 2.4.
218
219
### Task 2.4: Generate design recommendations.
220
221
1. Generate design recommendations and best practices to optimally configure
222
each component in the architecture based on the workload's requirements.
223
224
**Important**:
225
* When you generate design recommendations, consider the following:
226
* Functional requirements that were gathered in Phase 1.
227
* Non-functional requirements that were gathered in Phase 1.
228
* Align the generated design recommendations with the recommendations in
229
`references/design-recommendations.md`.
230
* To generate design recommendations for Knowledge Catalog, use the
231
resources that are listed in
232
`references/knowledge-catalog-documentation.md`
233
* To generate guidance for the non-functional requirements, use the
234
following skills:
235
- `google-cloud-waf-security`
236
- `google-cloud-waf-reliability`
237
- `google-cloud-waf-cost-optimization`
238
- `google-cloud-waf-operational-excellence`
239
- `google-cloud-waf-performance-optimization`
240
- `google-cloud-waf-sustainability`
241
2. Present the generated recommendations to the user and ask whether the user
242
needs any changes.
243
3. If the user needs changes, then make the required changes.
244
4. Repeat steps 2 and 3 until the user confirms that the generated design
245
recommendations meet their requirements.
246
5. Proceed to Task 2.5.
247
248
### Task 2.5: Generate deployment guidance.
249
250
1. Generate deployment guidance, including code and instructions to enable the
251
user to deploy the solution.
252
253
**Important**:
254
* The guidance must provide steps for deployment prerequisites, including
255
setting up the Google Cloud project, enabling billing, enabling the
256
required APIs, and setting up the required roles and permissions.
257
* Use the following resources as the technical foundation for the
258
deployment guidance that you generate:
259
- https://github.com/gemini-cli-extensions/data-agent-kit-starter-pack/tree/main/skills:
260
A plugin that provides a specialized suite of skills and MCP tools
261
to let you use your preferred coding agent to architect complex data
262
pipelines, transform data with dbt, write Spark and BigQuery SQL
263
notebooks, create and troubleshoot Dataflow pipelines, and
264
orchestrate end-to-end workflows across the Google Cloud data
265
ecosystem.
266
- https://codelabs.developers.google.com/next26/gen-keynote/raw-data-forecasting#0:
267
A codelab that provides instructions to use the Data Agent Kit
268
extension to efficiently analyze a cross-cloud data topology from
269
within your preferred agentic development environment.
270
- https://codelabs.developers.google.com/governance-context-part1#0: A
271
codelab that provides instructions to build a data foundation in
272
BigQuery, apply rigid metadata tags (Knowledge Catalog Aspects) to
273
differentiate valid data from noise, and use the Gemini CLI to
274
locally test if the LLM strictly follows your governance rules.
275
- https://docs.cloud.google.com/dataplex/docs/establish-foundational-data-context.md.txt:
276
A tutorial that shows how to establish data context in Knowledge
277
Catalog.
278
- https://docs.cloud.google.com/dataplex/docs/ingest-custom-sources.md.txt:
279
A guide that explains how to bring information about your unique,
280
custom data sources into Knowledge Catalog.
281
2. Present the generated deployment guidance to the user and ask whether the
282
user needs any changes.
283
3. If the user requests changes, then make the required changes.
284
4. Repeat steps 2 and 3 until the user confirms that the generated deployment
285
guidance meets their requirements.
286
5. Proceed to Phase 3.
287
288
## Phase 3: Solution validation
289
290
1. Create a plan to validate the generated solution. The plan must outline the
291
steps to verify that the generated solution meets the workload's
292
requirements.
293
2. Present the validation plan to the user and request feedback or approval.
294
3. If the user requests changes, update the plan as required.
295
4. Repeat steps 2 and 3 until the user approves the validation plan.
296
5. Generate scripts or commands using tools like `curl` or `gcloud` to perform
297
the steps in the approved validation plan.
298
6. Request permission from the user to perform the validation checks.
299
7. If the user gives permission, run the validation checks and troubleshoot any
300
deployment issues.
301
8. When all the validation checks pass, proceed to Phase 4.
302
303
## Phase 4: Solution packaging and presentation
304
305
1. Consolidate the text artifacts that were generated in Phase 2 and Phase 3
306
into a single Markdown file named `solution-architecture-guide.md`, based on
307
the template in `assets/output-template.md`.
308
2. Present the consolidated solution-architecture-guide.md to the user.
309
3. Request the user's permission to write the code files in the user's
310
workspace.
311
4. After the user gives permission, write the code files in the user's
312
workspace.
313
314
## Supporting resources
315
316
* https://docs.cloud.google.com/data-cloud-extension/antigravity/transform-data.md.txt:
317
Guide to how the Data Agent Kit extension lets you use notebooks for data
318
transformation and analysis.
319
* https://docs.cloud.google.com/dataplex/docs/use-cases.md.txt: Use cases for
320
Knowledge Catalog.
321
* https://docs.cloud.google.com/managed-spark/docs/guides/lightning-engine-serverless.md.txt:
322
Guide to accelerating Apache Spark workloads by using Lightning Engine.
323
* https://docs.cloud.google.com/bigquery/docs/use-knowledge-catalog.md.txt:
324
Guide to use Knowledge Catalog as a governance and agentic layer for
325
BigQuery.
326

© Google LLC · Apache 2.0 · source · posted by @OpenSourceBuffGuy on promptparty.com

@OpenSourceBuffGuy

I find openly licensed prompts and post them here.

0 followers · 6,373 prompts

More by @OpenSourceBuffGuy

See all
Website Clone Architect prompt image

Website Clone Architect

Reverse-engineers a website section by section, writes component specs, and hands them to parallel builder agents in git worktrees to rebuild it.

agent-skill, orchestrator, parallel-agents, multi-agent, plan-then-execute, web-development, frontend, codebase-analysis, scaffolding, css, html, nextjs, typescript, git, mcp, claude-code, for-developers, for-designers, long-form, advanced, technical-spec, task-decomposition, structured-output, design-systems, ui-ux, tool-use, checklist, report, vibe-coding

Italian Terrace Cafe Candid Portrait prompt image

Italian Terrace Cafe Candid Portrait

Generates a photorealistic candid shot of a woman in a white corset dress laughing at a sunny hotel terrace cafe, written as detailed JSON.

image-prompt, json-prompt, structured-output, photorealistic, portrait, woman, candid, fashion, cottagecore, natural-light, golden-hour, bokeh, summer, travel, cityscape, mountains, medium-shot, vibrant-colors, for-photographers, nano-banana, fashion-shoot, luxury

Night Street Photo With Leashed Cat prompt image

Night Street Photo With Leashed Cat

Generates a flash-lit night street photo of a blonde woman in a retro track jacket walking a hissing tabby cat on a leash.

image-prompt, json-prompt, nano-banana, structured-output, portrait, woman, animals, pet-portrait, night-scene, street-photography, candid, editorial, fashion, dramatic-lighting, photorealistic, vertical-format, medium-shot, graffiti, for-photographers, for-content-creators

1 view

Reviews

Loading reviews…

Discussion

Loading comments…