prep2dbt


Nameprep2dbt JSON
Version 0.0.3 PyPI version JSON
download
home_page
SummaryTools for converting Tableau Prep flows to dbt models
upload_time2024-01-05 00:33:34
maintainer
docs_urlNone
author
requires_python>=3.11
licenseMIT License Copyright (c) 2023 t.kodama Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords tableau dbt
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # prep2dbt

Tableau Prepで作成されたフローをdbtモデルに変換するツールです。

ドキュメント
- https://hogehoge

ソースコード
- https://github.com/t0momi219/prep2dbt

サンプル(Superstoreを本ツールでdbtに変換)
- https://t0momi219.github.io/prep2dbt-demo/#!/overview

## モチベーション

Tableau PrepはGUIで簡易なデータパイプラインを作成・操作することに焦点が当てられたツールです。フローが複雑化してきた場合や複数人でフローを利用する場合には、これを維持・管理するために大きな労力を支払わなければなりません。

一方、dbtはSQLを中核にしたデータパイプラインを構築するためのツールとして知られています。コードのモジュール化、テスト、自動ドキュメント作成など、共同でパイプラインを管理するために必要となる様々な機能が提供されます。

このツールは、Tableau Prepの処理自体をdbtへ移植する、あるいはドキュメント化だけをdbtに頼るといった部分的な利用を支援するために作りました。

## 機能

### dbtモデル変換

フローファイルをdbtモデル(SQLファイルとYML構成ファイル)に変換します。

> [!NOTE]
> 
> dbtプロジェクト自体はこのツールでは作成しないため、プロジェクトは別で用意してください。
> 
> 初めてdbtを利用する方は、クイックスタートでプロジェクトの作り方を確認できます。

> [!caution]
> 
> Tableau Prepのフローファイルからは、変換に十分な情報が取得できない場合があります。
> (例えば、データソースがどのようなカラムを持っているのかといった情報がファイルに残っていません。)
> よって、変換後のSQLが完璧に動作する保証はありません。
> 
> また、多くの場合でTableau PrepのフローをそのままSQLにマッピングするだけのモデルは、パフォーマンスや再利用性の観点から推奨しません
> あくまで開発の土台として利用してください。


### 統計情報の出力

フローが利用している機能の一覧と、統計情報を出力します。これはフロー移行前に難易度や見積もりの測定を行ったり、リファクタリングのヒントとして活用するために利用できます。


## インストール

pipからインストールできます。

```sh
$ pip install prep2dbt
```

または、このプロジェクトをローカルでパッケージとして実行します。

