If I have a PII string is there a function in Kusto to sort of mask it (anonymize) in such a way that it will still retain same distribution but there is no way to get back the original value?
You can use hash() or hash_sha256() functions to map text into irreversible represenation.
https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/sha256hashfunction
https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/hashfunction
Related
Is there a way in kql to convert a public IP address to a country?
Basically I'm looking for the equivalent to Splunks iplocation function from SPL.
Thanks.
Kusto is a platform and does not hold its own dataset for ip->geo mapping.
Given you bring your own dataset - you can use ipv4/ipv6 functions to build such lookup.
https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/scalarfunctions#ipv4ipv6-functions
Actual variable is Long but while saving it to Firestore I accidentally converted it to String, now I cannot perform queries like whereGreaterThan, whereLessThan, orderBy etc on this String field
There isn't a way to magically change the data type. The easiest way will be to re-write all the documents that were saved as a string.
You could use something like the Python server libraries to do this, using Cloud Shell in the GCP Console.
Note, you can grab all the documents with the field set to a string by doing a filter for >= "". This will get you every field that has a string with any value, as well as empty strings.
Is it possible to search Vertex properties with a contains in Azure Cosmos Graph DB?
For example, I would like to find all persons which have 'Jr' in their name?
g.V().hasLabel('person').has('name',within('Jr')).values('name')
Seems like the within('') function only filters values that are exactly equal to 'Jr'. I am looking for a contains. Ideally case insensitive.
None of the text matching functions are available for CosmosDB at this time. However, I was able to implement a wildcard search functionality by using a UDF (User Defined Function) which uses the Javascript match() function:
function userDefinedFunction(input, pattern) { return input.match(pattern) !== null; };
Then you'd have to write your query as SQL and use the UDF that you defined (the example below assumes you called you function 'REGEX'
SELECT * FROM c where(udf.REGEX(c.name[0]._value, '.*Jr.*') and c.label='person')
The performance will be far from ideal so you need to decide if the solution is acceptable or not based on your latency and cost perspectives.
The Azure team has now implemented Tinkerpop predicates for String
The Azure team has "announced" this to a user here on their feedback website.
I haven't tested all of them, but containing works for me (it is case sensitive though)
g.V().hasLabel('doc').or(__.has('title', containing('truc')), __.has('tags', containing('truc')))
TextP.startingWith(string)
Does the incoming String start with the provided String?
TextP.endingWith(string)
Does the incoming String end with the provided String?
TextP.containing(string)
Does the incoming String contain the provided String?
TextP.notStartingWith(string)
Does the incoming String not start with the provided String?
TextP.notEndingWith(string)
Does the incoming String not end with the provided String?
TextP.notContaining(string)
Does the incoming String not contain the provided String?
I want to create a MVCCKey with a timestamp and pretty value I know. But I realize a roachpb.key is not very straightforward; is there some prefix/suffix involved? Is the database name is also encoded in roachpb.key?
Can anyone please tell me how a MVCCKey is formed? What information does it have? In the documentation, it just says that it looks like /table/primary/key/column.
An engine.MVCCKey combines a regular key with a timestamp. MVCCKeys are encoded into byte strings for use as RockDB keys (RocksDB is configured with a custom comparator so MVCCKeys are sorted correctly even though the timestamp uses a variable-width encoding).
Regular keys are byte strings of type roachpb.Key. For ordinary data records, the keys are constructed from table, column, and index IDs, along with the values of indexed columns. (The database ID is not included here; the database to which a table belongs can be found in the system.descriptors table)
The function keys.PrettyPrint can convert a roachpb.Key to a human-readable form.
i am using lua module inside nginx for routing to a stored string.
The thing i want to do is to change the values of query string parameters from the stored string.
Is there any function which will give me table of query string parameters from a string?
And after changing the values, any function to change the values from the string.
Thanks
I think you're looking for ngx.encode_args and ngx.decode_args respectively.