singer.io将数据加载到雪花中的目标
target-snowflake的Python项目详细描述
目标雪花
雪花靶子,用于由歌手轻拍产生的歌手流。
雪花连接器
安装
pip install target-snowflake
用法
跟随 Singer.io Best Practices 用于设置单独的
tap
和target
虚拟机以避免版本 冲突。在处创建config file
~/singer.io/target_snowflake_config.json
带雪花连接 信息和目标雪花模式和仓库。{"snowflake_account":"https://XXXXX.snowflakecomputing.com","snowflake_username":"myuser","snowflake_password":"1234","snowflake_database":"my_analytics","snowflake_schema":"mytapname","snowflake_warehouse":"dw"}
1. Run `target-snowfkajke` against a [Singer](https://singer.io) tap.
```bash
~/.virtualenvs/tap-something/bin/tap-something \
| ~/.virtualenvs/target-snowflake/bin/target-snowflake \
--config ~/singer.io/target_snowflake_config.json >> state.json
如果您运行的是Windows,则以下内容是等效的:
venvs\tap-exchangeratesapi\Scripts\tap-exchangeratesapi.exe | ^
venvs\target-snowflake\Scripts\target-snowlfake.exe ^
--config target_snowflake_config.json
配置json
已指定配置文件中可指定的字段 在这里。
Field | Type | Default | Details |
---|---|---|---|
^{ | ^{ | ^{ | ^{ |
^{ | ^{ | ^{ | |
^{ | ^{ | ^{ | |
^{ | ^{ | ^{ | |
^{ | ^{ | ^{ | |
^{ | ^{ | ^{ | |
^{ | ^{ | ^{ | Include ^{ |
^{ | ^{ | ^{ | Include a positive value ^{ |
^{ | ^{ | ^{ | Include ^{ |
^{ | ^{ | ^{ | The level for logging. Set to ^{ |
^{ | ^{ | ^{ | Whether the Target should create tables which have no records present in Remote. |
^{ | ^{ | ^{ | Whether the Target should emit ^{ |
^{ | ^{ | ^{ | See ^{ |
s3 config.json
Field | Type | Default | Details |
---|---|---|---|
^{ | ^{ | ^{ | |
^{ | ^{ | ^{ | |
^{ | ^{ | ^{ | Bucket where staging files should be uploaded to. |
^{ | ^{ | ^{ | Prefix for staging file uploads to allow for better delineation of tmp files |
限制
- Snowflake SQL Identifiers:
- 尽管snowflake支持带引号的标识符具有非字母数字值,
target-snowflake
限制 小写字母数字和下划线的标识符 - 这样做是为了简化雪花中的可查询性/可用性,从而不需要用户have来使用 有时查询数据时会遇到麻烦的引号
- 尽管snowflake支持带引号的标识符具有非字母数字值,
- 每个流都需要一个JSON Schema。
- 只有字符串,日期时间格式的字符串,整数,数字,布尔值,
支持对象和具有或不具有空值的数组类型。数组可以
列出任何其他类型,包括
项目。
- 工作的json模式类型示例
['number']
['string']
['string', 'null']
['string', 'integer']
['integer', 'number']
- json模式类型的exmaple,不起作用
['any']
['null']
- 工作的json模式类型示例
- 不支持json模式组合,如
anyOf
和allOf
。 - 部分支持JSON架构$ref:
- 注意:以下限制已知为not优雅地失败
- 现在不能有任何循环或递归
$ref
s $ref
s必须存在于架构中:- uri不工作
- 如果
$ref
被破坏,则认为该行为是意外的
- 任何是
string
\\N
的值都将作为文本null
赞助
目标雪花由Data Mill(Data Mill Services,LLC)赞助datamill.co。
data mill帮助企业利用现代数据基础设施和数据科学为分析、产品和服务提供动力。
版权所有Data Mill Services,LLC 2018