从CSV文件简化到Tableau超格式的数据管理的包装器
tableau-hyper-management的Python项目详细描述
表超管理
这个存储库是用来做什么的?在
基于Tableau Hyper API这个存储库旨在管理将任何CSV文件导入Tableau超格式(与Tableau桌面/服务器一起使用)且配置最少(因为列检测、内容类型检测和内容重新解释是包含逻辑的一部分),因此可以加快构建提取的过程。在
发布数据源脚本还允许获取结果Tableau超文件并将其发布到Tableau服务器。这要归功于出色的Tableau支持的逻辑:Tableau Server Client (Python)包。在
This features allows you to automate tedious tasks to refresh data on the server side (one real-life example could be a daily/weekly snapshot of a dynamically changing content to capture big variations in time in Development or Quality layer before reaching Production environment).
我该和谁说话?在
存储库所有者是:Daniel Popiniuc
实现的功能
- 基于单个输入参数(可以是特定的或包含文件模式的)从单个或多个CSV文件转换输入数据
- 基于ont第一行内容的动态场检测,并提供场分离器(战略优势)
- 动态高级内容类型检测,包括以下数据类型:整数、浮点、date-iso8601、date-DMY短划线、date-DMY-dot、date-DMY斜杠、date-MDY、date-MDY-medium、date-MDY-long、time-12、time-12-micro-sec、time-24、time-24-micro-sec、datetime-iso8601-micro-sec、datetime-MDY、datetime-MDY-micro-sec,datetime MDY medium,datetime MDY中微秒,datetime MDY long,datetime MDY long微秒,字符串
- 支持任何数据类型的空字段内容(需要重新解释CSV才能被Hyper Inserter接受,以确保考虑INT或DOUBLE数据类型)
- 使用Panda包,数据帧速度快,灵活性强
- 记录整个逻辑细节的日志文件(对于跟踪和调试都非常有用)
- 大多数的逻辑动作都不是针对性能测量的,所以你可以更好地计划你的需求
- 将Tableau摘要(超格式)发布到Tableau服务器(指定站点和项目)
- 检测操作系统当前区域语言并使用该语言记录所有反馈详细信息。在
支持的文件类型组合
Output (right) File Type/Format Input (down) | Comma Separated Values | Excel | JSON | Parquet | Pickle | Tableau Extract (Hyper) |
---|---|---|---|---|---|---|
Comma Separated Values | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
Excel | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :no_entry: |
JSON | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :no_entry: |
Parquet | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
Pickle | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
Tableau Extract (Hyper) | :heavy_check_mark: | :no_entry: | :no_entry: | :no_entry: | :heavy_check_mark: | :soon: |
安装
安装步骤如下:
- 确保您的系统有可用的git:
$ git --version
If you get an error depending on your system you need to install it.
For Windows you can do so from Git for Windows;
- 从Github下载此项目:
conventions used:
<content_within_html_tags> = variables to be replaced with user values relevant strings
- 使用从项目根文件夹执行的以下命令创建Python虚拟环境:
$ python(.exe) -m venv <local_folder_on_your_computer_for_this_package>/virtual_environment/
- 使用从新创建的虚拟环境和脚本子文件夹中执行的以下命令升级pip(pip是Python包的包管理器)和SetupTools:
$ <local_path_of_this_package>/virtual_environment/Scripts/python(.exe) -m pip install --upgrade pip
$ <local_path_of_this_package>/virtual_environment/Scripts/pip(.exe) install --upgrade setuptools
- 使用从项目根文件夹执行的以下命令安装项目必备组件:
$ <local_path_of_this_package>/virtual_environment/Scripts/python(.exe) <local_path_of_this_package>/setup.py install
- 确保所有本地化源文件都正确编译,以便包正常工作
$ <local_path_of_this_package>/virtual_environment/Scripts/python(.exe) <local_path_of_this_package>/sources/localizations_compile.py
保持本地包最新
安装包后,跟上最新版本非常重要,因为这样可以解决重要的代码改进和潜在的安全问题,这可以通过以下命令实现:
$ git --work-tree=<local_path_of_this_package> --git-dir=<local_path_of_this_package>/.git/ --no-pager pull origin master
- 使用的约定:
- <;content_within_html_tags>;=要替换为用户值相关字符串的变量
使用
将CSV文件转换为Tableau Extract(超格式)
$ <local_path_of_this_package>/virtual_environment/Scripts/python(.exe) <local_path_of_this_package>/tableau_hyper_management/converter.py --input-file <full_path_and_file_base_name_to_file_having_content_as_CSV> --input-file-format csv|excel|json|pickle --input-file-compression infer|bz2|gzip|xz|zip --csv-field-separator ,|; --output-file <full_path_and_file_base_name_to_generated_file>(.hyper) --output-file-format csv|excel|hyper|json|pickle --output-file-compression infer|bz2|gzip|xz|zip (--output-log-file <full_path_and_file_name_to_log_running_details>) (--unique-values-to-analyze-limit 100|200=default_value_if_omitted|500|1000)
- 使用的约定:
- (圆括号内的内容)=可选
- <;content_within_html_tags>;=要替换为用户值相关字符串的变量
- 单个垂直管道=备选方案的分隔符
将Tableau摘要(超格式)发布到Tableau服务器
$ <local_path_of_this_package>/virtual_environment/Scripts/python(.exe) <local_path_of_this_package>/tableau_hyper_management/publish_data_source.py --input-file <full_path_and_file_base_name_with_tableau_extract>(.hyper) --tableau-server <tableau_server_url> --tableau-site <tableau_server_site_to_publish_to> --tableau-project <tableau_server_project_to_publish_to> --publishing-mode Append|CreateNew|Overwrite==default_if_omitted --input-credentials-file %credentials_file% (--output-log-file <full_path_and_file_name_to_log_running_details>)
- 使用的约定:
- (在趵rou内的内容nd_括号)=可选
- <;content_within_html_tags>;=要替换为用户值相关字符串的变量
- 单个垂直管道=备选方案的分隔符
详细的变更日志/发布
要添加的计划功能(当然,如果时间允许/将感谢帮助/投票|欢迎反馈)
- 需要识别的其他格式,如:
- 浮子美国千分仪
- 浮动欧盟
- 浮子欧盟千分仪
- 地理标识(国家、美国-邮政编码)
要请求的功能模板
所需软件/驱动程序/配置
使用的参考文献
- 项目
标签: