Skip to content

Conversation

@MetalBlueberry
Copy link

Summary

  • Add file-import commands for managing file imports via REST API
  • Complete upload workflow with presigned URLs
  • Support for listing, getting, and cancelling file imports
  • CSV and Parquet file support with auto column mapping

Commands Added

  • tiger file-import upload - Upload and import a file (complete workflow)
  • tiger file-import list - List file imports with filtering
  • tiger file-import get - Get file import details
  • tiger file-import cancel - Cancel a running import

Changes

  • OpenAPI spec: Added FileImport endpoints from savannah-public
  • Generated API client: Auto-generated REST client methods for all FileImport operations
  • CLI commands: Created internal/tiger/cmd/fileimport.go with full command implementation
  • Root command: Added file-import to CLI command tree

Upload Workflow

The upload command provides a complete workflow:

  1. Generates presigned S3 URL
  2. Uploads file to S3
  3. Creates file import with INTERNAL source
  4. Waits for completion (by default, use --no-wait to skip)

Dependencies

Requires: timescale/savannah-public#61

Example Usage

# Upload a CSV file
tiger file-import upload data.csv --table my_table

# List recent imports
tiger file-import list --first 10

# Get import details
tiger file-import get cli-upload-1234567890

# Cancel an import
tiger file-import cancel cli-upload-1234567890 --confirm

- Add FileImport endpoints to OpenAPI spec
- Regenerate API client with FileImport operations
- Add file-import command with upload, list, get, cancel subcommands
- Complete upload workflow: generate presigned URL, upload to S3, create import
- Support CSV and Parquet files with auto column mapping
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