-
Notifications
You must be signed in to change notification settings - Fork 28
[FSTORE-1789] Data source docs #498
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 15 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
3e489bb
add rds
bubriks 2c4a847
update images for connectors
bubriks 998e860
rename storage connector -> data source
bubriks 225d275
update adls
bubriks a7a8f02
update external fg creation (from Lex)
bubriks dda1721
make docs work for current hopsworks-api (with relation to data sources)
bubriks 4da08c0
small fixes
bubriks 999ce1f
small fix
bubriks 1fb71e4
add warning
bubriks 4e5342d
feedback fix
bubriks 12376b8
Update docs/user_guides/fs/data_source/creation/gcs.md
bubriks fef06fa
Update docs/user_guides/fs/data_source/creation/gcs.md
bubriks fd9d872
Update docs/user_guides/fs/feature_group/create_external.md
bubriks 554a9d8
Update docs/user_guides/fs/data_source/index.md
bubriks a76f479
some feedback fixes
bubriks 167220e
feedback fix
bubriks 0db82e1
Update docs/user_guides/fs/feature_group/create_external.md
bubriks File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
File renamed without changes
File renamed without changes
File renamed without changes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file removed
BIN
-95.8 KB
docs/assets/images/guides/fs/storage_connector/bigquery_creation.png
Binary file not shown.
Binary file not shown.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Binary file removed
BIN
-91.7 KB
docs/assets/images/guides/fs/storage_connector/redshift_creation.png
Diff not rendered.
Diff not rendered.
Binary file removed
BIN
-108 KB
docs/assets/images/guides/fs/storage_connector/snowflake_creation.png
Diff not rendered.
Binary file removed
BIN
-235 KB
docs/assets/images/guides/fs/storage_connector/storage_connector_create.png
Diff not rendered.
Binary file removed
BIN
-235 KB
docs/assets/images/guides/fs/storage_connector/storage_connector_overview.png
Diff not rendered.
This file contains hidden or 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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
External feature groups are offline feature groups where their data is stored in an external table. An external table requires a storage connector, defined with the Connector API (or more typically in the user interface), to enable HSFS to retrieve data from the external table. An external feature group doesn't allow for offline data ingestion or modification; instead, it includes a user-defined SQL string for retrieving data. You can also perform SQL operations, including projections, aggregations, and so on. The SQL query is executed on-demand when HSFS retrieves data from the external Feature Group, for example, when creating training data using features in the external table. | ||
External feature groups are offline feature groups where their data is stored in an external table. An external table requires a data source, defined with the Connector API (or more typically in the user interface), to enable HSFS to retrieve data from the external table. An external feature group doesn't allow for offline data ingestion or modification; instead, it includes a user-defined SQL string for retrieving data. You can also perform SQL operations, including projections, aggregations, and so on. The SQL query is executed on-demand when HSFS retrieves data from the external Feature Group, for example, when creating training data using features in the external table. | ||
|
||
In the image below, we can see that HSFS currently supports a large number of data sources, including any JDBC-enabled source, Snowflake, Data Lake, Redshift, BigQuery, S3, ADLS, GCS, and Kafka | ||
In the image below, we can see that HSFS currently supports a large number of data sources, including any JDBC-enabled source, Snowflake, Data Lake, Redshift, BigQuery, S3, ADLS, GCS, RDS, and Kafka | ||
|
||
<img src="../../../../assets/images/concepts/fs/fg-connector-api.svg"> | ||
|
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,80 @@ | ||
# How-To set up a BigQuery Data Source | ||
|
||
## Introduction | ||
|
||
A BigQuery data source provides integration to Google Cloud BigQuery. | ||
BigQuery is Google Cloud's managed data warehouse supporting that lets you run analytics and | ||
execute SQL queries over large scale data. Such data warehouses are often the source of raw data for feature | ||
engineering pipelines. | ||
|
||
In this guide, you will configure a Data Source in Hopsworks to connect to your BigQuery project by saving the | ||
necessary information. | ||
When you're finished, you'll be able to execute queries and read results of BigQuery using Spark through | ||
HSFS APIs. | ||
|
||
The data source uses the Google `spark-bigquery-connector` behind the scenes. | ||
To read more about the spark connector, like the spark options or usage, check [Apache Spark SQL connector for Google BigQuery.](https://github.com/GoogleCloudDataproc/spark-bigquery-connector#usage | ||
'github.com/GoogleCloudDataproc/spark-bigquery-connector') | ||
|
||
!!! note | ||
Currently, it is only possible to create data sources in the Hopsworks UI. You cannot create a data source programmatically. | ||
|
||
## Prerequisites | ||
|
||
Before you begin this guide you'll need to retrieve the following information about your GCP account: | ||
|
||
- **BigQuery Project:** You need a BigQuery project, dataset and table created and have read access to it. Or, if | ||
you wish to query a public dataset you need its corresponding details. | ||
- **Authentication Method:** Authentication to GCP account is handled by uploading the `JSON keyfile for service | ||
account` to the Hopsworks Project. You will need to create this JSON keyfile from GCP. For more information on | ||
service accounts | ||
and creating keyfile in GCP, read [Google Cloud documentation.](https://cloud.google.com/docs/authentication/production#create_service_account | ||
'creating service account keyfile') | ||
|
||
!!! note | ||
To read data, the BigQuery service account user needs permission to `create read sesssion` which is available in **BigQuery Admin role**. | ||
|
||
## Creation in the UI | ||
### Step 1: Set up new Data Source | ||
|
||
Head to the Data Source View on Hopsworks (1) and set up a new data source (2). | ||
|
||
<figure markdown> | ||
 | ||
