数据世界的歌手目标
target-datadotworld的Python项目详细描述
向data.world写入数据的Singer目标
如何使用
target-datadotworld与任何其他Singer Tap一起存储在data.world上 从SalesForce、HubSpot、Marketo、MySQL和more等源提取的数据。
安装并运行
首先,确保系统上安装了Python3.6。
target-datadotworld可以在任何歌手点击时运行,但我们将使用 tap-fixerio它提取货币汇率数据-作为一个例子。
这些命令将使用pip安装tap-fixerio和target-datadotworld, 然后一起运行它们,将tap-fixerio的输出管道化为 target-datadotworld:
? pip install target-datadotworld tap-fixerio ? tap-fixerio | target-datadotworld -c config.json INFO Replicating the latest exchange rate data from fixer.io INFO Tap exiting normally
数据将写入config.json中指定的数据集。在本例中,在名为exchange-rates的流下。
如果您使用的是不同的tap,请在final中替换tap-fixerio。 上面的命令和用来运行点击的命令。
配置
目标datadotworld需要用于存储data.world API令牌和数据集信息的配置文件。
需要以下属性:
- api_token:你的数据世界API token
- dataset_id:要存储数据的数据集的标题。只能包含小写字母、数字和破折号。
此外,还可以提供以下可选属性。
- dataset_owner:如果与api令牌的所有者不同(例如,如果数据集是在组织帐户下访问/创建的,而不是用户自己的帐户下访问/创建的)
示例:
{"api_token":"your_token","dataset_id":"fixerio-data","dataset_owner":"my-company",}