teragrep

This command is experimental

Definition

teragrep is the Teragrep platform command. It can change the way queries are executed, act as a datasource and aid with debugging.

With teragrep command, you can:

  • clear - clear

  • debug - debug

  • exec - execute

  • get - get

  • set - set

Currently, clear, debug and set are not implemented in Teragrep.

Examples

The syntax for teragrep is:

%dpl
| teragrep [clear/debug/exec/get/set] [functionality] [functionality's parameters]

HDFS

You can save, load and delete your dataset by using Hadoop Distributed File System (HDFS). Use exec hdfs with teragrep command to access HDFS features.

Save

Use save to save your dataset with HDFS. You need an exact path where the dataset is saved to.

%dpl
| makeresults
| eval firstName = "John", lastName = "Doe"
| teragrep exec hdfs save /tmp/customData
hdfs save example

Only users with admin rights can save to /path

You can define how long the dataset is stored with retention functionality.

%dpl
| makeresults
| eval firstName = "John", lastName = "Doe"
| teragrep exec hdfs save /tmp/test retention=1h

Currently, retention functionality does not work. This will be fixed before the community release.

Load

Use load to load the saved dataset. You need an exact path from where the dataset is loaded.

%dpl
| teragrep exec hdfs load /tmp/customData
hdfs load example

Delete

Not yet implemented

Use delete to delete the saved dataset. You need an exact path from where the dataset is deleted.

%dpl
| teragrep exec hdfs delete /tmp/test

Kafka

You can save your dataset to Kafka or delete it from there. Use exec kafka with teragrep command to access Kafka features.

Save

Use save to save your dataset to Kafka.

%dpl
| makeresults
| eval firstName = "John"
| eval lastName = "Doe"
| teragrep exec kafka save customTopic
example of kafka save

Delete

Not yet implemented

System Version

You can fetch the system version by using get functionality.

%dpl
| teragrep get system version
example of system version

Further Reading