
Here is environment I tested.
Type | Version |
Python | 3.10.2 |
hana_ml | 2.20.24031902 |
HANA Cloud | 4.00.000.00.1710841718 (fa/CE2024.2) |
Just a simple code snippet for define, insert and select with join tables.
from hana_ml.dataframe import ConnectionContext, create_dataframe_from_pandas
import pandas as pd
HOST = '<host>'
USER = '<user>'
PASS = '<password>'
conn = ConnectionContext(address=HOST, port=443, user=USER,
password=PASS, schema=USER, encrypt=True, sslValidateCertificate=False)
TAB = '#TEST_TBL' # local tem table
TAB2 = 'TEST_TBL'
COL = 'COL'
df = pd.DataFrame({COL: [1, 2, 4]})
conn.clean_up_temporary_tables()
conn.create_table(table=TAB, table_structure={COL: 'VARCHAR(50)'})
create_dataframe_from_pandas(conn, df, TAB, drop_exist_tab=False)
create_dataframe_from_pandas(conn, df, TAB2, force=True, drop_exist_tab=True)
conn.table(TAB).alias('L').join(conn.table(TAB2).alias('R'), 'L.COL = R.COL').collect()
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
18 | |
14 | |
11 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 |