4 Local Tutorial Reference data
Kwangje Cho редактировал(а) эту страницу 2019-10-04 12:03:17 -07:00

The Reference tab is where you can add static data to join with your streaming data.

In this tutorial, you'll learn to:

  • Add Reference data
  • Use the Editor features to join to your Reference Data

Adding Reference Data

  • Open your Flow and go to the Reference tab
  • Add a new CSV/TSV file
    Add Reference file
  • Given a csv file that looks as such located in /app/myRefData.csv in the container. (See FAQ how to upload a file to your docker.)
    Add Reference file
    You can use the following example:
temperature	tempDescription
32      	freezing
70      	balmy
98      	body
212     	boiling
  • Set up your CSV by setting up:
    • Alias: this will be how to use the reference data in your query, for example: myRefData
    • Path: where to load the reference data from, for example '/app/myRefData.csv';
    • Delimiter: data can be comma or tab limited
    • Header: if your data has a header row
      Add Reference file
  • Open the Query tab of your flow
  • You can now join your streaming data to the reference data by doing a JOIN:
    JOIN myRefData ON myRefData.temperature;

Add Reference file

  • Add an output statement to the code:
    OUTPUT extendedTemperature TO myOutput;
  • Click Deploy

Your data now has reference data joined to it. You can view the results by looking at the local file output as described in this tutorial.

Other Links