按照一个YAML格式的控制文件的定义运行一个装载作业。

模板

  1. ---
  2. VERSION: 1.0.0.1
  3. DATABASE: db_name
  4. USER: db_username
  5. HOST: master_hostname
  6. PORT: master_port
  7. GPLOAD:
  8. INPUT:
  9. - SOURCE:
  10. LOCAL_HOSTNAME:
  11. - hostname_or_ip
  12. PORT: http_port
  13. | PORT_RANGE: [start_port_range, end_port_range]
  14. FILE:
  15. - /path/to/input_file
  16. SSL: true | false
  17. CERTIFICATES_PATH: /path/to/certificates
  18. - FULLY_QUALIFIED_DOMAIN_NAME: true | false
  19. - COLUMNS:
  20. - field_name: data_type
  21. - TRANSFORM: 'transformation'
  22. - TRANSFORM_CONFIG: 'configuration-file-path'
  23. - MAX_LINE_LENGTH: integer
  24. - FORMAT: text | csv
  25. - DELIMITER: 'delimiter_character'
  26. - ESCAPE: 'escape_character' | 'OFF'
  27. - NULL_AS: 'null_string'
  28. - FORCE_NOT_NULL: true | false
  29. - QUOTE: 'csv_quote_character'
  30. - HEADER: true | false
  31. - ENCODING: database_encoding
  32. - ERROR_LIMIT: integer
  33. - LOG_ERRORS: true | false
  34. EXTERNAL:
  35. - SCHEMA: schema | '%'
  36. OUTPUT:
  37. - TABLE: schema.table_name
  38. - MODE: insert | update | merge
  39. - MATCH_COLUMNS:
  40. - target_column_name
  41. - UPDATE_COLUMNS:
  42. - target_column_name
  43. - UPDATE_CONDITION: 'boolean_condition'
  44. - MAPPING:
  45. target_column_name: source_column_name | 'expression'
  46. PRELOAD:
  47. - TRUNCATE: true | false
  48. - REUSE_TABLES: true | false
  49. - STAGING_TABLE: external_table_name
  50. - FAST_MATCH: true | false
  51. SQL:
  52. - BEFORE: "sql_command"
  53. - AFTER: "sql_command"