Skip to main content

Monte Carlo CLI

Monte Carlo's Alpha CLI!

Installation

Requires Python 3.9 or greater. Normally you can install and update using pip. For instance:

pip install virtualenv
virtualenv venv
. venv/bin/activate

pip install -U montecarlodata

Developers of the CLI can use:

pip install virtualenv
make install
. venv/bin/activate
pre-commit install

Either way confirm the installation by running:

montecarlo --version

If the Python requirement does not work for you please reach out to support@montecarlodata.com. Docker is an option.

Quick start

First time users can configure the tool by following the onscreen prompts:

montecarlo configure

MCD tokens can be generated from the dashboard.

Use the --help flag for details on any advanced options (e.g. creating multiple montecarlo profiles) or see docs here.

Non-interactive / scripted use: when stdin is not a terminal (CI, scheduled jobs), montecarlo configure defaults to API key auth and prints a notice to stderr. Pass --api-key --mcd-id <ID> --mcd-token <TOKEN> to configure without prompts, or --oauth to use OAuth client credentials.

That's it! You can always validate your connection with:

montecarlo validate

User settings

Any configuration set by montecarlo configure can be found in ~/.mcd/ by default.

The MCD ID and Token can be overwritten, or even set, by the environment:

  • MCD_DEFAULT_API_ID
  • MCD_DEFAULT_API_TOKEN

These two are required either as part of configure or as environment variables.

The following values can also be set by the environment:

  • MCD_API_ENDPOINT - Overwrite the default API endpoint
  • MCD_VERBOSE_ERRORS - Enable verbose logging on errors (default=false)

Help

Documentation for commands, options, and arguments can be found here.

You can also use montecarlo help to echo all help text or use the --help flag on any command.

Examples

Using Docker from a local installation

docker build -t montecarlo .
docker run -e MCD_DEFAULT_API_ID='<ID>' -e MCD_DEFAULT_API_TOKEN='<TOKEN>' montecarlo --version

Replace --version with any sub-commands or options. If interacting with files those directories will probably need to be mounted too.

Configure a named profile with custom config-path

$ montecarlo configure --profile-name zeus --config-path .
Key ID: 1234
Secret:

$ cat ./profiles.ini
[zeus]
mcd_id = 1234
mcd_token = 5678

List active integrations

$ montecarlo integrations list
╒══════════════════╤══════════════════════════════════════╤══════════════════════════════════╕
│ Integration      │ ID                                   │ Created on (UTC)                 │
╞══════════════════╪══════════════════════════════════════╪══════════════════════════════════╡
│ Odin             │ 58005657-2914-4701-9a11-260ac425b14e │ 2021-01-02T01:30:52.806602+00:00 │
├──────────────────┼──────────────────────────────────────┼──────────────────────────────────┤
│ Thor             │ 926816bd-ab17-4f95-a953-fa14482c59de │ 2021-01-02T01:31:19.892205+00:00 │
├──────────────────┼──────────────────────────────────────┼──────────────────────────────────┤
│ Loki             │ 1cf1dc0d-d8ec-4c85-8e64-57ab2ad8e023 │ 2021-01-02T01:32:37.709747+00:00 │
╘══════════════════╧══════════════════════════════════════╧══════════════════════════════════╛

Apply monitors configuration

$ montecarlo monitors apply --namespace my-monitors

Gathering monitor configuration files.
- models/customer_success/schema.yml - Embedded monitor configuration found.
- models/customer_success/schema.yml - Monitor configuration found.
- models/lineage/schema.yml - Embedded monitor configuration found.

Modifications:
- ResourceModificationType.UPDATE - Monitor: type=stats, table=analytics:prod.customer_360
- ResourceModificationType.UPDATE - Monitor: type=categories, table=analytics:prod.customer_360
- ResourceModificationType.UPDATE - Monitor: type=stats, table=analytics:prod_lineage.lineage_nodes
- ResourceModificationType.UPDATE - Freshness SLI: table=analytics:prod.customer_360, freshness_threshold=30

Import DBT manifest

$ montecarlo import dbt-manifest --dbt-manifest-file target/manifest.json

Importing DBT objects into Monte Carlo catalog. please wait...

Imported a total of 51 DBT objects into Monte Carlo catalog.

Tests and Releases

Locally make test will run all tests. CircleCI manages all testing for deployment.

To publish a new release, navigate to Releases in the GitHub repo and then:

  • Click "Draft a new release"
  • In the "Choose a tag" dropdown, type the new version number, for example v1.2.3 and click "Create a new tag"
  • Follow the format from previous releases for the description
  • Leave "Set as the latest release" checked
  • Click "Publish release"
  • CircleCI will take care of publishing a new package to PyPI and generating documentation.

License

Apache 2.0 - See the LICENSE for more information.

Metadata

Release files for montecarlodata 0.177.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for montecarlodata 0.177.0
File Size Uploaded Provenance
montecarlodata-0.177.0.tar.gz 234.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for montecarlodata 0.177.0
File Interpreter ABI Platform
montecarlodata-0.177.0-py3-none-any.whl Python 3 none any Details

Total release size: 419.8 kB

Release files / montecarlodata-0.177.0.tar.gz

Download URL montecarlodata-0.177.0.tar.gz
Size 234.5 kB
Tags Source
SHA-256 checksum
How to use checksums
2198280f79fab784c3a9fcbfc0120b13548c808073fd6546f7767959a0a3fe47
BLAKE2b-256 checksum
How to use checksums
a89eb3a118cb4de2f6432e5818971ea3231bb964fa0d421df38bb0fcfc93e318
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/9.0.1 pkginfo/1.13.3 requests/2.34.2 requests-toolbelt/1.0.0 tqdm/4.70.1 CPython/3.10.22

Release files / montecarlodata-0.177.0-py3-none-any.whl

Download URL montecarlodata-0.177.0-py3-none-any.whl
Size 185.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
57a24c0116864dfa9eac531d54553d98cec87a707552c0b809c392ea7dd5b0cc
BLAKE2b-256 checksum
How to use checksums
e2eb5411ba64f593bad63225422e1b7ef9d52decdcdb310680843ab6da661fc0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/9.0.1 pkginfo/1.13.3 requests/2.34.2 requests-toolbelt/1.0.0 tqdm/4.70.1 CPython/3.10.22

Security for montecarlodata 0.177.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.177.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page