Skip to main content

Auto Build TI ElasticCube datamodel via API

Project description

td-ml-datamodel-create

Introduction

This Python Library allows you to define the main JSON params of a Treasure Insights Datamodel in a config.json file inside a Treasure Workflow Project and build datamodel automatically via API.

Inputs

  • config.json: the file that contains the needed params for Python code to read from and build the TI Datamodel. See below:
{
## -- (name of datamodel)
"model_name":  "datamodel_automated" 
,
## -- (list of tables to be added to datamodel)
"model_tables": [
  {"db":"reporting","name":"table_1"},
  {"db":"reporting","name":"table_2"}
                ] 
,
## -- (list of users to share datamodel with)
"shared_user_list": ["ENTER EMAIL HERE","ENTER EMAIL HERE"] 
,
## -- (list of columns you want to change datatype from raw table to datamodel. Ex. in "date" you provide column names that will be converted to `datetime`)
"change_schema_cols": {"date": ["ENTER_NAME"], "text": ["ENTER_NAME"], "float": ["ENTER NAME"], "bigint": ["ENTER NAME"]}
, 
## -- (if any joins were required you can add a list of table_name:join_key pairs)
"join_relations": {"pairs":
[ 
  {"db1": "reporting", "tb1":"table_1","join_key1":"user_id","db2": "reporting","tb2":"table_2","join_key2":"user_id"},
  {"db1": "reporting", "tb1":"table_1","join_key1":"date","db2": "reporting","tb2":"table_2","join_key2":"date"}
]
                  }
}

Copyright © 2022 Treasure Data, Inc. (or its affiliates). All rights reserved

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

td_ml_datamodel_create-0.1.8.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

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

td_ml_datamodel_create-0.1.8-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file td_ml_datamodel_create-0.1.8.tar.gz.

File metadata

  • Download URL: td_ml_datamodel_create-0.1.8.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.12

File hashes

Hashes for td_ml_datamodel_create-0.1.8.tar.gz
Algorithm Hash digest
SHA256 2e90fd618f9636ef895d5c4d4c7c092a104efce6c841448c4a44818be6c62f55
MD5 8d3fdfe60fd3513b18ed5f238a13d865
BLAKE2b-256 53c6e1426b599cee6b7e9c47008466cd99167cd118926a6b0fa3d08cfb1f147b

See more details on using hashes here.

File details

Details for the file td_ml_datamodel_create-0.1.8-py3-none-any.whl.

File metadata

File hashes

Hashes for td_ml_datamodel_create-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 cfe39db59ed393689e5ccae39cae3ecc5cf21e475df0f4af4fdf8e7a65bf9620
MD5 5310ef838a83157df8d6d35ca9c4c411
BLAKE2b-256 c621c20fdb9e6a6a89467f371630789b8dd766e5ab3f384b1d6879f93af77345

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