Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import datetime
- class Topclass:
- @staticmethod
- def main_func():
- today = datetime.date.today()
- date_string = str(today.year)+"-"+str(today.month)+"-"+str(today.day)
- @staticmethod
- def checkvalue():
- try:
- conn = pyodbc.connect('DRIVER={SQL Server};SERVER=test.database.windows.net,1433',database='testdb',user='fa',password='sampletest1234')
- query = "SELECT people, COUNT(people) as summation FROM dbo.dim_productinformation GROUP by valuecount"
- data = pd.read_sql(query,conn)
- except:
- raise
- @staticmethod
- def tableupdate():
- #here I would like to call the 'date_string' variable from main_func() and 'data' from checkvalue()
Add Comment
Please, Sign In to add comment