This file contains hidden or 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
import boto3 | |
def get_glue_table_schema(database_name, table_name): | |
client = boto3.client('glue') | |
response = client.get_table( | |
DatabaseName=database_name, | |
Name=table_name | |
) |
This file contains hidden or 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
# References: | |
# https://aws.amazon.com/blogs/big-data/load-data-incrementally-and-optimized-parquet-writer-with-aws-glue/ | |
import sys | |
from awsglue.job import Job | |
from awsglue.transforms import * | |
from pyspark.context import SparkContext | |
from awsglue.context import GlueContext | |
from awsglue.utils import getResolvedOptions |
This file contains hidden or 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
# Built-in libraries | |
from time import time | |
import threading | |
import logging | |
import requests | |
import math | |
# Project libraries | |
from config import functions as f | |
from config import selenium_functions as sf |
This file contains hidden or 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
import apache_beam as beam | |
with beam.Pipeline() as pipeline: | |
plants = ( | |
pipeline | |
| 'Gardening plants' >> beam.Create([ | |
' 🍓Strawberry \n', | |
' 🥕Carrot \n', | |
' 🍆Eggplant \n', | |
' 🍅Tomato \n', |