I am trying to run a one-way hash for a string column in USQL. Is there a way to do this inline? Most of the C# samples found online require multiple lines of code - which is tricky in USQL without a code-behind or compiled C# assembly.
相关问题
- facebook error invalid key hash for some devices
- Change first key of multi-dimensional Hash in perl
- Bool.hashValue valid to convert to Int?
- Is the c++ hash function reasonably safe for passw
- Reliably reproduce in C# a legacy password hashing
相关文章
- Bcrypt vs Hash in laravel
- What is the fastest way to map group names of nump
- Finding out whether there exist two identical subs
- Oracle STANDARD_HASH not available in PLSQL?
- Looking for a fast hash-function
- Python: Is there any reason *not* to cache an obje
- C# how to calculate hashcode from an object refere
- How Docker calculates the hash of each layer? Is i
Actually I suggest you use the recently added "named lambdas" (Func<> typed variables) to use the multi-line C# samples. An example is here: https://github.com/Azure/AzureDataLake/blob/master/docs/Release_Notes/2018/2018_Spring/USQL_Release_Notes_2018_Spring.md#u-sql-adds-c-func-typed-variables-in-declare-statements-named-lambdas
Option 1 (Inline formula):
The code below can be used to compile a SHA256 or MD5 on any string, and runs without any special dependencies and without needing a code-behind file.
Option 2 (using Lambda functions): (UPDATED)
Thanks to @MichaelRys for the pointer that USQL now supports Lambda functions and can be cleaned up as in the below: