一个管理Google云数据目录标签模板导出脚本的包

datacatalog-tag-template-exporter的Python项目详细描述


Datacatalog标记模板导出器

CircleCIPyPiLicenseIssues

管理Google云数据目录标记模板导出脚本的Python包。在

免责声明:这不是官方支持的谷歌产品。

目录


在云Shell中执行

# Set your SERVICE ACCOUNT, for instructions go to 1.3. Auth credentials# This name is just a suggestion, feel free to name it following your naming conventionsexportGOOGLE_APPLICATION_CREDENTIALS=~/datacatalog-tag-template-exporter-sa.json

# Install datacatalog-tag-template-exporter
pip3 install datacatalog-tag-template-exporter --user

# Add to your PATHexportPATH=~/.local/bin:$PATH# Look for available commands
datacatalog-tag-template-exporter --help

1。环境设置

1.1条。Python+virtualenv

使用virtualenv是可选的,但强烈建议您除非使用Docker。在

1.1.1。安装Python 3.6+

1.1.2。获取源代码

^{pr2}$

下一步中以./开头的所有路径都是相对于datacatalog-tag-template-exporter 文件夹。

1.1.3。创建并激活一个独立的Python环境

pip install --upgrade virtualenv
python3 -m virtualenv --python python3 env
source ./env/bin/activate

1.1.4。安装软件包

pip install --upgrade .

1.2条。Docker

Docker可以作为运行脚本的替代方法。在这种情况下,请忽略 Virtualenv安装说明。在

1.3条。身份验证凭据

1.3.1。创建服务帐户并授予其以下角色

  • 数据目录管理员

1.3.2。下载一个JSON密钥并将其另存为

此名称只是一个建议,请按照您的命名约定随意命名

  • ./credentials/datacatalog-tag-template-exporter-sa.json

1.3.3。设置环境变量

如果使用的是Docker,则可以跳过此步骤。

exportGOOGLE_APPLICATION_CREDENTIALS=~/credentials/datacatalog-tag-template-exporter-sa.json

2。将模板导出到CSV文件

2.1条。将创建一个表示模板的CSV文件

模板由表示其所有字段所需的任意多行组成。列是 描述如下:

ColumnDescription
template_nameResource name of the Tag Template for the Tag.
display_nameResource name of the Tag Template for the Tag.
field_idId of the Tag Template field.
field_display_nameDisplay name of the Tag Template field.
field_typeType of the Tag Template field.
enum_valuesValues for the Enum field.

2.2条。运行datacatalog标记模板导出器脚本

  • Python+virtualenv
datacatalog-tag-template-exporter tag-templates export --project-ids my-project --file-path CSV_FILE_PATH

历史

0.1.0(2020-04-15)

  • PyPI的第一个版本。在

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

推荐PyPI第三方库


热门话题
java如何使用Ibatis在插入时返回ID(使用返回关键字)   java(org.hibernate.TransactionException)org。冬眠TransactionException:事务未成功启动   java小程序jwindow始终位于JNLP顶部   在Java中重新解析JSON对象?   java单击后将ListView数据移动到新屏幕   Mule ESB中的java WSA寻址特性   Java,对象编程:获取返回0值的方法   hibernate的Java通用问题,如何处理T get(K id)   java在使用超级CSV读取CSV时忽略引用   ssh使用Java远程运行命令   java如何向具体用户发送websocket消息?   在JAVA中,我可以在不指定的情况下使用条件运算符吗?