How to exclude triggers from being activated/deactivated in Azure Synapse? - azure

I currently have the following code in my yml file to activate and deactivate all of my triggers in Azure Synapse:
- task: toggle-triggers-dev#2
displayName: 'Deactivate all triggers'
inputs:
azureSubscription: 'qa-SPN'
ResourceGroupName: 'qa-group'
WorkspaceName: 'saws'
ToggleOn: false
Triggers: '*'
- task: toggle-triggers-dev#2
displayName: 'Activate all triggers'
inputs:
azureSubscription: 'qa-SPN'
ResourceGroupName: 'qa-group'
WorkspaceName: 'saws'
ToggleOn: true
Triggers: '*'
I want to activate all of my triggers except 1 and I want to know if there's any way to exclude it. The workaround is to explicitly define the toggle of each trigger but this solution won't be feasible if I have 50 triggers.
I also tried the following:
- task: toggle-triggers-dev#2
displayName: 'Activate all triggers except ***'
inputs:
azureSubscription: 'qa-SPN'
ResourceGroupName: 'qa-group'
WorkspaceName: 'saws'
ToggleOn: true
Triggers: 'trigger1, trigger2, trigger3'
But this will throw the error: Unexpected exception or missing status code","message":"Body: {\"code\":\"TriggerNotFound\",\"message\":\"The Trigger trigger2 was not found
How can I solve this problem?

I figured it out -- You need to list your triggers without a space in-between:
Triggers: 'trigger1,trigger2,trigger3'

Related

Add current user to multi person combobox in PowerApps

I need to update multi person combobox with current user account.
I tried to collect previously saved data from SelectedItems property of current SP list record and then merge it with current user's claims via Collect function, but combobox somehow stays empty.
ClearCollect(colUsers, DataCardValue1.SelectedItems);
Collect(colUsers, { Claims: "i:0#.f|membership|" & User().Email, DisplayName: User().FullName });
colUsers property set as Default for DataCardValue1 control.
After that I tried to create a table and assign it as a DefaultSelectedValue for combobox.
Set(colUsers, Table({ Claims: "i:0#.f|membership|" & User().Email, DisplayName: User().FullName }));
It is working, but now I see only my name in combobox. How can I add all existing Users and merge them with colUsers table?

Vue Konva, create stages dynamically

Is there a way to create N+1 stages?
The following is how to create one stage.
<v-stage :config="configKonva">
<v-layer>
<v-circle
v-for="(item2, i) in items2"
:config="item2"
:key="i"
:ref="`circle_${i}`"
></v-circle>
</v-layer>
</v-stage>
The same way as you use loops for <v-circle /> component, you can use it for stages:
<v-stage :config="stage.config" v-for="(stage) in stages">
<v-layer>
<v-circle
v-for="(item) in stage.items"
:config="item"
:key="i"
></v-circle>
</v-layer>
</v-stage>

Allow user to select pre-set or optional parameters azure pipeline

I am currently defining a parameter within my azure pipeline as follows:
parameters:
- name: nodeSize
displayName: nodeSize
type: string
default: size1
values:
- size1
- size2
The result of this, is that when attempting to run the pipeline the user is presented with a drop down menu that allows them to choose one of the defined values, as shown bellow:
My goal is to create my parameters in a way that the user can select from the dropdown box, OR enter their own value. So the resulting dropdown menu would like like:
Size 1
Size 2
<Users optional input>
I'm afraid that this is not possible. You can create two parameters:
parameters:
- name: nodeSize
displayName: nodeSize
type: string
default: size1
values:
- size1
- size2
parameters:
- name: customSize
displayName: customNodeSize
type: string
default: ' '
and then check if customSize size was provided. I understood that this is far away from perfect. But we are limited to functionality we have now.

Error: FAILED_PRECONDITION: no matching index found. recommended index is:

So I'm trying to run a query on Google Cloud's datastore as such:
let query = datastore.createQuery(dataType)
.select(["id", "version", "lm", "name"])
.filter("owner", "=", request.params.owner)
.filter("lm", ">=", request.query.date_start)
.groupBy(["lm"])
.order("lm")
Yet I run into an error stating that
no matching index found. recommended index is:
- kind: Entry
properties:
- name: lm
- name: id
- name: name
- name: version
When I run the query with id instead of lm for all the methods I run into no errors.
Is this because in my index.yaml file I have the index as such: ?
- kind: Entry
properties:
- name: id
- name: version
- name: lm
- name: name
Must I actually create a new index with the recommended ordering? Or is there a way I can do this without having to make another index? Thank you!
Yes, you need to create a new index, the existing one you showed is not equivalent, so it can't be used for your query - the property order matters (at least for the inequality filters and sorting). See related Google Datastore Composite index issue

Complex script for bulk/update a document without getting it

I have for my project, this ES mapping representation :
- BOOK
- label: String,
- active: Boolean
- total_term_occ: Long
- TERMS
- label: String,
- ngram: Byte,
- tot_occurrences: Long,
- books [{
- id: String,
- label: String,
- occurrences: Long,
- tfidf: Double
}]
For each new term (ex: "ES rocks"), I want to :
- Update the total occurrence in the "TERMS" doc
OR
- Create the new term if not exists
AND (if term already exists)
- BOOK :
- Create a new object if the book does not already exist with "occurrences" to 0 and "tfidf" to NULL
OR
- Update the "occurrences" field if the book exists (with a loop ?!)
I want to make a bulk request "update -> script -> upsert" but without getting the document before updating it.
Do you think this is possible with the choice of mapping ? I can't find a good solution....

Resources