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
5 | |
_name | |
disc_6 | |
values | |
na | |
cnt | |
70755 | |
_type | |
STRING | |
14 |
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
5 | |
name | |
disc_6 | |
types | |
STRING | |
10.061573902903785 | |
INTEGER | |
89.93842609709621 | |
nullable | |
True |
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
0 | |
name | |
key_1 | |
type | |
STRING | |
nullable | |
False | |
1 | |
name | |
date_2 |
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
key_1 | date_2 | cont_3 | cont_4 | disc_5 | disc_6 | cat_7 | cat_8 | cont_9 | cont_10 | |
---|---|---|---|---|---|---|---|---|---|---|
HC2030 | 2016-11-16 | 622.27 | -2.36 | 2 | 6 | frequent | happy | 0.24 | 0.25 | |
sP8147 | 2004-02-18 | 1056.16 | 59.93 | 2 | 8 | never | happy | 1.94 | 2.29 | |
Cq3823 | 2007-03-25 | 210.73 | -93.94 | 1 | 1 | never | happy | -0.11 | -0.1 | |
Hw9428 | 2013-12-28 | 1116.48 | 80.58 | 3 | 10 | never | surprised | 1.27 | 1.15 | |
xZ0360 | 2003-08-25 | 1038.3 | 12.37 | 6 | 17 | never | happy | 1.76 | 1.76 | |
IK2721 | 2012-10-19 | 835.17 | 16.3 | 4 | 11 | frequent | surprised | 2.04 | 2.3 | |
iK8875 | 2005-02-04 | 769.02 | 75.69 | 3 | 2 | never | happy | -1.53 | -1.56 | |
qd0312 | 2014-11-17 | 273.11 | 66.2 | 1 | 8 | frequent | surprised | 2.67 | 2.95 | |
IO1104 | 2020-11-24 | 1844.21 | -54.11 | 1 | 11 | never | surprised | -0.42 | -0.43 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
version: '3' | |
services: | |
spark-master: | |
image: docker.io/bitnami/spark:2 | |
environment: | |
- SPARK_MODE=master | |
- SPARK_RPC_AUTHENTICATION_ENABLED=no | |
- SPARK_RPC_ENCRYPTION_ENABLED=no | |
- SPARK_LOCAL_STORAGE_ENCRYPTION_ENABLED=no |
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
FROM docker.io/bitnami/spark:2 | |
USER root | |
ENV LIVY_HOME /opt/bitnami/livy | |
WORKDIR /opt/bitnami/ | |
RUN install_packages unzip \ | |
&& curl "https://downloads.apache.org/incubator/livy/0.7.1-incubating/apache-livy-0.7.1-incubating-bin.zip" -O \ | |
&& unzip "apache-livy-0.7.1-incubating-bin" \ | |
&& rm -rf "apache-livy-0.7.1-incubating-bin.zip" \ |
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
FROM python:3.8 | |
WORKDIR /ingestion | |
COPY requirements.txt . | |
COPY wait-for-it.sh /usr/wait-for-it.sh | |
RUN pip install -r requirements.txt |
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
from typing import Optional | |
from fastapi import FastAPI | |
from fastapi.responses import JSONResponse | |
import uvicorn | |
import pandas as pd | |
import psycopg2 | |
import db_engine as dbe | |
import os | |
from pydantic import BaseModel | |
import configparser |
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
import psycopg2 | |
import pandas as pd | |
from sql_queries import create_table_queries, drop_table_queries, fill_table_queries, create_constraints | |
def create_connection(params): | |
""" | |
create a new connection with the postgreSQL | |
database and return the cur and conn object | |
:param params: connection string |
NewerOlder