singer.io将数据加载到雪花中的目标

target-snowflake的Python项目详细描述


目标雪花

CircleCI

PyPI version

雪花靶子,用于由歌手轻拍产生的歌手流。

雪花连接器

Docs

安装

pip install target-snowflake

用法

  1. 跟随 Singer.io Best Practices 用于设置单独的taptarget虚拟机以避免版本 冲突。

  2. 在处创建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

已指定配置文件中可指定的字段 在这里。

FieldTypeDefaultDetails
^{}^{}^{}^{} might require the ^{} and ^{} platform where your account is located, in the form of: ^{} (e.g. ^{}) Refer to Snowflake's documentation about Account
^{}^{}^{}
^{}^{}^{}
^{}^{}^{}
^{}^{}^{}
^{}^{}^{}
^{}^{}^{}Include ^{} in your config to disable crashing on invalid records
^{}^{}^{}Include a positive value ^{} in your config to allow at most ^{} invalid records per stream before giving up.
^{}^{}^{}Include ^{} in your config to disable Singer Usage Logging.
^{}^{}^{}The level for logging. Set to ^{} to get things like queries executed, timing of those queries, etc. See Python's Logger Levels for information about valid values.
^{}^{}^{}Whether the Target should create tables which have no records present in Remote.
^{}^{}^{}Whether the Target should emit ^{} messages to stdout for further consumption. In this mode, which is on by default, STATE messages are buffered in memory until all the records that occurred before them are flushed according to the batch flushing schedule the target is configured with.
^{}^{}^{}See ^{} below

s3 config.json

FieldTypeDefaultDetails
^{}^{}^{}
^{}^{}^{}
^{}^{}^{}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来使用 有时查询数据时会遇到麻烦的引号
  • 每个流都需要一个JSON Schema
  • 只有字符串,日期时间格式的字符串,整数,数字,布尔值, 支持对象和具有或不具有空值的数组类型。数组可以 列出任何其他类型,包括 项目。
    • 工作的json模式类型示例
      • ['number']
      • ['string']
      • ['string', 'null']
      • ['string', 'integer']
      • ['integer', 'number']
    • json模式类型的exmaple,不起作用
      • ['any']
      • ['null']
  • 不支持json模式组合,如anyOfallOf
  • 部分支持JSON架构$ref:
    • 注意:以下限制已知为not优雅地失败
    • 现在不能有任何循环或递归$refs
    • $refs必须存在于架构中:
      • uri不工作
      • 如果$ref被破坏,则认为该行为是意外的
  • 任何是string\\N的值都将作为文本null

赞助

目标雪花由Data Mill(Data Mill Services,LLC)赞助datamill.co

data mill帮助企业利用现代数据基础设施和数据科学为分析、产品和服务提供动力。


版权所有Data Mill Services,LLC 2018

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

推荐PyPI第三方库


热门话题
java为扫描器的输入生成字符序列   hibernate中的java实体合并   如何使变量在Java文件中成为全局变量   java JVM崩溃“异常访问冲突”   向MediaMetadataRetriever中的setDataSource()发送Uri时发生java IllegalArgumentException   java没有节约协议?   用户界面java gui帮助actionlistener   java索引越界异常,即使大小小于索引?   在C++中使用java的困惑   在普通java编码中插入图像   JDBC上的java缓存数据   在Java中,在字符串的特定位置替换子字符串   java在运行elasticsearch集群时遇到Perm Gen空间问题   java Soap故障跟踪   java拆分器。固定长度(int)。拆分(字符串)   java获取jar内部包的路径