Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-11-2024 03:47 AM
@szymon_dybczak I also tried the another approach you provided,
jdbc_url = f"jdbc:databricks://{os.environ[db_const.DATA_BRICKS_HOST]};" \
f"transportMode=http;" \
f"ssl=1;" \
f"httpPath={os.environ[db_const.DATA_BRICKS_HTTP_PATH]};" \
f"AuthMech=3;" \
f"UID=token;" \
f"PWD={os.environ[db_const.DATA_BRICKS_TOKEN]};" \
f"Catalog=scna_qa;" \
f"Schema=dsml"
df = spark.read.format("jdbc") \
.option("url", jdbc_url) \
.option("dbtable", "scna_qa.dsml.geonode_sku_dategrp_kpi") \
.load()
print("pyspark dataframe: ", df)
Here scna_qa is Catalog and dsml is schema
Both the approach not working
Exception :
[Data bricks][JDBCDriver](500051) ERROR processing query/statement. Error Code: 0, SQL state: null, Query: SELECT * F***, Error message from Server: Configuration Schema is not available..