Advanced data filtering in Slack using /ipp pullquery

Large data pages don't always display well in a Slack channel. The /ipp pullquery command is flexible way to filter the data you're pulling into Slack using SQL-like queries. If you want a simple way to filter your data we recommend you try the /ipp pullrow command first.

You can try any of the examples in this article in your Slack - they all use a publicly available ipushpull page that we update every second.

 

Use /ipp pullquery to filter the rows from your pages

The /ipp pullquery command filters your table of data based on the SQL-like query that you specify as a parameter.

For example, we're pushing the following page of stock prices from Excel to ipushpull:

excel_stocks.PNG 

You can pull this entire page into Slack using /ipp pull LiveDemoPages DemoStocks

stocks_in_slack.PNG

Suppose you only want to extract the row for Apple (AAPL). We treat the first row of the data as column headers, so in this case we want to extract the row where Stock is equal to AAPL. You can do this by specifying a SQL-like query after the folder and page names.

/ipp pullquery LiveDemoPages DemoStocks "SELECT * WHERE Stock=AAPL"

Just the AAPL row will be returned:

apple_only.PNG

If your filter matches more than one row then all matching rows will be returned. For example, this command returns all rows where the Price is greater than 1000:

/ipp pullquery LiveDemoPages DemoStocks "SELECT * WHERE price>1000" live

greatthan1k.PNG

Note that if you specify the live parameter the data will update in real time.

To do partial matches on values use the ~ (tilde) symbol. For example, the following command returns all rows where the stock name contains the letter A:

/ipp pullquery LiveDemoPages DemoStocks "SELECT * WHERE stock~A"

This returns the following data:

all_the_as.PNG

 

/ipp pullquery Full Syntax 

/ipp pullquery [folder] [page] ["query"] [live|static]

 

Parameter Optional? Description
[folder]   Name of your ipushpull folder
[page]   Name of your ipushpull page
["query"]   Your SQL-like query (in quotes)
[live|static] Optional Display live data or a static snapshot (default)

Don't include the brackets!


For help on this command within Slack type /ipp pullquery help

The /ipp pullquery command is currently a beta feature - if you have any comments please tell us using /ipp feedback.

Was this article helpful?
0 out of 0 found this helpful
Powered by Zendesk