2024 Jun 05 8:34 AM - edited 2024 Jun 06 7:08 PM
This discussion thread is for you to ask your questions and discuss issues if you are participating in the June 2024 developer challenge. The topic is "Multi-model processing with SAP HANA and Python in SAP Business Application Studio."
Please use separate discussions created for the submission of your solutions. Keep this thread for your questions only.
2024 Jun 14 4:17 PM
@SushmitaG @Alpesa1990 The kernel selection is not defined in the profile but in the workspace setting.You need to open the workspace file https://github.com/SAP-samples/sap-community-developer-challenge-hana-multimodel/blob/main/sap-commu...
as described in step 4 of https://github.com/SAP-samples/sap-community-developer-challenge-hana-multimodel/blob/main/challenge...
Please let me know if this helps.
2024 Jun 19 9:42 PM
2024 Jun 18 6:35 AM
Hi @Alpesa1990 , Its working for me now. I re-installed ipykernel and it worked now.
Regards,
Sushmita
2024 Jun 15 7:33 PM
Hello all,
I like this dev challenge and how it is set up. Its among only a few SAP tutorials/challenges where I can see and learn how topics are working. Also the hints outside of the topics e.g. to DJ Adams I really appreciate.
I had a panic attac when looking after the data import into the table but did not find any records in at all. 🙂 Usually I dump data from a dataframe to a hana table and the need to commit the transactions I haven´t had on my plate.
Note, that the statement above is not commiting the transaction and records are not visible for other processes in the database table unless the below connection commit is executed.
Also interessting to see the different representation of the values caused by the tool used to display.
DBeaver | BAS |
Which makes also clear why it is highlighted ''Note the use of the [`TO_NVARCHAR()]''
Br.,
DirkO
2024 Jun 15 10:18 PM
Vectors are stored in the binary format, and indeed, different tools display bytes of those binary values in different ways. TO_NVARCHAR() converts them to human-readable real numbers-looking string.
I separated COMMIT into a separate statement because then loading the original dataset with 3 million records takes about 20 minutes and the commit is a fraction of a second. That allows for avoiding delayed load time with intermediate commits and for avoiding a partial result loaded in the case of the INSERT failure for any reason.
Have a good weekend!
2024 Jun 15 7:42 PM
Hello Witalij,
I´m facing one issue with the profile settings from "HANAwPy".
Is it a feature, a bug or me that I´m loosing the settings with every restart of the BAS?
My understanding was that I have to import this only once.
Thanks for taking some time to look into this.
Br.,
DirkO
2024 Jun 18 11:04 AM
Hi, @DirkO Is it possible that you are running BAS in incognito mode, when the new profile disappears?
2024 Jun 19 9:43 PM
2024 Jun 23 4:39 PM
Hi @Vitaliy-R,
many thanks for your response and taking time to look into this. Issue still persists and incognito mode is not in use.
But it is probably because of FireFox because Chromium does not work at all for the challenge.
Thanks & have a nice weekend.
Br.,
DirkO
2024 Jun 20 9:36 AM
2024 Jun 20 9:51 AM
Make sure you have `pillow` package installed in the virtual environment `.venv` and that `.venv` is the kernel you are using to run the notebook.
2024 Jun 20 10:23 AM
2024 Jun 22 12:08 PM
First: source ~/projects/.venv/bin/activate
Then try running this command again "pip install --require-virtualenv tensorflow-cpu ipywidgets pillow" in .venv. I got the same error then I ran it again and it worked
2024 Jun 20 3:12 PM
2024 Jun 20 11:04 PM
Yes, it is one of the errors I introduced in the notebook to challenge you 🤓
Please check the part of connecting to the HANA db with the previous week. Give it another try to resolve it! If you won't be able to find the root cause of the issue, then let me know, and I will help you.
2024 Jun 24 11:26 AM
Hi @Vitaliy-R ,
I was able to resolve the previous error.
But now I am getting the below error while inserting into the table.
@Cocquerel if you have some time, can you kindly help here ? I am pretty new to this Python world.
2024 Jun 24 12:43 PM
There is something missing in the INSERT statement. Look at previous week.
2024 Jun 24 2:31 PM
Welcome to the Python 🐍 World @satyasundar3
It is one of the errors that I introduced, but as @Cocquerel has replied already, you should be able to find it by comparing it to the previous week's notebook.
2024 Jun 21 11:27 AM
Hi @Vitaliy-R ,
I am trying to fix the typo in week3_2 (Closest neighbours section). I fixed the cosine similarity, but for the row_number, I am trying but without sucess yet.
Here below the complete SQL statement, I tried to (WHERE "B"."row_num" = {random_record}) but it did not work.
I checked previous week SQL statement, but I was able to fix the cosine_similarity function only.
Thanks in Advance.
2024 Jun 21 2:21 PM
Hi Moh
You almost have it 🙂 Just check how other columns are espressed: "tablename"."column"
2024 Jun 22 12:48 PM
Thanks @raulruiz for your reply.
I fixed the error, but now I don't have results from my query. Any idea why?
Thanks in Advance.
2024 Jun 23 4:56 PM
Can you include a screenshot that would include the complete current cell (with the SQL statement) and the previous cell (with the random number generation)?
2024 Jun 24 6:18 AM
Here is the complete current cell and random number generator.
Thanks in advance.
2024 Jun 24 11:32 AM
It seems you have added some additional partitioning in your SQL statement, so it is not getting row numbers for the whole table but for smaller partitions.
Could you restore it to
INNER JOIN
(SELECT
ROW_NUMBER() OVER () AS "row_num", *
FROM {source_table}
) AS "B"
and then re-run the cell?
2024 Jun 21 3:49 PM
With the week 3 queries challenge notebook, the cell
import os
wouldn't execute. In fact, the word "import" wasn't coloured purple, as it was with the week 3 import workbook.
My workaround was to include it in the next cell.
Weird!
2024 Jun 21 3:53 PM - edited 2024 Jun 21 3:53 PM
It was a malicious typo from Vitaliy.
The cell type was defined as "Raw". You just had to switch to python instead.
2024 Jun 21 4:05 PM
I liked it! I was struggeling to know what was failing and when I noticed that... evil typo!
2024 Jun 21 4:36 PM
Thanks.
i should have noticed that, and also wondered why there was no indication of the elapsed run time when I tried to execute the cell.
2024 Jun 22 7:06 AM
2024 Jun 23 4:57 PM
Hi @gphadnis2000 Yes, it is one of the errors I introduced into the challenge for you to find the root cause and resolve 🤓
2024 Jun 23 5:14 PM - edited 2024 Jun 23 5:14 PM
2024 Jun 27 8:08 AM
Hi,
Week 4_2: shortest path string
I have an error, I am trying to figure it out, but it looks I need a hint 😬
Thanks in advance.
2024 Jun 27 8:53 AM
Hmmm... I do not think this is the code where I introduced any typo, so can you please check the results of:
hdf_routes_strings
.filter('ID IN ('+path_airport1_to_airport2_hops.edges.ID.astype(str).str.cat(sep=',')+')')
.agg([('ST_CollectAggr', 'LINE', 'LINE_PATH')])
.select_statement
and
myconn.sql(
hdf_routes_strings
.filter('ID IN ('+path_airport1_to_airport2_hops.edges.ID.astype(str).str.cat(sep=',')+')')
.agg([('ST_CollectAggr', 'LINE', 'LINE_PATH')])
.select_statement).collect()
2024 Jun 28 11:11 AM
Thanks for the hint.
I got it, but it needs to review the syntix to find "OLD" and change it. 🔍
2024 Jul 01 9:41 PM
2024 Jul 02 11:25 AM
What do you see in the Output...
...and then check output for Jupyter selection:
Do you get any errors there?
2024 Jul 02 12:00 PM
2024 Jul 02 12:00 PM
Hi @Vitaliy-R,
Week 4 challenge is too challenging too resolve.. I will be grateful if someone can provide me a hint...
Initially got the below error
Then to fix this error, declared variable
2024 Jul 02 12:54 PM - edited 2024 Jul 02 12:55 PM
2024 Jul 02 12:58 PM
Lucky you...you are able to execute the statement