Skip to main content

CLI to make bulk updates to Quicksight datasets

Project description

quicksight-bulk-update-datasets

Makes bulk updates to Quicksight datasets.

Screencast of quicksight-bulk-update-datasets

Features

[!NOTE] The only bulk update currently supported is a rename of table schema for PostgreSQL-based datasources

  • Renames the schema in RelationalTable and CustomSQL tables in Amazon Quicksight datasets
  • CustomSQL is parsed with pglast to robustly change the schema
  • Outputs a CSV report of the changes made
  • Has a dry-run mode

Installation

pip install quicksight-bulk-update-datasets

Usage

quicksight-bulk-update-datasets [OPTIONS] ACCOUNT_ID SOURCE_SCHEMA TARGET_SCHEMA

Arguments:

  • ACCOUNT_ID: [required]
  • SOURCE_SCHEMA: [required]
  • TARGET_SCHEMA: [required]

Options:

  • --aws-profile TEXT
  • --dataset-id TEXT
  • --no-prompt / --no-no-prompt: [default: no-no-prompt]
  • --dry-run / --no-dry-run: [default: no-dry-run]
  • --install-completion: Install completion for the current shell.
  • --show-completion: Show completion for the current shell, to copy it or customize the installation.
  • --help: Show help and exit.

Contributing

Prerequisites

To contribute you'll need:

You may also need to refer to the following as you're making changes:

Get the code

If you're not a member of the uktrade GitHub organisation, you should:

  1. Fork this repo at https://github.com/uktrade/quicksight-bulk-update-datasets/fork

  2. Clone the fork by running the following, replacing my-username-or-org with the username or organisation name you forked to:

    git clone git@github.com:my-username-or-org/quicksight-bulk-update-datasets.git
    cd quicksight-bulk-update-datasets.
    

If you are a member the uktrade GitHub organisation, you should:

  1. Clone this repo directly:

    git clone git@github.com:uktrade/quicksight-bulk-update-datasets.git
    cd quicksight-bulk-update-datasets
    

Install in editable mode

pip install -e .

Generating docs

pip install typer-cli
typer quicksight_bulk_update_datasets.py utils docs --name quicksight-bulk-update-datasets --output docs.md

Then manually copy and tweaking the docs from docs.md to the Usage section in README.md.


Releasing

After merging to the main branch, create a release from the Releases page.

  • The tag must be the form "vX.Y.Z" where X.Y.Z is the new SemVer 2.0 version.
  • You should press "Generate release notes" to automatically bring in titles of PRs since the previous release.
  • If there are many PRs, you should include an introductory paragraph highlighting the main changes.

Creating a GitHub release will automatically run the GitHub Actions workflow that releases to PyPI.

Only members of the uktrade GitHub organisation may create releases.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

quicksight_bulk_update_datasets-0.0.20.tar.gz (7.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file quicksight_bulk_update_datasets-0.0.20.tar.gz.

File metadata

File hashes

Hashes for quicksight_bulk_update_datasets-0.0.20.tar.gz
Algorithm Hash digest
SHA256 07db6862985f5d03e05fe1b62f89c2d38bdaed827192f9fb063dccad5f6db6f8
MD5 4de20e5bdb2465c77a49818a734f5e9e
BLAKE2b-256 20ae6434b7ccc7d0e55bb3a7106231d17c8b6915682e125bcd37df8f88a801c8

See more details on using hashes here.

File details

Details for the file quicksight_bulk_update_datasets-0.0.20-py3-none-any.whl.

File metadata

File hashes

Hashes for quicksight_bulk_update_datasets-0.0.20-py3-none-any.whl
Algorithm Hash digest
SHA256 709889f672d09e5a262df88dfadc645884db2ad5ac60727be1038accbd96ffe1
MD5 cbaf69e680a57d7fdaf2e90f64c51344
BLAKE2b-256 d5f2b7c60829e660bacb017f1b6e10880457af84c79166f942989c3c0b6cd7e2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page