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
vi .zprofile | |
# Setting PATH for Python 3.8 | |
# The original version is saved in .zprofile.pysave | |
PATH="/Library/Frameworks/Python.framework/Versions/3.8/bin:${PATH}" | |
# Hadoop | |
export HADOOP_HOME=/Users/welcome/Desktop/hadoop/hadoop-3.2.1/ | |
export HADOOP_INSTALL=$HADOOP_HOME |
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
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?><!-- | |
Licensed to the Apache Software Foundation (ASF) under one or more | |
contributor license agreements. See the NOTICE file distributed with | |
this work for additional information regarding copyright ownership. | |
The ASF licenses this file to You under the Apache License, Version 2.0 | |
(the "License"); you may not use this file except in compliance with | |
the License. You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 |
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
# Hadoop setup here | |
1. https://blog.contactsunny.com/data-science/installing-hadoop-on-the-new-m1-pro-and-m1-max-macbook-pro | |
# Hive Setup Here | |
1. https://dbmstutorials.com/hive/hive-setup-on-mac.html |
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
welcome@Anjaiahs-MacBook-Pro ~ % more .zprofile | |
# Setting PATH for Python 3.8 | |
# The original version is saved in .zprofile.pysave | |
PATH="/Library/Frameworks/Python.framework/Versions/3.8/bin:${PATH}" | |
export PATH | |
welcome@Anjaiahs-MacBook-Pro ~ % |
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 csv | |
from datetime import datetime | |
INPUT_FILE_PATH = 'C:/Tech_Learn_welcome/Python_Utils/FastAPI/sai_workspace/fast_api_welcome/files/input.csv' | |
OUTPUT_FILE_PATH = 'C:/data/python_output/input.csv' | |
HEADER_SKIP = True | |
OUTPUT_HEADER = 'id,first,last,ssn,address,firstname_lastname,process_date' | |
def read_file(): |
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
mkdir delab_f | |
cd delab_f | |
python3 -m venv delab-venv | |
source delab-venv/bin/activate | |
pip install jupyterlab |
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
# Read data | |
dfCustomer = spark.read\ | |
.format("cosmos.oltp")\ | |
.option("spark.synapse.linkedService", "AdventureWorksSQL")\ | |
.option("spark.cosmos.container", "Customer")\ | |
.load() | |
display(dfCustomer.limit(10)) | |
# Write data |
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
# Spark Streaming with Cassandra (Azure Cosmos DB) | |
1. https://github.com/mspnp/azure-databricks-streaming-analytics |
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
1.http://www.teradatahelp.com/2010/09/how-can-you-view-data-distribution-in.html | |
1. http://rajgopal-gurrapushala.blogspot.com/2012/11/types-of-hash-functions-used-in-teradata_734.html | |
Create Table emp | |
( | |
ID BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY | |
(START WITH 1 | |
INCREMENT BY 1 | |
MINVALUE -999999999999999999 |
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
{ | |
"_id" : "F0FF0BA8-CEF4-454C-9173-FA7C546F7179", | |
"customerId" : "A852CB99-DAA1-4348-A86F-622D4478A7D0", | |
"orderDate" : "2013-07-11T00:00:00", | |
"shipDate" : "2013-07-18T00:00:00", | |
"details" : [ | |
{ | |
"sku" : "LJ-0192-M", | |
"name" : "Long-Sleeve Logo Jersey, M", | |
"price" : 49.99, |