Spaces:
Sleeping
Sleeping
Update salesforce_integration.py
Browse files
salesforce_integration.py
CHANGED
@@ -1,19 +1,20 @@
|
|
1 |
-
|
2 |
-
|
3 |
from simple_salesforce import Salesforce
|
4 |
import pandas as pd
|
|
|
5 |
|
6 |
def fetch_poles():
|
7 |
sf = Salesforce(
|
8 |
-
username="[email protected]",
|
9 |
-
password="Vedavathi@04",
|
10 |
-
security_token="jqe4His8AcuFJucZz5NBHfGU"
|
|
|
11 |
)
|
12 |
|
13 |
query = """
|
14 |
SELECT Name, Site__c, Solar_Generation__c, Wind_Generation__c,
|
15 |
Power_Required__c, Power_Sufficient__c, Camera_Status__c,
|
16 |
-
Alert_Level__c
|
|
|
17 |
FROM Pole__c
|
18 |
LIMIT 50
|
19 |
"""
|
|
|
|
|
|
|
1 |
from simple_salesforce import Salesforce
|
2 |
import pandas as pd
|
3 |
+
import streamlit as st
|
4 |
|
5 |
def fetch_poles():
|
6 |
sf = Salesforce(
|
7 |
+
username="[email protected]",
|
8 |
+
password="Vedavathi@04",
|
9 |
+
security_token="jqe4His8AcuFJucZz5NBHfGU",
|
10 |
+
domain="login" # use "login" for production, "test" for sandbox
|
11 |
)
|
12 |
|
13 |
query = """
|
14 |
SELECT Name, Site__c, Solar_Generation__c, Wind_Generation__c,
|
15 |
Power_Required__c, Power_Sufficient__c, Camera_Status__c,
|
16 |
+
Alert_Level__c, Health_Score__c, RFID_Tag__c, Location_Latitude__c,
|
17 |
+
Location_Longitude__c
|
18 |
FROM Pole__c
|
19 |
LIMIT 50
|
20 |
"""
|