Skip to content

Commit

Permalink
Update:
Browse files Browse the repository at this point in the history
.gitignore
README.md
dataframes
features-tour
h1b-visa
rdds
ted
  • Loading branch information
vplauzon committed Jun 21, 2020
1 parent 9de95a4 commit ffed465
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions features-tour/notebooks/01-config-mount.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Databricks notebook source
# MAGIC %md
# MAGIC
# MAGIC # Notebook setting up the mount points

# COMMAND ----------

import os

# Declare the root path of our lakes
sourceLakeRootPath = os.getenv('LAKE_SOURCE')
destinationLakeRootPath = os.getenv('LAKE_DESTINATION')

# COMMAND ----------

# Extra config for doing passthrough authentication on mounts
configs = {
"fs.azure.account.auth.type": "CustomAccessToken",
"fs.azure.account.custom.token.provider.class": spark.conf.get("spark.databricks.passthrough.adls.gen2.tokenProviderClassName")
}

# COMMAND ----------

# Mount Source
dbutils.fs.mount(
source = sourceLakeRootPath,
mount_point = "/mnt/source",
extra_configs = configs)

# COMMAND ----------

# MAGIC %fs
# MAGIC
# MAGIC ls /mnt/source

# COMMAND ----------

# Mount Destination
dbutils.fs.mount(
source = destinationLakeRootPath,
mount_point = "/mnt/destination",
extra_configs = configs)

# COMMAND ----------

# MAGIC %fs
# MAGIC
# MAGIC ls /mnt/destination

# COMMAND ----------

0 comments on commit ffed465

Please sign in to comment.