This commit is contained in:
David Laufer 2018-07-29 17:58:27 +03:00
parent b223ed8332
commit d59e0420a8
2 changed files with 21 additions and 17 deletions

View File

@ -23,9 +23,7 @@ Schedule advanced query.
## Use case ## Use case
You need to schedule an advanced query and use the result for follow up actions and processing. If you need to schedule an advanced query and use the results for follow up actions and processing, you can use [Microsoft Flow](https://flow.microsoft.com/) (or Logic Apps) for it!
You can use [Microsoft Flow](https://flow.microsoft.com/) (or Logic Apps) for it!
## Define a flow to run query and parse results ## Define a flow to run query and parse results
@ -74,6 +72,8 @@ You will find below a very basic flow example:
![Image of select from DB](images/ms-flow-read-db.png) ![Image of select from DB](images/ms-flow-read-db.png)
## Full flow definition
You can find below the full definition You can find below the full definition
![Image of E2E flow](images/ms-flow-e2e.png) ![Image of E2E flow](images/ms-flow-e2e.png)

View File

@ -89,15 +89,19 @@ If you want to run complex queries (or multilines queries), save your query in a
## Work with query results ## Work with query results
To work with the results you can, for instance, do the below You can now use the query results.
To output the results of the query in CSV format in file file1.csv do the below:
``` ```
$results | ConvertTo-Csv -NoTypeInformation | Set-Content file1.csv $results | ConvertTo-Csv -NoTypeInformation | Set-Content file1.csv
$results | ConvertTo-Json | Set-Content "file1.json"
``` ```
- Line 1 outputs the results of the query in CSV format in file file1.csv To output the results of the query in JSON format in file file1.json do the below:
- Line 2 outputs the results of the query in JSON format in file file1.json
```
$results | ConvertTo-Json | Set-Content "file1.json"
```
## Related topic ## Related topic