-
Notifications
You must be signed in to change notification settings - Fork 262
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GitHub Data Source Integration (#1233)
- [x] GitHub Data Source Integration - [x] Batching support for native storage engine. We can not do batching in storage engine, which does not work with limit. Revert the change. - [x] Full NamedUser table support - [x] Enable circle ci local PR cache for testmondata - [x] Native storage engine `read` refactory - [x] Testcases - [x] Github data source documentation
- Loading branch information
Showing
17 changed files
with
464 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
Github | ||
========== | ||
|
||
The connection to Github is based on the `PyGithub <https://github.com/PyGithub/PyGithub>`_ library. | ||
|
||
Dependency | ||
---------- | ||
|
||
* PyGithub | ||
|
||
|
||
Parameters | ||
---------- | ||
|
||
Required: | ||
|
||
* ``owner`` is the owner of the Github repository. For example, georgia-tech-db is the owner of the EvaDB repository. | ||
* ``repo`` is the name of the Github repository. For example, evadb is the name of this repository. | ||
|
||
Optional: | ||
|
||
* ``github_token`` is not required for public repositories. However, the rate limit is lower without a valid github_token. Check `Rate limits page <https://docs.github.com/en/rest/overview/resources-in-the-rest-api?apiVersion=2022-11-28#rate-limits>`_ to learn more about how to check your rate limit status. Check `Managing your personal access tokens page <https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens>`_ to learn how to create personal access tokens. | ||
|
||
Create Connection | ||
----------------- | ||
|
||
.. code-block:: text | ||
CREATE DATABASE github_data WITH ENGINE = 'github', PARAMETERS = { | ||
"owner": "georgia-tech-db", | ||
"repo": "evadb" | ||
}; | ||
Supported Tables | ||
---------------- | ||
|
||
* ``stargazers``: Lists the people that have starred the repository. Check `evadb/third_party/databases/github/table_column_info.py` for all the available columns in the table. | ||
|
||
.. code-block:: sql | ||
SELECT * FROM github_data.stargazers; | ||
Here is the query output: | ||
|
||
.. code-block:: | ||
+---------------------------------------------------+-----+---------------------------------------------+ | ||
| stargazers.avatar_url | ... | stargazers.url | | ||
|---------------------------------------------------|-----|---------------------------------------------| | ||
| https://avatars.githubusercontent.com/u/105357... | ... | https://api.github.com/users/jaehobang | | ||
| https://avatars.githubusercontent.com/u/436141... | ... | https://api.github.com/users/VineethAljapur | | ||
| ... | ... | ... | | ||
+---------------------------------------------------+-----+---------------------------------------------+ | ||
.. note:: | ||
|
||
Looking for another table from Github? You can add a table mapping in `evadb/third_party/databases/github/github_handler.py`, or simply raise a `Feature Request <https://github.com/georgia-tech-db/evadb/issues/new/choose>`_. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# coding=utf-8 | ||
# Copyright 2018-2023 EvaDB | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
"""github integration""" |
Oops, something went wrong.