English
Open in Telegram

Postimport configparser

12 February 2025
S
Storytelling with Data
import configparser import psycopg2 # Config faylini oqish parser = configparser.ConfigParser() parser.read("pipeline.conf") # Redshift ulanish malumotlarini olish dbname = parser.get("aws_creds", "database") user = parser.get("aws_creds", "username") password = parser.get("aws_creds", "password") host = parser.get("aws_creds", "host") port = parser.get("aws_creds", "port") # Redshiftga ulanish rs_conn = psycopg2.connect( "dbname=" + dbname + " user=" + user + " password=" + password + " host=" + host + " port=" + port ) # Orders jadvalidagi songgi yangilangan sanani olish rs_sql = """SELECT COALESCE(MAX(LastUpdated), '1900-01-01') FROM Orders;""" rs_cursor = rs_conn.cursor() rs_cursor.execute(rs_sql) result = rs_cursor.fetchone() # Natijani olish last_updated_warehouse = result[0] # Kursorni yopish rs_cursor.close()
1 · 670 ·

Nearby in the feed

SStorytelling with DataBu kod MySQL malumotlar bazasidan "Orders" jadvalini toliq yuklab, uni CSV ga yozadi va songra Amazon S3 ga yuklaydi.SStorytelling with DataHozir bu code ni yozdik lekin bu code ni davomi bor yani nima qilamiz va nega kerak degan manoda:
this message
SStorytelling with DataBu kod hozirgi yuklagan Orders jadvalidagi songi yangilanish sanasini olish uchun kerak. ETL (Extract, Transform, Load) jarayonida u juda muhim , kodning qandaySStorytelling with DataNormalization – bu jadvallarni togri tashkil qilish va ortiqcha malumotlarni bolmasligini taminlash jarayoni. Maqsad – malumotlar bazasining samaradorligini osh
SStorytelling with DataStorytelling with Data@DataStoryLab · channel
51posts in the index
Venue feed Open in Telegram

An open public feed from the search index ChatCrawler — “Google for public Telegram”; refreshed as the venue is crawled. Times are UTC.

Public content only, official Telegram API. About · FAQ · Index limits · Remove a page · Catalog · Search · How we count