Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
K
kb
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 2
    • Issues 2
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Operations
    • Operations
    • Incidents
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • granite
  • kb
  • Wiki
    • Data_pump
  • quick_start

quick_start · Changes

Page history
add:data_pump quick start authored Aug 26, 2021 by 吴一博's avatar 吴一博
Show whitespace changes
Inline Side-by-side
Showing with 33 additions and 4 deletions
+33 -4
  • data_pump/quick_start.md data_pump/quick_start.md +33 -4
  • No files found.
data_pump/quick_start.md
View page @ 189b471a
......@@ -3,6 +3,7 @@
## 基本概念
### RFW 结构
输入(reader) -> 处理(filter) -> 输出(writer)
IPO (input - process - output) 模型
......@@ -31,8 +32,8 @@ filter3 --> writer3
```
### 流转的数据结构
单条
批量
#### 单条
#### 批量
## 配置
### 变量
......@@ -141,7 +142,6 @@ filter_query_query_contact_record:
### 驱动非scrapy爬虫
基本思路: 使用redis reader作为爬虫任务队列。使用爬虫实现为UDM模块。使用kafka writer保存结果
```yaml
pump:
reader:
......@@ -155,5 +155,34 @@ filter_query_query_contact_record:
- kafka_result
```
### 爬虫任务提交
### 想实现的功能data_pump还没有,怎么办?
试试eval
```yaml
trans_fields:
class: field.Eval
init:
pc_daily_pv: "baidu_planner['pc_pv']//30"
mobile_daily_pv: "baidu_planner['mobile_pv']//30"
collect_date: "spider_time[:10]"
```
### 想对数据转换一下结构
试试jsonpath
```yaml
ad_word_performance_fields:
class: field.JsonPathExtract
init:
word: "word"
label: "baidu_planner.show_reason"
competition: "baidu_planner.all_competition"
pc_pv: "pc_daily_pv"
mobile_pv: "mobile_daily_pv"
bid: "baidu_planner.all_bid"
week_index: "trends_attention.week_index"
collect_date: "collect_date"
```
### 爬虫任务提交
Clone repository
  • README
  • basic_guidelines
  • basic_guidelines
    • basic_guidelines
    • dev_guide
    • project_build
    • 开发流程
  • best_practice
  • best_practice
    • AlterTable
    • RDS
    • azkaban
    • create_table
    • design
    • elasticsearch
    • elasticsearch
      • ES运维
    • logstash
View All Pages