Skip to main content

Python package with helper functions for the Data team.

Project description

fb_data

A Python package for working with Snowflake data.

Installation

You can install this package using pip:

pip install git+https://github.com/yourusername/fb_data.git

Usage

from fb_data import Snowflake

# Initialize Snowflake connection
sf = Snowflake(
    user="your_username",
    password="your_password",
    account='your_account',
    warehouse='your_warehouse',
    database='your_database',
    schema='your_schema',
    role='your_role'
)

# Execute a query
result = sf.execute_query("SELECT * FROM your_table LIMIT 10")

# Execute a query and get results as a DataFrame
df = sf.execute_query_to_dataframe("SELECT * FROM your_table LIMIT 10")

# Write a DataFrame to Snowflake
import pandas as pd
df = pd.DataFrame(...)  # Your data here
sf.write_dataframe_to_table(df, 'your_table', if_exists='replace')

# Close the connection
sf.close()

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fb_data-0.1.0.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

fb_data-0.1.0-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file fb_data-0.1.0.tar.gz.

File metadata

  • Download URL: fb_data-0.1.0.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.11.2 Darwin/24.0.0

File hashes

Hashes for fb_data-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1f587b4908dfd12638a4e9ae268e779bfb6652b059ca3ee36020b387aab41425
MD5 35bef7bc7ed174e0b192721f3f75cb9c
BLAKE2b-256 c22f936a05d0c4b14355fc418810a076a3066976103004143b85f8e3441dfa5a

See more details on using hashes here.

File details

Details for the file fb_data-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: fb_data-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.11.2 Darwin/24.0.0

File hashes

Hashes for fb_data-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 84805d6cef0f872ae5c71f84cfe673a87c29d44c2ad88e5c9a1844a7e1c9a5c0
MD5 0558d408d8cef46c6079d1c0951d7132
BLAKE2b-256 05ccb0355fcd98b5d7b327a90ba99ebd0a26950f8e5a2f20e08b51beacebd69b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page