Hello @Yu, Hazel (APEX SYSTEMS LLC) ,
Thanks for the question and using MS Q&A platform.
As per the repro from my end, I had created two dataframes name df1 => table1 and df2 = table2 as per your requirement.
How to join databricks tables with sqldb table.
As shown above read both tables into the dataframe and apply inner
join as shown below:
df = df1.join(df2, df2.label_name == df1.label_name, "inner").select(df2.label_name,df2.unit)
display(df)
Now you can convert dataframe into a table in the SQLDB as shown:
You can verify the same from SQL endpoint:
Hope this will help. Please let us know if any further queries.
------------------------------
- Please don't forget to click on
or upvote
button whenever the information provided helps you. Original posters help the community find answers faster by identifying the correct answer. Here is how
- Want a reminder to come back and check responses? Here is how to subscribe to a notification
- If you are interested in joining the VM program and help shape the future of Q&A: Here is how you can be part of Q&A Volunteer Moderators