Skip to main content

Transform MQL

Auth setup:

# Follow the prompts to either enter api_key or perform MFA
mql setup

NOTE: All configs including pinned models, api_key, bearer tokens will be stored under the default directory at ~/.transform/config.yml. If another location is desired, please set an ENV variable at $TFD_CONFIG_DIR with the desired path.

CLI Usage:

Run mql --help for a list of all available commands

Usage: mql [OPTIONS] COMMAND [ARGS]...

Options:
  -v, --verbose
  --debug-log-file
  --help            Show this message and exit.

Commands:
  commit-configs         Commit yaml configs found in specified config...
  contact                Instructions for how to contact Transform for help.
  drop-cache             Drop the MQL cache.
  drop-materialization   ***NEW*** Create a new MQL drop materialization...
  get-dimension-values   List all dimension values that are queryable...
  health-report          Completes a health check on MQL servers.
  identify               Identify the currently authenticated user.
  latest-mql-image       Outputs the latest MQL server image details
  list-dimensions        List all unique dimensions for the Organization.
  list-materializations  List the materializations for the Organization...
  list-metrics           List the metrics for the Organization with their...
  list-queries           Retrieve queries from mql server
  list-servers           Lists available MQL servers.
  materialize            ***NEW*** Create a new MQL materialization...
  pin-model              Pin a model id from configs that are already...
  ping                   Perform basic HTTP health check against...
  query                  Create a new MQL query, polls for completion and...
  setup                  Guides user through CLI setup.
  stream-query-logs      Retrieve queries from mql server
  unpin-model            Unpin a model id
  validate-configs       Validate yaml configs found in specified config...
  version                Print the current version of the MQL CLI.

Examples:

mql query --metrics messages --dimensions ds --limit 10
mql materialize --materialization-name name --start-time 2021-10-01 --end_time 2021-11-01

Python Library

Examples:

# Instantiating the object manually
from transform.mql import MQLClient

"""
Pass: 
  - api_key if you want to manually provide an api_key
  - mql_server_url if you want to override the mql server

DEFAULT: values in ~/.transform/config.yml
"""
mql = MQLClient(api_key: Optional[str], mql_server_url: Optional[str])

df = mql.query(metrics=["messages"], dimensions=["ds"], where="is_thread")
# If authentication already exists in config
from transform import mql

df = mql.query(metrics=["messages"], dimensions=["ds"], where="is_thread")

API References

See more details at https://docs.transform.co/

Download files

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

Source Distribution

transform-1.4.3.tar.gz (43.9 kB view details)

Uploaded Source

File details

Details for the file transform-1.4.3.tar.gz.

File metadata

  • Download URL: transform-1.4.3.tar.gz
  • Upload date:
  • Size: 43.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for transform-1.4.3.tar.gz
Algorithm Hash digest
SHA256 4fd412737e3979349a0db419610b2256231c7bc93f847e5aa4faca25e9558dc7
MD5 f3050f2722e4fdcd7fc5cc3d4ebcb676
BLAKE2b-256 29b411e64347ab5e1b7a168c2fe537fed41a72876ff4576dd7a8a18c37017b0c

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.4.3 This release

1 file

1.4.2

1 file

1.4.0

1 file

1.3.0

1 file

1.2.0

1 file

1.1.2

1 file

1.1.1

1 file

1.1.0.dev0

1 file

1.0.33

1 file

1.0.32

1 file

1.0.31

1 file

1.0.30

1 file

1.0.29

1 file

1.0.28

1 file

1.0.27

1 file

1.0.26

1 file

1.0.25

1 file

1.0.23

1 file

1.0.22

1 file

1.0.21

1 file

1.0.20

1 file

1.0.19

1 file

1.0.18

1 file

1.0.17

1 file

1.0.16

1 file

1.0.15

1 file

1.0.14

1 file

1.0.13

1 file

1.0.12

1 file

1.0.11

1 file

1.0.10

1 file

1.0.9

1 file

1.0.8

1 file

1.0.7

1 file

1.0.6

1 file

1.0.5

1 file

1.0.4

1 file

1.0.3

1 file

1.0.2

1 file

1.0.1

1 file

1.0.0

1 file

0.0.60

1 file

0.0.59

1 file

0.0.58

1 file

0.0.57

1 file

0.0.56

1 file

0.0.55

1 file

0.0.54

1 file

0.0.53

1 file

0.0.52

1 file

0.0.51

1 file

0.0.50

1 file

0.0.49

1 file

0.0.48

1 file

0.0.47

1 file

0.0.46

1 file

0.0.45

1 file

0.0.44

1 file

0.0.43

1 file

0.0.42

1 file

0.0.41

1 file

Supported by

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