edit-icon download-icon

Configure Stream reader

Last Updated: Dec 04, 2017

The Stream Reader plug‑in provides the ability to automatically generate data from memory. It is mainly applicable to performance testing for data synchronization and basic functional testing.

Stream Reader supports the following data types:

Type Description
string String
long Long
date Date
bool Boolean
bytes Bytes

Parameter description

  • column

    • Description: The column data and type of generated source data. Multiple columns can be configured.

      You can set to generate random strings and specify the corresponding range. The example is as follows:

      1. ```json
      2. "column" : [
      3. {
      4. "random": "8,15"
      5. },
      6. {
      7. "random": "10,10"
      8. }
      9. ]
      10. ```

      Configuration item description:

      • “random”: “8,15” means to generate a random string with a length of 8-15 bytes.
      • “random”: “10,10” means to generate a random string with a length of 10 bytes.
    • Required: Yes

    • Default value: None
  • sliceRecordCount

    • Description: Number of columns generated cyclically

    • Required: Yes

    • Default value: None

Development in wizard mode

Currently, development in wizard mode is not supported.

Development in script mode

Configure a synchronization job to read data from memory:

  1. {
  2. "type": "job",
  3. "version": "1.0",
  4. "configuration": {
  5. "settting": {
  6. "key": "value"
  7. },
  8. "reader": {
  9. "name": "streamreader",
  10. "parameter": {
  11. "column": [
  12. {
  13. "value": "DataX",
  14. "type": "string"
  15. },
  16. {
  17. "value": 19890604,
  18. "type": "long"
  19. },
  20. {
  21. "value": "1989-06-04 00:00:00",
  22. "type": "date"
  23. },
  24. {
  25. "value": true,
  26. "type": "bool"
  27. },
  28. {
  29. "value": "test",
  30. "type": "bytes"
  31. }
  32. ],
  33. "sliceRecordCount": 10000
  34. }
  35. },
  36. "writer": {
  37. }
  38. }
  39. }
Thank you! We've received your feedback.