Skip to main content

A Singer tap / Meltano extractor for CrateDB, built with the Meltano SDK, and based on the Meltano PostgreSQL tap.

Project description

Singer tap / Meltano extractor for CrateDB

Tests Test coverage Python versions

License Status PyPI Downloads

About

A Singer tap for CrateDB, built with the Meltano SDK for custom extractors and loaders, and based on the Meltano PostgreSQL tap.

In Singer ELT jargon, a "tap" conceptually wraps a data source, where you "extract" data from.

In order to learn more about Singer, Meltano, and friends, please navigate to the [Singer Intro].

Install

Usually, you will not install this package directly, but rather on behalf of a Meltano project. A corresponding snippet is outlined in the next section.

After adding it to your meltano.yml project definition file, you can install all defined components and their dependencies with a single command.

meltano install

Usage

You can run the CrateDB Singer tap tap-cratedb by itself, or in a pipeline using Meltano.

Meltano

Using the meltano add subcommand, you can add the plugin to your Meltano project.

meltano add extractor tap-cratedb

NB: It will only work like this when released and registered on Meltano Hub. In the meanwhile, please add the configuration snippet manually.

CrateDB Cloud

In order to connect to CrateDB Cloud, configure the sqlalchemy_url setting within your meltano.yml configuration file like this.

- name: tap-cratedb
  namespace: cratedb
  variant: cratedb
  pip_url: meltano-tap-cratedb
  config:
    sqlalchemy_url: "crate://admin:K4IgMXNvQBJM3CiElOiPHuSp6CiXPCiQYhB4I9dLccVHGvvvitPSYr1vTpt4@example.aks1.westeurope.azure.cratedb.net:4200?ssl=true"}

On localhost

In order to connect to a standalone or on-premise instance of CrateDB, configure the sqlalchemy_url setting within your meltano.yml configuration file like this.

- name: tap-cratedb
  namespace: cratedb
  variant: cratedb
  pip_url: meltano-tap-cratedb
  config:
    sqlalchemy_url: crate://crate@localhost/

Then, invoke the pipeline by using meltano run, similar like this.

meltano run tap-cratedb target-csv

Standalone

You can also invoke the adapter standalone by using the tap-cratedb program. This example demonstrates how to export data from the database into a file.

Define the database connection string including credentials in SQLAlchemy format.

export TAP_CRATEDB_SQLALCHEMY_URL='crate://admin:K4IgMXNvQBJM3CiElOiPHuSp6CiXPCiQYhB4I9dLccVHGvvvitPSYr1vTpt4@example.aks1.westeurope.azure.cratedb.net:4200?ssl=true'

Discover all available database streams.

tap-cratedb --config ENV --discover

Export CrateDB's sys.summits table.

tap-cratedb --config ENV --catalog tests/resources/cratedb-summits.json

Development

In order to work on this adapter dialect on behalf of a real pipeline definition, link your sandbox to a development installation of meltano-tap-cratedb, and configure the pip_url of the component to point to a different location than the vanilla package on PyPI.

Use this URL to directly point to a specific Git repository reference.

pip_url: git+https://github.com/crate/meltano-tap-cratedb.git@main

Use a pip-like notation to link the CrateDB Singer tap in development mode, so you can work on it at the same time while running the pipeline, and iterating on its definition.

pip_url: --editable=/path/to/sources/meltano-tap-cratedb

Download files

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

Source Distribution

meltano_tap_cratedb-0.0.0.tar.gz (16.9 kB view details)

Uploaded Source

Built Distribution

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

meltano_tap_cratedb-0.0.0-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file meltano_tap_cratedb-0.0.0.tar.gz.

File metadata

  • Download URL: meltano_tap_cratedb-0.0.0.tar.gz
  • Upload date:
  • Size: 16.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.11

File hashes

Hashes for meltano_tap_cratedb-0.0.0.tar.gz
Algorithm Hash digest
SHA256 42a5725daf49a5e92de67bc7e728db8d8152d34123788327ae2f8045b337c171
MD5 dd8df0e324e2e33b1090b65f5c10ab25
BLAKE2b-256 7e749551020c8b2ce6aa289f40160529b58cb7d2a521126f7958fa2af1bd6f08

See more details on using hashes here.

File details

Details for the file meltano_tap_cratedb-0.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for meltano_tap_cratedb-0.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 995ec2f92ca9704379281752485965da06497ad5f2c5c02c05ffdbaf15417c86
MD5 1eb37dec728325d4c0d0e37a9991548c
BLAKE2b-256 fae4c57f9f60a8e51d1d0d506e2f87079fbea3820d0e643cb64d4a98e9b6f09d

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