Git Product home page Git Product logo

tutorial-thiago's Introduction

Tutorial

  • Conectar num banco de dados Postgres
  • ⁠fazer select , group by, where no banco
  • ⁠o que é o apache spark
  • ⁠como fazer consultas usando o spark
  • ⁠operações básicas usando Python , criar objeto , função , loop for , if else
  • ⁠como ler arquivo Csv usando o pandas
  • ⁠fazer as operações de filtro, seleção de colunas , e group by usando o pandas

Subir o postgres

docker compose up -d
Bancos Relacionais

postgres mysql oracle mysql

Conectar no banco

Conectar pelo Dbeaver no Postgres :

hostname: localhost
port: 5432
username: admin
password: admin

Criar a tabela

Pelo comando SQL

create table blabla (
COLUNA_1 varchar(10) primary key
);


CREATE TABLE tabela_2 (
    ID_COLUNA int NOT NULL PRIMARY key,
    COLUNA_1 varchar,
    FOREIGN KEY (COLUNA_1) REFERENCES blabla(COLUNA_1)
);

pelo point-click do Dbeaver:

tutorial -> schema -> public -> export -> seleciona o .CSV e cria a tabela

Comandos SQL

Select ,join, group by, Where
SELECT country,region  FROM tutorial.public.happiness_data hd;
SELECT *  FROM tutorial.public.happiness_data hd
where country = 'Iceland'
SELECT "Happiness Rank",COUNT(*), sum("Happiness Rank"), avg("Happiness Rank")  FROM tutorial.public.happiness_data hd group by "Happiness Rank"
select hd_1.country,hd_1.region,hd_2."Family"  from tutorial.public.happiness_data_1 hd_1 -- ALIAS
inner join tutorial.public.happiness_data_2 hd_2  -- inner full (forma) join (direcao)(left right)
on hd_1.country = hd_2.country

tutorial-thiago's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.