Title: Missing alias in `PostgreSQLOfflineStore.pull_all_from_table_or_query()` · Issue #2954 · feast-dev/feast · GitHub
Open Graph Title: Missing alias in `PostgreSQLOfflineStore.pull_all_from_table_or_query()` · Issue #2954 · feast-dev/feast
X Title: Missing alias in `PostgreSQLOfflineStore.pull_all_from_table_or_query()` · Issue #2954 · feast-dev/feast
Description: Expected Behavior Call pull_all_from_table_or_query() method and retrieve wanted data from offline store. Current Behavior SQL error psycopg2.errors.SyntaxError: subquery in FROM must have an alias Steps to reproduce Call pull_all_from_t...
Open Graph Description: Expected Behavior Call pull_all_from_table_or_query() method and retrieve wanted data from offline store. Current Behavior SQL error psycopg2.errors.SyntaxError: subquery in FROM must have an alias...
X Description: Expected Behavior Call pull_all_from_table_or_query() method and retrieve wanted data from offline store. Current Behavior SQL error psycopg2.errors.SyntaxError: subquery in FROM must have an alias...
Opengraph URL: https://github.com/feast-dev/feast/issues/2954
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Missing alias in `PostgreSQLOfflineStore.pull_all_from_table_or_query()`","articleBody":"## Expected Behavior\r\nCall `pull_all_from_table_or_query()` method and retrieve wanted data from offline store.\r\n\r\n## Current Behavior\r\nSQL error `psycopg2.errors.SyntaxError: subquery in FROM must have an alias`\r\n\r\n## Steps to reproduce\r\nCall `pull_all_from_table_or_query()` on `PostgreSQLOfflineStore`, where `PostgreSQLSource` is initialized with `query=\"SELECT * FROM table_name\"`\r\n### Specifications\r\n\r\n- Version: 0.22.1\r\n- Platform: x86_64\r\n- Subsystem: Linux 5.18\r\n\r\n## Possible Solution\r\n\r\nAdding alias in query located in `PostgreSQLOfflineStore.pull_all_from_table_or_query()`, for example adding `AS dummy_alias`. This was tested on my use-case and it works as expected, and if it looks ok, I could open a PR with this change.\r\n\r\n```\r\nquery = f\"\"\"\r\n SELECT {field_string}\r\n FROM {from_expression} AS dummy_alias\r\n WHERE \"{timestamp_field}\" BETWEEN '{start_date}'::timestamptz AND '{end_date}'::timestamptz\r\n \"\"\"\r\n```","author":{"url":"https://github.com/ikrizanic","@type":"Person","name":"ikrizanic"},"datePublished":"2022-07-20T06:28:22.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/2954/feast/issues/2954"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:3ff94537-d9c7-1304-c21e-0b838b600f81 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D8F0:31EBE5:2BBF369:3D8F1FE:6979119F |
| html-safe-nonce | a7bbefa7d618dd9aa635759cce385ea82f13db3496379c71f78c778df0221018 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEOEYwOjMxRUJFNToyQkJGMzY5OjNEOEYxRkU6Njk3OTExOUYiLCJ2aXNpdG9yX2lkIjoiODQyMjk3OTM5NjY3ODc4MzM5MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 07d552ef65208680e35a996581c4a3b429ed895d3e4a58acb3fe285f592678e0 |
| hovercard-subject-tag | issue:1310510763 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/feast-dev/feast/2954/issue_layout |
| twitter:image | https://opengraph.githubassets.com/19c74766f97ecdf9dc1db14e8558b8b0c681c835464503b85ee5316ab376872d/feast-dev/feast/issues/2954 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/19c74766f97ecdf9dc1db14e8558b8b0c681c835464503b85ee5316ab376872d/feast-dev/feast/issues/2954 |
| og:image:alt | Expected Behavior Call pull_all_from_table_or_query() method and retrieve wanted data from offline store. Current Behavior SQL error psycopg2.errors.SyntaxError: subquery in FROM must have an alias... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ikrizanic |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7d50f2cedfc2d2acbd4c9d2f93e5aa96628b5eacaf0dc7eb969769933f2a2eba |
| turbo-cache-control | no-preview |
| go-import | github.com/feast-dev/feast git https://github.com/feast-dev/feast.git |
| octolytics-dimension-user_id | 57027613 |
| octolytics-dimension-user_login | feast-dev |
| octolytics-dimension-repository_id | 161133770 |
| octolytics-dimension-repository_nwo | feast-dev/feast |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 161133770 |
| octolytics-dimension-repository_network_root_nwo | feast-dev/feast |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 021fe83a7105c137484bab707d5369ea22968cb8 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width