on 12-14-2015 2:41 AM
Hi guys,
I don't know if this is the correct place to ask this question, but I need your help.
I am trying to call a text mining function which is "TM_GET_RELATED_DOCUMENTS" for getting the most related documents to a specific document. But I am having "incorrect syntax" error while processing. Here is the steps that I follow from beginning:
I have a table named "inancTrialTrain" in "SYSTEM" schema to be used for text mining. The definition of this table as follows
And then, I created fulltext index on this table on "text" column as follows
DROP FULLTEXT INDEX "SYSTEM"."INDEX_INANCTRIALTRAIN";
CREATE FULLTEXT INDEX INDEX_INANCTRIALTRAIN ON "SYSTEM"."inancTrialTrain" ("text")
ASYNC
FAST PREPROCESS OFF
SEARCH ONLY OFF
TEXT ANALYSIS ON
CONFIGURATION 'LINGANALYSIS_FULL'
TEXT MINING ON
LANGUAGE DETECTION ('EN')
;
MERGE DELTA OF "SYSTEM"."inancTrialTrain";
Everything seems fine until this point. I manage to create index table, and it seems good as you can see in the following pic (please do not try to understand tokens, they are in turkish )
Now, I am trying to call TM_GET_RELATED_DOCUMENTS as follow (reference is Advanced Data Processing: TM_GET_RELATED_DOCUMENTS - SAP HANA SQL and System Views Reference - SAP L...)
SELECT *
FROM TM_GET_RELATED_DOCUMENTS (
DOCUMENT 'some text here'
SEARCH "text" FROM "SYSTEM"."inancTrialTrain"
RETURN
TOP 16
"id", "text"
) AS T;
I got this error:
Could not execute 'SELECT * FROM TM_GET_RELATED_DOCUMENTS ( DOCUMENT 'some text here' SEARCH "text" FROM ...'
SAP DBTech JDBC: [257]: sql syntax error: incorrect syntax near "some text here": line 3 col 10 (at pos 51)
If I call this function as follow (reference is (Time: 3:56) SAP HANA Academy - Text Mining: Using SQL to access Text Mining Functions [SPS 10] - YouTube)
SELECT *
FROM TM_GET_RELATED_DOCUMENTS (
DOCUMENT IN FULLTEXT INDEX WHERE "id"=1
SEARCH "text" FROM "SYSTEM"."inancTrialTrain"
RETURN
TOP 16
"id", "text"
) AS T;
I got this error:
Could not execute 'SELECT * FROM TM_GET_RELATED_DOCUMENTS ( DOCUMENT IN FULLTEXT INDEX WHERE "id"=1 SEARCH "text" FROM ...'
SAP DBTech JDBC: [257]: sql syntax error: incorrect syntax near "IN": line 3 col 10 (at pos 51)
I don't understand why this syntax error occurs. I hope one of you guys can help me to figure this out. Additionally here is the general information of my HANA System. Maybe my SPS revision is the problem (although I don't think so)
Thanks,
Inanc
Yes, I see the issue.
Text Mining via SQL was available with HANA from SPS10 on-wards, you are on SPS09.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I am not an expert in this & therefore I cannot help. I am looping two spaces, and , hoping that someone more qualified can address your question.
On a side-note, there will be a openSAP on Text Analytics & HANA starting in January, this might be of interest for you: http://scn.sap.com/community/opensap/blog/2015/11/24/text-analytics-with-sap-hana-platform
Best regards,
Antoine
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.