从CSV文件简化到Tableau超格式的数据管理的包装器

tableau-hyper-management的Python项目详细描述


表超管理

Scrutinizer Code QualityBuild StatusCrowdin

这个存储库是用来做什么的?在

基于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 ValuesExcelJSONParquetPickleTableau 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下载此项目:
^{pr2}$

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>;=要替换为用户值相关字符串的变量
    • 单个垂直管道=备选方案的分隔符

详细的变更日志/发布

CHANGE_LOG.md

要添加的计划功能(当然,如果时间允许/将感谢帮助/投票|欢迎反馈)

  • 需要识别的其他格式,如:
    • 浮子美国千分仪
    • 浮动欧盟
    • 浮子欧盟千分仪
    • 地理标识(国家、美国-邮政编码)

要请求的功能模板

使用feature_request.md

所需软件/驱动程序/配置

readme_software.md

使用的参考文献

readme_reference.md

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java Spinner选定值未上载到firebase数据库   java如何通过bukkit中的配置添加消息?   java在SharedReference中保存列表的泛型类型   javascript Java小程序未定义   swt在Java中构建控制台应用程序   java OAuth同意屏幕没有突然显示,没有错误?   java webview选择文件安卓不工作   java Spring boot JPA如何从同一连接添加多个数据库?   java JDBC DB2驱动程序计时器线程处于阻塞状态   java我在vscode中运行flatter时看到一个错误在phone中运行应用程序somone能否帮助我plz   Java:生成JSON:如何避免生成不完整的JSON   java Date compareTo()方法始终返回1   当使用Junit runner运行测试时,java Spring自动连线失败   java Android/Sockets如何将信息从主UI线程发送到socket线程?   java Android内存声明全局变量   java如何在JBoss中拥有多个具有相同JNDI名称的数据源?   python在Java中嵌入CPython时,为什么会挂起?   java如何提供深度模拟对象?   java“find:smallint,expected:integer”Hibernate对informix数据库的验证在短时间内失败