Skip to content

ENG-2245: Add GCP Looker scheduled plan trigger and list - #80

Open
kaustav98255 wants to merge 1 commit into
mainfrom
eng-2245-implement-gcp-looker-scheduled-plan-trigger
Open

ENG-2245: Add GCP Looker scheduled plan trigger and list#80
kaustav98255 wants to merge 1 commit into
mainfrom
eng-2245-implement-gcp-looker-scheduled-plan-trigger

Conversation

@kaustav98255

@kaustav98255 kaustav98255 commented Mar 21, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR adds support for triggering Looker scheduled plans and listing available plans through the Paradime CLI.

Changes

New Files

  • paradime/core/scripts/gcp_looker.py — Core implementation for Looker operations:

    • _login() — Authenticates via POST to /api/4.0/login with form-encoded client_id and client_secret, returns access token
    • trigger_looker_scheduled_plans() — Triggers multiple scheduled plans in parallel via ThreadPoolExecutor using run_once endpoint
    • _trigger_single_plan() — Triggers a single plan via POST to /api/4.0/scheduled_plans/{id}/run_once
    • list_looker_scheduled_plans() — Lists all scheduled plans via GET /api/4.0/scheduled_plans with ID, name, title, enabled, crontab, last run, and next run
  • paradime/cli/integrations/gcp_looker.py — CLI command definitions for Looker operations

Modified Files

  • paradime/cli/run.py — Registered gcp_looker_trigger and gcp_looker_list_plans commands

CLI Commands

gcp-looker-trigger — Trigger Looker scheduled plans

# Trigger a single scheduled plan
paradime run gcp-looker-trigger \
  --base-url https://mycompany.cloud.looker.com \
  --client-id <looker-client-id> \
  --client-secret <looker-client-secret> \
  --plan-ids 123

# Trigger multiple plans
paradime run gcp-looker-trigger \
  --base-url https://mycompany.cloud.looker.com \
  --client-id <client-id> \
  --client-secret <client-secret> \
  --plan-ids 123,456,789

# JSON output
paradime run gcp-looker-trigger --plan-ids 123 --json

gcp-looker-list-plans — List all Looker scheduled plans

paradime run gcp-looker-list-plans \
  --base-url https://mycompany.cloud.looker.com \
  --client-id <looker-client-id> \
  --client-secret <looker-client-secret>

# JSON output
paradime run gcp-looker-list-plans --json

Implementation Details

Aspect Details
Authentication OAuth-style login via POST /api/4.0/login with client_id + client_secret, returns access token
API Version Looker API 4.0
Execution Model Fire-and-forget — run_once queues the plan for execution, no polling needed
Parallel Execution Multiple plans triggered in parallel via ThreadPoolExecutor
Output Table (Trigger) Columns: Plan ID, Status
Output Table (List) Columns: Plan ID, Name, Title, Enabled, Crontab, Last Run, Next Run
Env Var Support LOOKER_BASE_URL, LOOKER_CLIENT_ID, LOOKER_CLIENT_SECRET via env_click_option
API Client requests library

…-2245)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@linear

linear Bot commented Mar 21, 2026

Copy link
Copy Markdown

Base automatically changed from feature-branch-unified-cli to main March 24, 2026 10:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants