mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-11-16 15:57:03 +00:00
information_schema.tables.create_options (and SHOW TABLE STATUS) printed object store credentials of external tables verbatim, and SHOW CREATE TABLE masked only access_key_id and secret_access_key. Mask all four credential keys in both paths, and sort extra options in create_options by key. Signed-off-by: Dennis Zhuang <killme2008@gmail.com>
28 lines
845 B
SQL
28 lines
845 B
SQL
CREATE TABLE external_table_credentials_source (
|
|
ts TIMESTAMP TIME INDEX,
|
|
val DOUBLE
|
|
);
|
|
|
|
INSERT INTO external_table_credentials_source VALUES (1, 1.0);
|
|
|
|
COPY external_table_credentials_source TO 'external_table_credentials/table.parquet';
|
|
|
|
CREATE EXTERNAL TABLE external_table_credentials
|
|
WITH (
|
|
location = 'external_table_credentials/table.parquet',
|
|
format = 'parquet',
|
|
access_key_id = 'AKID_PLAIN',
|
|
secret_access_key = 'SECRET_PLAIN',
|
|
session_token = 'TOKEN_PLAIN',
|
|
access_key_secret = 'OSS_SECRET_PLAIN'
|
|
);
|
|
|
|
SHOW CREATE TABLE external_table_credentials;
|
|
|
|
-- SQLNESS REPLACE __private\.file_table_meta=\S+ FILE_TABLE_META
|
|
SELECT create_options FROM information_schema.tables WHERE table_name = 'external_table_credentials';
|
|
|
|
DROP TABLE external_table_credentials;
|
|
|
|
DROP TABLE external_table_credentials_source;
|