Azure Kusto Data Explorer - invoking multiple management queries at once - azure

I want to run multiple alter-column commands at once (to save some time).
For example, I have these 2 commands:
.alter column e53b2c81_eb5c_45e4_9e5e_333332211111.name policy encoding type='identifier'
.alter column e53b2c81_eb5c_45e4_9e5e_333332211111.doc policy encoding type='bigobject'
And running them separately works fine. but I want to invoke them together. So I tried something like:
.alter column e53b2c81_eb5c_45e4_9e5e_333332211111.name policy encoding type='identifier';
.alter column e53b2c81_eb5c_45e4_9e5e_333332211111.doc policy encoding type='bigobject';
But it didn't work.
Is there any way I can run them both together?
(Eventually, I want to avoid running this query for 1000+ tables for different fields. I much rather performing this task at once to avoid so many requests. I'll be running these commands through the Golang SDK).

You could include all commands in a script, and use the .execute database script command to have them run by the service one after the other.
Please note that this does not run all commands in the script in a single transaction - commands are executed sequentially, in the order they appear in the input script.

Related

SAP-Commerce Admin Aspect Not performing updatesystem

We are experiencing an issue on v2011, where using the admin aspect with the updatesystem command, does not actaully do an updatesystem. By that i mean, it does not perform any typesystem updates or impex etc. where have also tried the command with passing a config file but still the same result. Also, if the completes it shuts down the container and just starts it back up again.
Tried basing the typeSystem only argument, and also a passing a config json file. Check DB SystemINit table to ensure it was not locked

Disable wrapping migration in a transaction with Node db-migrate

I need to use db-migrate to add an index to a Postgres database with CREATE INDEX CONCURRENTLY. However, db-migrate wraps all migrations in a transaction by default, and trying to create a concurrent index inside a transaction results in this error code:
CREATE INDEX CONCURRENTLY cannot run inside a transaction block
I can't find any way to disable transactions as part of the db-migrate options, either CLI options or (preferably) as a configuration directive on the migration itself. Any idea if this can be accomplished?
It turns out that this can be solved on the command line by using --non-transactional. Reading the source, I can see that this sets an internal flag called notransactions, but it's not clear to me whether this can be set as part of the migration configuration or must be passed on the command line.
I kept getting the errors even when running with --non-transactional flag.
The solution for me was to run with --non-transactional AND have each CREATE INDEX CONCURRENTLY statement in its own separate migration file. It turns out you can't have more than one of it in the same file (same transaction block).

Is it possible to incorporate an environment variable into a ruby script for Calabash?

I am testing a feature on an app that requires the user to be a certain age. The only time you see the prompt that asks for your age is once you open the app for the first time and once you log out of the app. I don't want my test to only go through my steps to log in and then log out to be able to see this prompt, but I also don't want to manually reset the data in between tests either. Isn't this why we write scripts? Anyways, before I launch the test, I use the environment variable RESET_BETWEEN_SCENARIOS=1 cucumber features/my_feature.feature. Is there a way that I can use this variable INSIDE of my step definition so that it resets the data on its own once I run the script?
I'm not familiar with Calabash, but it appears to be using cucumber. If that is the case, you could handle the action in a before or after hook which would run before or after each scenario.
Within the features/support folder, add a file hooks.rb
Before() do
if ENV['RESET_BETWEEN_SCENARIOS'] == '1'
#code to reset data
end
end
This could also be run after the scenario by using After() do. The same if/then could be used within a scenario step as well.

JMeter howto: same thread group - same variable - different value

I'm doing a performance test on different versions of my application.
The results end up in a csv summary-report.
Is there a way to change the variable correctly for each thread group?
Manual Script:
Script with variable: (not working, help needed).
I don't want to change the version manually when a version changes, but only one parameter. Thanks!
Try using _P or _property function in your Thread Group and Sampler names.
Like Application-${__P(version1,)}, Login-${__P(version1,)}, etc.
Provide property value via 'user.properties' file or via -J command-line argument as
jmeter -Jversion1=1.0 -Jversion2=2.0 -n -t path_to_your_script.jmx -l path_to_results.jtl
All generated reports will contain these properties.
References:
How do I run JMeter in non-gui mode
Apache JMeter Properties Customization Guide

executing script file from azure blob and write its results to file

I'll explain the task requested from me:
I have two containers in Azure, one called "data" and one called "script". In the "data" container there's a txt file with data, and in the "script" container there's a script file.
Now, I need programatically (with WorkerRole) to execute the script file, with the content of the data file as parameters (Example: a script file that accepts a string 's' and returns to the screen "Hello, 's'", when 's' in the string given, and in the data file there's a string), and save the result of the run into another file which needs to be saved in another container called "result".
How do I do all these? I've already uploaded the files and created the blobs programatically, but I can't seem to understand how to execute the file of how to save its result to another file?
Can I please have some help?
Thanks in advance
Here are the steps in pseudo code:
Retrieve the script from the blob(using DownloadToStream())
Compile the script(I will leave this to you as I have no idea what
format your script is)
Load parameters from blob(same as step 1)
Execute script with those parameters.
If your script's can be written as lambda expressions then this becomes a lot easier as you can turn them into Action's
Edit based on your questiions:
DownloadText() is no longer included in Azure Storage 2.0, you only have access to DownloadToStream(). Even if you are using an older version(say 1.7) I would recommend using DownloadToStream() in the event you ever upgrade in the future. This will prevent having to refactor your code.
In terms of executing your script, depending on what type of script it is(if it is c# code you can use this example: Is it possible to dynamically compile and execute C# code fragments?. If you need to execute a different type of script you would need to run it using Process.Start and you can look at this example: http://www.dotnetperls.com/process-start
I do not have much experience with point number 2 but those are the processes I have heard and seen used.

Resources