Skip to content

Instantly share code, notes, and snippets.

@pietheinstrengholt
Created December 29, 2021 15:39
Show Gist options
  • Select an option

  • Save pietheinstrengholt/e4e5ec9cd09840fe54b4fad82435a252 to your computer and use it in GitHub Desktop.

Select an option

Save pietheinstrengholt/e4e5ec9cd09840fe54b4fad82435a252 to your computer and use it in GitHub Desktop.
%%pyspark
from pyspark import *
from pyspark.sql.window import Window
from pyspark.sql.functions import *
from pyspark.sql import Row
from pyspark.sql.types import StructType, StructField, IntegerType, StringType, TimestampType, BooleanType, DateType
from typing import List
from datetime import datetime
print("Database:" + cw_database)
print("Table:" + cw_table)
# Read CSV data from landing zone location
dataChanged = spark.read.load('abfss://landingzone@synapsepiethein.dfs.core.windows.net/' + cw_database + '/' + cw_table + '.CSV', format='csv', header=True)
dataChanged.printSchema()
dataChanged.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment