Missed build?

65 views
Skip to first unread message

John Currey

unread,
Oct 20, 2021, 9:27:08 PM10/20/21
to SDQL API
Hi, 

I'm trying to update wins and losses for week 7 in my NFL database. As you can see, I added a 7:49 timestamp to my dictionary and I successfully added the Monday Night game. After the 8:00 hour, my data is not in the database. 

Oct20.JPG

I waited until after 9:00, and still nothing. It appears the database is not updating. 


John Currey

unread,
Oct 20, 2021, 9:39:54 PM10/20/21
to SDQL API
More info, earlier today, I imported all NFL week 6 data. I'm getting flooded with reports the NFL data is missing. I'm pretty sure the database (at least my NFL database) is not taking in new data. 

Joe Meyer

unread,
Oct 21, 2021, 6:56:05 AM10/21/21
to sdq...@googlegroups.com
John and API Friends,

I think I see the problem there.

The update code reads the data dictionary by:
1) no prefix (like date)
2) the t: prefix (like t:points)

A parameter with an o: prefix and no corresponding t: prefix will not be seen. 

Best regards,

Joe

--

---
You received this message because you are subscribed to the Google Groups "SDQL API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sdqlapi+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sdqlapi/d9a887b5-b5dc-4be6-9645-47436d1a67ddn%40googlegroups.com.

John Currey

unread,
Oct 21, 2021, 8:21:26 AM10/21/21
to SDQL API
Joe, 

Thanks for that information. I'll revise my strategy of updating single-sides of games going forward. 

More importantly, I'm pretty sure my NFL database is stuck. I updated NFL data this morning with code I've used many times successfully. The database did not update. I'm also updated NBA data this morning which worked as expected. 

Thanks,

Joe Meyer

unread,
Oct 21, 2021, 8:49:59 AM10/21/21
to sdq...@googlegroups.com
John and API Friends,

to help debug, can you please include an SDQL link showing the missing update?

Joe

John Currey

unread,
Oct 21, 2021, 11:00:42 AM10/21/21
to SDQL API
Sorry for the omission. I'm trying to update all week 6 game result data. This shows a small example of the non-updated data and the last time the data was updated for that game record.

Joe Meyer

unread,
Oct 21, 2021, 11:50:31 AM10/21/21
to sdq...@googlegroups.com
John,

I just successfully updated your data date with:

def jcurrey_post_data():
    url = "https://s3.sportsdatabase.com/api"
    d = { "date": 20211014, "t:team": "Eagles","data date":"20211121"}
    h = {'token':jcurrey_TOKEN,'client':'jcurrey','league':'NFL','action':'update'}
    ret = requests.post(url,json=d, headers=h)
    print("ret:",ret.status_code,ret.text,)

ret: 200 {"success": "20211014_Eagles", "action": "update"}

I cannot find a bug here. 
If you are still having troubles, please send a data dictionary that doesn't work or any other clues you may see,

Best,

Joe
 

John Currey

unread,
Oct 21, 2021, 6:49:32 PM10/21/21
to SDQL API
This was my error. I apologize for the false alarm. In my attempts to debug the issue below, I added code that stopped adding data as of the troublesome game I was trying to remove. I forgot to remove that code and was duped into thinking the build was failing. Thanks for your help, Joe. 
  • ret: 200 {"error": "team needs to be made of letters, spaces, underscores and dots. You have: *"}

Brian Goodness

unread,
Oct 23, 2021, 8:45:00 PM10/23/21
to SDQL API
Hi Joe,

I've been adding in some NBA data (e.g., game number, site streak, rest) and have been running into some issues with updating the fields, only for when the t:team is away (i.e., t:site=away).

I have two follow-up questions to your response in this thread:

(1) You might have already answered this above, but just to confirm, is there any way to update only one half/side of a game-- in particular, when the team is away-- without having to include stats for both the home and away teams in the same row/dict? (The stats for the home team seem to update fine when not also including stats for the away team.)

For instance, would it be possible to use the following dict structure to update the stats for the 2021-10-27 / 't:team': 'Timberwolves / 'o:team':'Bucks' game (as highlighted in attached screenshot)? (Note, the Timberwolves was the away team for that game.)

data_dict = {
    'date': 20211027,
    't:team': 'Timberwolves',
    'o:team': 'Bucks',
    't:game number': 4,
    't:rest': '1',
    't:site streak': 3,
    'venue name': 'Fiserv Forum',
    'venue city': 'Milwaukee',
    'venue state': 'WI',
    'venue capacity': 17341,
    'data datetimestamp': '2021-10-23 01:08:06'
}


https://s3.sportsdatabase.com/NBA/query.html?sdql=date%2C+t%3Agame+number%2C+team%2C+o%3Ateam%2C+o%3Agame+number%2C+t%3Asite+streak%2C+site%2C+o%3Asite+streak%2C+t%3Arest%2C+o%3Arest%2C+data+datetimestamp+%40+season%3D2021+and+date%3D20211027&submit=++S+D+Q+L+%21++

Screenshot from 2021-10-23 16-51-44.png

If it is not possible to update stats for the away team without also providing stats for the both sides/halves of the game (i.e., stats for both the home and away teams), then this won't be an issue, I am able to reconfigure my data to include both sides, I just wanted to confirm this indeed is the case. (The approach of including stats for both home and away sides in one row already worked for me, when testing on games for earlier in the 2021 season.)


(2) If stats for both sides/halves of a game must be included in order to update the second/opponent side (i.e., "o:" side) of the game, then, can you recommend a good way to clearly know which team is the "t:" side, and which team the "o:" team, in a game/row of the database?

I could make the assumption that the home team will always be the 't:' team/side, and the away team always the 'o:' team/side and this should work most of the time. However, this is not necessarily a good assumption all the time: some games are played at a neutral site, or, I could foresee there being instances when the home='t:' and away='o:' heuristic doesn't happen to be strictly followed (i.e., if the sides are inadvertently switched). For these edge cases, I guess I could always just use trial and error.

If you do have any insight/advice on a best practice for identifying the "t:" side of a game in the database (or if there is a good way to update only one side of a game when the team is away, without having to provide the fields for both sides), I'd appreciate it.

Thanks for all of your great work over the years and support during this transition.

Thanks, and have a good weekend.

--Brian

Joe Meyer

unread,
Oct 24, 2021, 8:18:20 AM10/24/21
to SDQL API
Brian,

can you please start a new thread for this new topic?

best regards,

Joe
Sports Database LLC

Reply all
Reply to author
Forward
0 new messages