Skip to content

[pull] master from cube-js:master #52

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 2 commits into from
Jul 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 28 additions & 1 deletion docs/pages/product/configuration/data-sources/snowflake.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,15 @@ Storage][google-cloud-storage] for export bucket functionality.
<InfoBox>

Ensure the AWS credentials are correctly configured in IAM to allow reads and
writes to the export bucket in S3.
writes to the export bucket in S3 if you are not using storage integration.
If you are using storage integration then you still need to configure access keys
for Cube Store to be able to read from the export bucket.
It's possible to authenticate with IAM roles instead of access keys for Cube Store.

</InfoBox>

Using IAM user credentials:

```dotenv
CUBEJS_DB_EXPORT_BUCKET_TYPE=s3
CUBEJS_DB_EXPORT_BUCKET=my.bucket.on.s3
Expand All @@ -146,6 +151,27 @@ CUBEJS_DB_EXPORT_BUCKET_AWS_SECRET=<AWS_SECRET>
CUBEJS_DB_EXPORT_BUCKET_AWS_REGION=<AWS_REGION>
```

[Using Storage Integration][snowflake-docs-aws-integration] to write to Export Bucket and
then Access Keys to read from Cube Store:

```dotenv
CUBEJS_DB_EXPORT_BUCKET_TYPE=s3
CUBEJS_DB_EXPORT_BUCKET=my.bucket.on.s3
CUBEJS_DB_EXPORT_INTEGRATION=aws_int
CUBEJS_DB_EXPORT_BUCKET_AWS_KEY=<AWS_KEY>
CUBEJS_DB_EXPORT_BUCKET_AWS_SECRET=<AWS_SECRET>
CUBEJS_DB_EXPORT_BUCKET_AWS_REGION=<AWS_REGION>
```

Using Storage Integration to write to export bocket and IAM role to read from Cube Store:
```dotenv
CUBEJS_DB_EXPORT_BUCKET_TYPE=s3
CUBEJS_DB_EXPORT_BUCKET=my.bucket.on.s3
CUBEJS_DB_EXPORT_INTEGRATION=aws_int
CUBEJS_DB_EXPORT_BUCKET_AWS_REGION=<AWS_REGION>
```


#### Google Cloud Storage

<InfoBox>
Expand Down Expand Up @@ -203,6 +229,7 @@ connections are made over HTTPS.
[snowflake-docs-account-id]:
https://docs.snowflake.com/en/user-guide/admin-account-identifier.html
[snowflake-docs-connection-options]: https://docs.snowflake.com/en/developer-guide/node-js/nodejs-driver-options#additional-connection-options
[snowflake-docs-aws-integration]: https://docs.snowflake.com/en/user-guide/data-load-s3-config-storage-integration
[snowflake-docs-gcs-integration]:
https://docs.snowflake.com/en/user-guide/data-load-gcs-config.html
[snowflake-docs-regions]:
Expand Down
1 change: 1 addition & 0 deletions rust/cubesql/cubeclient/src/models/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ pub mod v1_cube_meta_measure;
pub use self::v1_cube_meta_measure::V1CubeMetaMeasure;
pub mod v1_cube_meta_nested_folder;
pub use self::v1_cube_meta_nested_folder::V1CubeMetaNestedFolder;
pub use self::v1_cube_meta_nested_folder::V1CubeMetaNestedFolderMember;
pub mod v1_cube_meta_segment;
pub use self::v1_cube_meta_segment::V1CubeMetaSegment;
pub mod v1_cube_meta_type;
Expand Down
11 changes: 9 additions & 2 deletions rust/cubesql/cubeclient/src/models/v1_cube_meta_nested_folder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,23 @@
use crate::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(untagged)]
pub enum V1CubeMetaNestedFolderMember {
Simple(String),
Folder(V1CubeMetaNestedFolder),
}

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct V1CubeMetaNestedFolder {
#[serde(rename = "name")]
pub name: String,
#[serde(rename = "members")]
pub members: Vec<String>,
pub members: Vec<V1CubeMetaNestedFolderMember>,
}

impl V1CubeMetaNestedFolder {
pub fn new(name: String, members: Vec<String>) -> V1CubeMetaNestedFolder {
pub fn new(name: String, members: Vec<V1CubeMetaNestedFolderMember>) -> V1CubeMetaNestedFolder {
V1CubeMetaNestedFolder { name, members }
}
}
2 changes: 2 additions & 0 deletions rust/cubesql/cubesql/src/transport/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ pub type CubeMetaMeasure = cubeclient::models::V1CubeMetaMeasure;
pub type CubeMetaSegment = cubeclient::models::V1CubeMetaSegment;
pub type CubeMetaJoin = cubeclient::models::V1CubeMetaJoin;
pub type CubeMetaFolder = cubeclient::models::V1CubeMetaFolder;
pub type CubeMetaNestedFolder = cubeclient::models::V1CubeMetaNestedFolder;
pub type CubeMetaNestedFolderMember = cubeclient::models::V1CubeMetaNestedFolderMember;
pub type CubeMetaHierarchy = cubeclient::models::V1CubeMetaHierarchy;
// Request/Response
pub type TransportLoadResponse = cubeclient::models::V1LoadResponse;
Expand Down
Loading