用于将elasticsearch数据导出到csv的cli客户端

bq-sqoop的Python项目详细描述


Build StatusLatest VersionPython versionsPackage statusPackage coverage

这个项目只需要一个简单的cli命令来使用cpu从es、postgres等导出数据, 它旨在用于数据工作流中提取数据

这仍然是早期的发展和有点粗糙的边缘。 任何错误报告、功能建议等都非常感谢。:)

安装和使用

安装 因为这是PyPi上提供的Python包,所以您可以像 任何其他python包。

# on modern systems with Python you can install with pip
$ pip install bq-sqoop
# on older systems you can install using easy_install
$ easy_install bq-sqoop

用法 命令应该主要是自我记录它们的定义, 通过help命令提供。

$ bq-sqoop
usage: bq-sqoop -h

arguments:
    -h, --help            show this help message and exit
    -v, --version         Show version and exit.
    -c CONFIG_FILE,       --config_file CONFIG_FILE
                            Toml Config file for the bq-sqoop job.Can be a local
                            file path or a public http link or a GCS fileeg,
                            https://storage.googleapis.com/sample_config.toml or
                            gs://gcs_bucket/sample_config.toml or
                            /tmp/sample_config.toml
    -d, --debug           Debug mode on.

配置文件

您可以在https://github.com/therako/bqsqoop-examples.git找到一个示例存储库

大查询

[bigquery]project_id="destination-google-project-id"dataset_name="destination-dataset"table_name="destination-table-name"gcs_tmp_path="gs://gcs-tmp-bucket/bqsqoop/"

提取器

弹性搜索

[extractor.elasticsearch]url="localhost:9200,localhost:9201"index="source-es-index-name"timeout="60s"scroll_size=500fields=["_all"]

sql

[extractor.sql]sql_bind="postgresql+psycopg2://username:password@127.0.0.1:5432/database"query="select * from table_name"

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

推荐PyPI第三方库


热门话题
java用变化的替换字符串替换子字符串   从数据库中断中恢复的oracle Java DAL?   Android/Java页边距位于左/右/底部   java如何用相同的源代码构建不同的APK?(我发现了一个错误)   java正则表达式,仅当字符串以一行中的3个数字开头时才匹配第一个数字   使用以xml为输入的给定端点调用java中的rest-ful web服务?   java长字符串转换为UTF8引发异常   java如何使用截取方法获取ArrayList   java将计算列添加到可观察列表中   正则表达式如何在java正则表达式中使用组?   java正则表达式只接受字母表和空格,不允许在字符串的开头和结尾使用空格   java简单onclick按钮在安卓中不起作用   java如何在Spring中只实现Crudepository的特定方法?   java无法使用json对象NPE读取jsonarray   java我可以添加maven依赖项,这些依赖项被打包为除此之外的任何东西。罐子