Created
November 4, 2019 16:10
-
-
Save karol-blaszczyk/d053016002fe540e620bcc1a867f1a47 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%pyspark | |
import sys | |
from pyspark.context import SparkContext | |
from awsglue.context import GlueContext | |
from awsglue.transforms import * | |
# Create a Glue context | |
glueContext = GlueContext(SparkContext.getOrCreate()) | |
# Create a DynamicFrame using | |
# the 'performance_reports' table | |
performance_DyF = glueContext.create_dynamic_frame\ | |
.from_catalog( | |
database="reports", | |
table_name="performance_reports") | |
# Print out information about this data | |
print("Records Count: ", performance_DyF.toDF().count()) | |
performance_DyF.printSchema() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment