- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-24-2022 12:49 AM
I have set up a DLT with "testing" set as the target database. I need to join data that exists in a "keys" table in my "beta" database, but I get an AccessDeniedException, despite having full access to both databases via a normal notebook.
A snippet demonstrating the issue is below (Note that I don't appear to have the code snippet button available in Chrome):
The following would be data from the keys table:
```
key_df = spark.createDataFrame([[0, "State0"]], ['key', 'name'])
```
Then the DLT:
```
@dlt.table()
def dlt_test_data():
df = spark.createDataFrame([["40873", 0]], ['version', 'key'])
return df
@dlt.table()
def dlt_test_silver():
data_df = dlt.read("dlt_test_data")
key_df = enum_df = spark.table("beta.keys")
joined_df = data_df.join(key_df, "key")
return joined_df
```
I also tried importing the data in a view and reading from that in dlt_test_silver, but this also failed.
Is it possible to use other databases within a DLT pipeline? If so, how?