Coder Social home page Coder Social logo

cq-source-scaleway's Introduction

CloudQuery Scaleway Source Plugin

test Go Report Card

A Scaleway source plugin for CloudQuery that loads data from Scaleway to any database, data warehouse or data lake supported by CloudQuery, such as PostgreSQL, BigQuery, Athena, and many more.

Links

Authentication

Credentials are used from the default config file and the environment. Get your credentials from the IAM dashboard

Set credentials in environment variables or use the default config file at ~/.config/scw/config.yaml. Config format and locations for other platforms are documented in the SDK Docs

The environment variables to set are:

  • SCW_ACCESS_KEY
  • SCW_SECRET_KEY
  • SCW_DEFAULT_ORGANIZATION_ID

Env vars override config values if both are set. By default all regions and zones are queried.

Incremental Syncing

The Scaleway plugin supports incremental syncing. This means that only new data will be fetched from Scaleway and loaded into your destination for supported tables (support depending on API endpoint). This is done by keeping track of the last item fetched and only fetching data that has been created since then. To enable this, backends_options must be set in the spec (as shown below). This is documented in the Managing Incremental Tables section.

Configuration

The following source configuration file will sync all data from Scaleway to a PostgreSQL database. See the CloudQuery Quickstart for more information on how to configure the source and destination.

kind: source
spec:
  name: "scaleway"
  path: "scaleway/scaleway"
  version: "v2.0.0"
  # use this to enable incremental syncing
  # backend_options:
  #   table_name: "cq_state_scaleway"
  #   connection: "@@plugins.DESTINATION_NAME.connection"
  tables: 
    - "*"
  skip_tables:
    - "scaleway_ipfs_volumes"
    - "scaleway_marketplace_image_versions"
  destinations: 
    - "postgresql"
  spec:
    # plugin spec section

Plugin Spec

  • regions ([]string) (optional) (default: all regions)

    List of regions to query.

  • zones ([]string) (optional) (default: to all zones)

    List of zones to query.

  • timeout_secs (integer in seconds) (optional) (default: 10)

    Timeout for requests against the Scaleway API endpoint.

  • concurrency (integer) (optional) (default: 1000)

    Best effort maximum number of Go routines to use. Lower this number to reduce memory usage.

Development

Run tests

make test

Run linter

make lint

Generate docs

make gen-docs

Release a new version

  1. Run git tag v1.0.0 to create a new tag for the release (replace v1.0.0 with the new version number)
  2. Run git push origin v1.0.0 to push the tag to GitHub

Once the tag is pushed, a new GitHub Actions workflow will be triggered to build the release binaries and create the new release on GitHub. To customize the release notes, see the Go releaser changelog configuration docs.

Publish a new version to the Cloudquery Hub

Tagging a new release should invoke the GitHub Actions workflow to publish to the Cloudquery Hub.

CQ_CI_CLOUDQUERY_API_KEY should be set up in GitHub secrets (Settings -> Security -> Secrets and variables -> Actions) beforehand, with a valid API key.

After publishing the new version, it will show up in the hub.

For more information please refer to the official Publishing a Plugin to the Hub guide.

cq-source-scaleway's People

Contributors

dependabot[bot] avatar disq avatar erezrokah avatar mia-cross avatar remyleone avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.