To allow the testing of the Cloud Data Fabric a number of data sets have been created.
Three different databases in Azure and AWS, along with BLOB and s3 bucket files have been created.
Access to these requires the definition of the metadata within the cloud data fabric which is achieved by:
-
Creating the data source, and Registering the data source for databases.
-
Creating Databases for s3 and BLOB files
Once the data sources have been defined the data can then be queried using the SQL editor.
The following commands should be executed within the SQL Editor on the Schema Store View page of the GUI to define and register the desired data sources;
AWS Redshift commands
AWS_RDSH Datasource:
CREATE DATASOURCE AWS_RDSH DESCRIBE BY "AWS_RDSH" OPTIONS (
|
AWS_ORCL Datasource:
CREATE DATASOURCE AWS_ORCL DESCRIBE BY "AWS_ORCL" OPTIONS (
|
Azure SQL commands
AZURE_MSSQL Datasource:
CREATE DATASOURCE AZURE_MSSQL DESCRIBE BY "AZURE_MSSQL" OPTIONS (
|
AZURE_POSTGRES Datasource:
CREATE DATASOURCE AZURE_POSTGRES DESCRIBE BY "sports sample data" OPTIONS (
|
Azure BLOB commands
TPCH_AZBLB Databases:
CREATE LIGHTNING DATABASE TPCH_AZBLB DESCRIBE BY "TPCH Data set in Azure blob";
CREATE LIGHTNING FILESTORE TABLE nation FROM TPCH_AZBLB FORMAT CSV OPTIONS ( CREATE LIGHTNING FILESTORE TABLE partsupp FROM TPCH_AZBLB FORMAT CSV OPTIONS ( CREATE LIGHTNING FILESTORE TABLE part FROM TPCH_AZBLB FORMAT CSV OPTIONS ( CREATE LIGHTNING FILESTORE TABLE region FROM TPCH_AZBLB FORMAT CSV OPTIONS ( CREATE LIGHTNING FILESTORE TABLE supplier FROM TPCH_AZBLB FORMAT CSV OPTIONS (
|
AWS s3 commands
TPCH_S3 Databases:
DROP LIGHTNING DATABASE TPCH_S3;
CREATE LIGHTNING DATABASE TPCH_S3 DESCRIBE BY "TPCH Data set in aws s3";
CREATE LIGHTNING FILESTORE TABLE customer FROM TPCH_S3 FORMAT CSV OPTIONS (
PATH "s3n://zetaris-lightning-test/csv-data/tpc-h/customer.csv",
inferSchema "true",
header "true",
AWSACCESSKEYID "AKIAUDI43WQVVSVX6YWZ",
AWSSECRETACCESSKEY "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"
);
CREATE LIGHTNING FILESTORE TABLE line FROM TPCH_S3 FORMAT CSV OPTIONS (
PATH "s3n://zetaris-lightning-test/csv-data/tpc-h/line.csv",
inferSchema "true",
header "true",
AWSACCESSKEYID "AKIAUDI43WQVVSVX6YWZ",
AWSSECRETACCESSKEY "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"
);
CREATE LIGHTNING FILESTORE TABLE nation FROM TPCH_S3 FORMAT CSV OPTIONS (
PATH "s3n://zetaris-lightning-test/csv-data/tpc-h/nation.csv",
header "true",
inferSchema "true",
AWSACCESSKEYID "AKIAUDI43WQVVSVX6YWZ",
AWSSECRETACCESSKEY "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"
);
CREATE LIGHTNING FILESTORE TABLE orders FROM TPCH_S3 FORMAT CSV OPTIONS (
PATH "s3n://zetaris-lightning-test/csv-data/tpc-h/orders.csv",
header "true",
inferSchema "true",
AWSACCESSKEYID "AKIAUDI43WQVVSVX6YWZ",
AWSSECRETACCESSKEY "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"
);
CREATE LIGHTNING FILESTORE TABLE partsupp FROM TPCH_S3 FORMAT CSV OPTIONS (
PATH "s3n://zetaris-lightning-test/csv-data/tpc-h/partsupp.csv",
header "true",
inferSchema "true",
AWSACCESSKEYID "AKIAUDI43WQVVSVX6YWZ",
AWSSECRETACCESSKEY "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"
);
CREATE LIGHTNING FILESTORE TABLE part FROM TPCH_S3 FORMAT CSV OPTIONS (
PATH "s3n://zetaris-lightning-test/csv-data/tpc-h/part.csv",
header "true",
inferSchema "true",
AWSACCESSKEYID "AKIAUDI43WQVVSVX6YWZ",
AWSSECRETACCESSKEY "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"
);
CREATE LIGHTNING FILESTORE TABLE region FROM TPCH_S3 FORMAT CSV OPTIONS (
PATH "s3n://zetaris-lightning-test/csv-data/tpc-h/region.csv",
header "true",
inferSchema "true",
AWSACCESSKEYID "AKIAUDI43WQVVSVX6YWZ",
AWSSECRETACCESSKEY "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"
);
CREATE LIGHTNING FILESTORE TABLE supplier FROM TPCH_S3 FORMAT CSV OPTIONS (
PATH "s3n://zetaris-lightning-test/csv-data/tpc-h/supplier.csv",
header "true",
inferSchema "true",
AWSACCESSKEYID "AKIAUDI43WQVVSVX6YWZ",
AWSSECRETACCESSKEY "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"
);
|