<figcaption>The Data Source View in the User Interface</figcaption> | ||
</figure> | ||
|
||
|
||
### Step 2: Enter source details | ||
Enter the details for your BigQuery storage. Start by giving | ||
it a unique **name** and an optional | ||
**description**. | ||
|
||
<figure markdown> | ||
 | ||
<figcaption>BigQuery Creation Form</figcaption> | ||
</figure> | ||
|
||
1. Select "Google BigQuery" as the storage. | ||
2. Next, set the name of the parent BigQuery project. This is used for billing by GCP. | ||
3. Authentication: Here you should upload your `JSON keyfile for service | ||
account` used for authentication. You can choose to either | ||
upload from your local using `Upload new file` or choose an existing file within project using `From Project`. | ||
4. Read Options: | ||
In the UI set the below fields, | ||
1. *BigQuery Project*: The BigQuery project to read | ||
2. *BigQuery Dataset*: The dataset of the table (Optional) | ||
3. *BigQuery Table*: The table to read (Optional) | ||
|
||
|
||
!!! note | ||
*Materialization Dataset*: Temporary dataset used by BigQuery for writing. It must be set to a dataset where the GCP user has table creation permission. The queried table must be in the same location as the `materializationDataset` (e.g 'EU' or 'US'). Also, if a table in the `SQL statement` is from project other than the `parentProject` then use the fully qualified table name i.e. `[project].[dataset].[table]` | ||
(Read more details from Google documentation on usage of query for BigQuery spark connector [here](https://github.com/GoogleCloudDataproc/spark-bigquery-connector#reading-data-from-a-bigquery-query)). | ||
|
||
5. Spark Options: Optionally, you can set additional spark options using the `Key - Value` pairs. | ||
6. Click on "Save Credentials". | ||
|
||
## Next Steps | ||
|
||
Move on to the [usage guide for data sources](../usage.md) to see how you can use your newly created BigQuery | ||
connector. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it makes sense to make them really bold, or white on color (like below), so that the numbers stick out a bit more. I have not noticed them at all at first. 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah i think all images are like this and i dont want to edit everything right now.