```sh
$ git clone https://github.com/t0momi219/prep2dbt.git
$ python -m prep2dbt convert -f /path/to/file.tfl
```

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "prep2dbt",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.11",
    "maintainer_email": "",
    "keywords": "Tableau,dbt",
    "author": "",
    "author_email": "Tomomi Kodama <t.kodama@datumstudio.jp>",
    "download_url": "https://files.pythonhosted.org/packages/d4/81/d5698eb35dd054e78cd90a3e8fad6af37c0e5a3fcb4448ccde844eb6a4fc/prep2dbt-0.0.3.tar.gz",
    "platform": null,
    "description": "# prep2dbt\n\nTableau Prep\u3067\u4f5c\u6210\u3055\u308c\u305f\u30d5\u30ed\u30fc\u3092dbt\u30e2\u30c7\u30eb\u306b\u5909\u63db\u3059\u308b\u30c4\u30fc\u30eb\u3067\u3059\u3002\n\n\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\n- https://hogehoge\n\n\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\n- https://github.com/t0momi219/prep2dbt\n\n\u30b5\u30f3\u30d7\u30eb\uff08Superstore\u3092\u672c\u30c4\u30fc\u30eb\u3067dbt\u306b\u5909\u63db\uff09\n- https://t0momi219.github.io/prep2dbt-demo/#!/overview\n\n## \u30e2\u30c1\u30d9\u30fc\u30b7\u30e7\u30f3\n\nTableau Prep\u306fGUI\u3067\u7c21\u6613\u306a\u30c7\u30fc\u30bf\u30d1\u30a4\u30d7\u30e9\u30a4\u30f3\u3092\u4f5c\u6210\u30fb\u64cd\u4f5c\u3059\u308b\u3053\u3068\u306b\u7126\u70b9\u304c\u5f53\u3066\u3089\u308c\u305f\u30c4\u30fc\u30eb\u3067\u3059\u3002\u30d5\u30ed\u30fc\u304c\u8907\u96d1\u5316\u3057\u3066\u304d\u305f\u5834\u5408\u3084\u8907\u6570\u4eba\u3067\u30d5\u30ed\u30fc\u3092\u5229\u7528\u3059\u308b\u5834\u5408\u306b\u306f\u3001\u3053\u308c\u3092\u7dad\u6301\u30fb\u7ba1\u7406\u3059\u308b\u305f\u3081\u306b\u5927\u304d\u306a\u52b4\u529b\u3092\u652f\u6255\u308f\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002\n\n\u4e00\u65b9\u3001dbt\u306fSQL\u3092\u4e2d\u6838\u306b\u3057\u305f\u30c7\u30fc\u30bf\u30d1\u30a4\u30d7\u30e9\u30a4\u30f3\u3092\u69cb\u7bc9\u3059\u308b\u305f\u3081\u306e\u30c4\u30fc\u30eb\u3068\u3057\u3066\u77e5\u3089\u308c\u3066\u3044\u307e\u3059\u3002\u30b3\u30fc\u30c9\u306e\u30e2\u30b8\u30e5\u30fc\u30eb\u5316\u3001\u30c6\u30b9\u30c8\u3001\u81ea\u52d5\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u4f5c\u6210\u306a\u3069\u3001\u5171\u540c\u3067\u30d1\u30a4\u30d7\u30e9\u30a4\u30f3\u3092\u7ba1\u7406\u3059\u308b\u305f\u3081\u306b\u5fc5\u8981\u3068\u306a\u308b\u69d8\u3005\u306a\u6a5f\u80fd\u304c\u63d0\u4f9b\u3055\u308c\u307e\u3059\u3002\n\n\u3053\u306e\u30c4\u30fc\u30eb\u306f\u3001Tableau Prep\u306e\u51e6\u7406\u81ea\u4f53\u3092dbt\u3078\u79fb\u690d\u3059\u308b\u3001\u3042\u308b\u3044\u306f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u5316\u3060\u3051\u3092dbt\u306b\u983c\u308b\u3068\u3044\u3063\u305f\u90e8\u5206\u7684\u306a\u5229\u7528\u3092\u652f\u63f4\u3059\u308b\u305f\u3081\u306b\u4f5c\u308a\u307e\u3057\u305f\u3002\n\n## \u6a5f\u80fd\n\n### dbt\u30e2\u30c7\u30eb\u5909\u63db\n\n\u30d5\u30ed\u30fc\u30d5\u30a1\u30a4\u30eb\u3092dbt\u30e2\u30c7\u30eb\uff08SQL\u30d5\u30a1\u30a4\u30eb\u3068YML\u69cb\u6210\u30d5\u30a1\u30a4\u30eb\uff09\u306b\u5909\u63db\u3057\u307e\u3059\u3002\n\n> [!NOTE]\n> \n> dbt\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u81ea\u4f53\u306f\u3053\u306e\u30c4\u30fc\u30eb\u3067\u306f\u4f5c\u6210\u3057\u306a\u3044\u305f\u3081\u3001\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306f\u5225\u3067\u7528\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002\n> \n> \u521d\u3081\u3066dbt\u3092\u5229\u7528\u3059\u308b\u65b9\u306f\u3001\u30af\u30a4\u30c3\u30af\u30b9\u30bf\u30fc\u30c8\u3067\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u4f5c\u308a\u65b9\u3092\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002\n\n> [!caution]\n> \n> Tableau Prep\u306e\u30d5\u30ed\u30fc\u30d5\u30a1\u30a4\u30eb\u304b\u3089\u306f\u3001\u5909\u63db\u306b\u5341\u5206\u306a\u60c5\u5831\u304c\u53d6\u5f97\u3067\u304d\u306a\u3044\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002\n> \uff08\u4f8b\u3048\u3070\u3001\u30c7\u30fc\u30bf\u30bd\u30fc\u30b9\u304c\u3069\u306e\u3088\u3046\u306a\u30ab\u30e9\u30e0\u3092\u6301\u3063\u3066\u3044\u308b\u306e\u304b\u3068\u3044\u3063\u305f\u60c5\u5831\u304c\u30d5\u30a1\u30a4\u30eb\u306b\u6b8b\u3063\u3066\u3044\u307e\u305b\u3093\u3002\uff09\n> \u3088\u3063\u3066\u3001\u5909\u63db\u5f8c\u306eSQL\u304c\u5b8c\u74a7\u306b\u52d5\u4f5c\u3059\u308b\u4fdd\u8a3c\u306f\u3042\u308a\u307e\u305b\u3093\u3002\n> \n> \u307e\u305f\u3001\u591a\u304f\u306e\u5834\u5408\u3067Tableau Prep\u306e\u30d5\u30ed\u30fc\u3092\u305d\u306e\u307e\u307eSQL\u306b\u30de\u30c3\u30d4\u30f3\u30b0\u3059\u308b\u3060\u3051\u306e\u30e2\u30c7\u30eb\u306f\u3001\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u3084\u518d\u5229\u7528\u6027\u306e\u89b3\u70b9\u304b\u3089\u63a8\u5968\u3057\u307e\u305b\u3093\n> \u3042\u304f\u307e\u3067\u958b\u767a\u306e\u571f\u53f0\u3068\u3057\u3066\u5229\u7528\u3057\u3066\u304f\u3060\u3055\u3044\u3002\n\n\n### \u7d71\u8a08\u60c5\u5831\u306e\u51fa\u529b\n\n\u30d5\u30ed\u30fc\u304c\u5229\u7528\u3057\u3066\u3044\u308b\u6a5f\u80fd\u306e\u4e00\u89a7\u3068\u3001\u7d71\u8a08\u60c5\u5831\u3092\u51fa\u529b\u3057\u307e\u3059\u3002\u3053\u308c\u306f\u30d5\u30ed\u30fc\u79fb\u884c\u524d\u306b\u96e3\u6613\u5ea6\u3084\u898b\u7a4d\u3082\u308a\u306e\u6e2c\u5b9a\u3092\u884c\u3063\u305f\u308a\u3001\u30ea\u30d5\u30a1\u30af\u30bf\u30ea\u30f3\u30b0\u306e\u30d2\u30f3\u30c8\u3068\u3057\u3066\u6d3b\u7528\u3059\u308b\u305f\u3081\u306b\u5229\u7528\u3067\u304d\u307e\u3059\u3002\n\n\n## \u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\n\npip\u304b\u3089\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u304d\u307e\u3059\u3002\n\n```sh\n$ pip install prep2dbt\n```\n\n\u307e\u305f\u306f\u3001\u3053\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u30ed\u30fc\u30ab\u30eb\u3067\u30d1\u30c3\u30b1\u30fc\u30b8\u3068\u3057\u3066\u5b9f\u884c\u3057\u307e\u3059\u3002\n\n```sh\n$ git clone https://github.com/t0momi219/prep2dbt.git\n$ python -m prep2dbt convert -f /path/to/file.tfl\n```\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2023 t.kodama  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "Tools for converting Tableau Prep flows to dbt models",
    "version": "0.0.3",
    "project_urls": {
        "Changelog": "https://github.com/t0momi219/prep2dbt",
        "Documentation": "https://github.com/t0momi219/prep2dbt",
        "Issues": "https://github.com/t0momi219/prep2dbt",
        "Repository": "https://github.com/t0momi219/prep2dbt"
    },
    "split_keywords": [
        "tableau",
        "dbt"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7c7895bcbc84bda3c85302169d9c0b7c4b513b63970f065401725190fee807d6",
                "md5": "cc42c33d2b1a45b9df92ae0246a27a19",
                "sha256": "657c07de24b4b584f800d7d8c14b064c5f7bb14717ad9b42a28fa50f93ca272f"
            },
            "downloads": -1,
            "filename": "prep2dbt-0.0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "cc42c33d2b1a45b9df92ae0246a27a19",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 66347,
            "upload_time": "2024-01-05T00:33:32",
            "upload_time_iso_8601": "2024-01-05T00:33:32.285605Z",
            "url": "https://files.pythonhosted.org/packages/7c/78/95bcbc84bda3c85302169d9c0b7c4b513b63970f065401725190fee807d6/prep2dbt-0.0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d481d5698eb35dd054e78cd90a3e8fad6af37c0e5a3fcb4448ccde844eb6a4fc",
                "md5": "66efe18d6196c715d96fb92e613c770e",
                "sha256": "f93a0f0f6ffc5946e5f3f3218669cf4e3eb1135d084af85010eeff53b9e60dcd"
            },
            "downloads": -1,
            "filename": "prep2dbt-0.0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "66efe18d6196c715d96fb92e613c770e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11",
            "size": 57661,
            "upload_time": "2024-01-05T00:33:34",
            "upload_time_iso_8601": "2024-01-05T00:33:34.254494Z",
            "url": "https://files.pythonhosted.org/packages/d4/81/d5698eb35dd054e78cd90a3e8fad6af37c0e5a3fcb4448ccde844eb6a4fc/prep2dbt-0.0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-05 00:33:34",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "t0momi219",
    "github_project": "prep2dbt",
    "github_not_found": true,
    "lcname": "prep2dbt"
}
        
Elapsed time: 0.16298s