RediSearch Suggestions - Delete all suggestions - redis

RediSearch Suggestions are very useful.
What I couldn't figure out: how to delete all suggestions?
The command reference explains how to add and remove words. But it looks like there is no way to remove all?
https://oss.redislabs.com/redisearch/Commands/#ftsugadd

You can just delete the key that the suggestions are stored under with the regular DEL command.

Related

Use client-request-properties with Kql magic

I'm trying to run a kusto query in Jupyter using Kql magic version 0.1.114.post16. I would like to remove the 500k lines limit and I think that the notruncate option listed when running %kql --help "client-request-properties" should solve my problem, but I can't figure out how to insert it in kql magic. It doesn't work as other options or commands.
I kind of solved this, even though I'm not sure whether this is the correct way to use Kql magic. I just added set notruncation; at the top of my query, like so
%%kql
set notruncation;
...
I'd like to have the --help specify a bit better that these are not options of the Kqlmagic commands but rather have to be put inside the query.

Generate inserts from an Oracle table

I want to generate the insertions of a table using 'sqlplus' and I do not know how to do it. Does anyone know? I have also tried using the command 'exp', with the following statement:
exp user/password#server file=data_table.dmp buffer=10485867 statistics=none tables='name_table'
but it does not work either. It generates a .dmp file that I can not use. I want it to generate INSERTS.
Thanks and regards.

How do i create a comment block in a hive script

I am reworking a Hive script file. For debugging purposes I would like to set some blocks of code as comment. However I can't find a way to define such a comment block. Tried various options but none seem to work. Any hints?
Thanks,
Marco
Hive does not support multi-line comment.
Only single line comment are supported

Auto-increment my primary key SQL Server 2012

I'm using SQL Server 2012, I want to add an auto-increment to my primary key I don't know the exact syntax so i tried this but it obviously won't work !
Help please !!!
ALTER TABLE dbo.Equipe alter numero_equipe add IDENTITY(9999,1)
The way to solve syntax problems is not to shove characters around until it happens to work, but to read the (excellent) online docs. They specify syntax and give examples. Searching also helps to answer trivial questions.
You can perform the operation without touching table data using SWITCH: http://blogs.msdn.com/b/dfurman/archive/2010/04/20/adding-the-identity-property-to-a-column-of-an-existing-table.aspx
A connect item for a feature request exists: https://connect.microsoft.com/SQLServer/feedback/details/800127/allow-for-changes-to-the-identity-property-with-simple-syntax-and-metadata-operation-like-performance (please vote).

Pentaho kettle : Below delete doesnt seem to work in SQL script

Ive tried to execute below delete through SQL script in Pentaho Job, I get the error as
Unknown table 'a' in MULTI DELETE. Can somebody throw light on this. Is there any other way
to go around this?
DELETE a.* FROM pm_report.PM_CONCERTS_GQV_REPORT_TEST a
WHERE EXISTS
(SELECT 1 FROM pm_report.PM_CONCERTS_GQV_REPORT_TEST_3 b WHERE b.TM_EVENT_ID=a.TM_EVENT_ID
GROUP BY b.TM_EVENT_ID)
This is mysql right?
See similar solutions here - recommends removing the table alias.
Worth noting this is nothing to do with Pentaho, if you did it in a SQL client you'd get the same error. If you don't then the difference is probably in the jdbc driver version - may be worth checking that.
i can suggest these options:
dont use aliases
try this directly on your mysql and check if it works for you.
dont use pentaho like this : make a transformation and break apart the query to steps
with table input and lookup then delete the rows by row_id
its a little bit longer but a lot more undersrandable and easy to maintain.
"dont over optimize"