powerdrill-data-analysis

Review·Scanned 2/18/2026

This skill is a Python client and CLI for Powerdrill that uploads local files and runs analysis against https://ai.data.cloud/api. It requires POWERDRILL_USER_ID and POWERDRILL_PROJECT_API_KEY, reads local files (e.g., /path/to/data.csv, test/testdata.csv), and includes commands like python scripts/powerdrill_client.py.

from clawhub.ai·v3b0192f·36.0 KB·0 installs
Scanned from 1.0.0 at 3b0192f · Transparency log ↗
$ vett add clawhub.ai/javainthinking/powerdrill-data-analysisReview findings below

Powerdrill Data Analysis Skill

A Claude Code skill for AI-powered data analysis using the Powerdrill platform. Upload datasets, ask natural-language questions, and get insights with charts, tables, and analytical reports.

What This Does

This skill enables Claude to analyze data through Powerdrill's API. Given a file or dataset, Claude can:

  • Upload local files (CSV, Excel, PDF, etc.) for analysis
  • Ask natural-language questions about your data
  • Generate charts, tables, and statistical insights
  • Manage datasets and analysis sessions
  • Automatically clean up resources when done

Quick Start

1. Get Powerdrill Credentials

You need a Powerdrill Teamspace and API key:

  1. Create a Teamspace - Watch setup tutorial
  2. Get your API key - Watch API key tutorial

2. Set Environment Variables

export POWERDRILL_USER_ID="your_user_id"
export POWERDRILL_PROJECT_API_KEY="your_project_api_key"

3. Install Dependency

pip install requests

4. Run

As a Python library:

from scripts.powerdrill_client import *

# Create dataset and upload a file
ds = create_dataset("Sales Data")
dataset_id = ds["data"]["id"]

upload_and_create_data_source(dataset_id, "sales.csv")
wait_for_dataset_sync(dataset_id)

# Create session and ask questions
session = create_session("Analysis")
session_id = session["data"]["id"]

result = create_job(session_id, "What are the top 5 products by revenue?", dataset_id=dataset_id)
for block in result["data"]["blocks"]:
    if block["type"] == "MESSAGE":
        print(block["content"])

# Clean up when done
cleanup(session_id=session_id, dataset_id=dataset_id)

As a CLI:

python scripts/powerdrill_client.py create-dataset "Sales Data"
python scripts/powerdrill_client.py upload-file dset-xxx sales.csv
python scripts/powerdrill_client.py wait-sync dset-xxx
python scripts/powerdrill_client.py create-session "Analysis"
python scripts/powerdrill_client.py create-job SESSION_ID "What are the top 5 products by revenue?" --dataset-id dset-xxx
python scripts/powerdrill_client.py cleanup --session-id SESSION_ID --dataset-id dset-xxx

Project Structure

powerdrill-skills/
  SKILL.md                        # Skill definition (Claude Code reads this)
  README.md                       # This file
  scripts/
    powerdrill_client.py           # Python API client + CLI
  test/
    testdata.csv                   # Sample data for testing (gitignored)

API Coverage

The Python client covers all Powerdrill API v2 endpoints:

FunctionAPI EndpointDescription
list_datasets()GET /v2/team/datasetsList all datasets
create_dataset()POST /v2/team/datasetsCreate a new dataset
get_dataset_overview()GET /v2/team/datasets/{id}/overviewGet dataset summary and suggested questions
get_dataset_status()GET /v2/team/datasets/{id}/statusCheck data source sync status
delete_dataset()DELETE /v2/team/datasets/{id}Delete a dataset
list_data_sources()GET /v2/team/datasets/{id}/datasourcesList files in a dataset
create_data_source()POST /v2/team/datasets/{id}/datasourcesAdd a data source (URL or uploaded file)
upload_local_file()POST /v2/team/file/init-multipart-uploadUpload a local file via multipart upload
upload_and_create_data_source()(composite)Upload + create data source in one call
wait_for_dataset_sync()GET /v2/team/datasets/{id}/statusPoll until all sources are synced
list_sessions()GET /v2/team/sessionsList analysis sessions
create_session()POST /v2/team/sessionsCreate a new session
delete_session()DELETE /v2/team/sessions/{id}Delete a session
create_job()POST /v2/team/jobsRun a natural-language analysis query
cleanup()(composite)Delete session and dataset

Supported File Formats

.csv, .tsv, .md, .mdx, .json, .txt, .pdf, .pptx, .docx, .xls, .xlsx

Analysis Response Types

When you run create_job(), the response contains blocks of different types:

Block TypeContent
MESSAGEAnalytical text and conclusions
CODEPython code used for analysis
TABLECSV download URL (expires after ~6 days)
IMAGEChart/visualization PNG URL (expires after ~6 days)
SOURCESFile citations and references
QUESTIONSSuggested follow-up questions
CHART_INFOChart configuration data

CLI Reference

python scripts/powerdrill_client.py <command> [options]

Datasets:
  list-datasets [--search TEXT] [--page-size N]
  create-dataset NAME [--description TEXT]
  get-dataset-overview DATASET_ID
  delete-dataset DATASET_ID

Data Sources:
  list-data-sources DATASET_ID
  upload-file DATASET_ID FILE_PATH
  wait-sync DATASET_ID

Sessions:
  list-sessions [--search TEXT]
  create-session NAME [--output-language LANG]
  delete-session SESSION_ID

Jobs:
  create-job SESSION_ID QUESTION [--dataset-id ID] [--stream]

Cleanup:
  cleanup [--session-id ID] [--dataset-id ID]

Key Concepts

  • Dataset - A container that holds one or more data sources (files)
  • Data Source - An individual file uploaded to a dataset
  • Session - A conversation context that maintains history across multiple analysis jobs
  • Job - A single natural-language analysis query against a dataset

Typical Workflow

create_dataset -> upload file -> wait_for_sync -> create_session -> create_job (repeat) -> cleanup

Always create a session before running jobs. Always call cleanup() after analysis to delete temporary sessions and datasets.

References

License

MIT