@@ -83,63 +83,6 @@ public SnowflakeLogsConnector() {
8383 this ("snowflake-logs" , SCHEMA_ONLY_SOURCE );
8484 }
8585
86- enum SnowflakeLogsConnectorProperty implements ConnectorProperty {
87- OVERRIDE_QUERY ("snowflake.logs.query" , "Custom query for log dump." ),
88- OVERRIDE_WHERE (
89- "snowflake.logs.where" , "Custom where condition to append to query for log dump." ),
90-
91- WAREHOUSE_EVENTS_HISTORY_OVERRIDE_QUERY (
92- "snowflake.warehouse_events_history.query" ,
93- "Custom query for warehouse events history dump" ),
94- AUTOMATIC_CLUSTERING_HISTORY_OVERRIDE_QUERY (
95- "snowflake.automatic_clustering_history.query" ,
96- "Custom query for automatic clustering history dump" ),
97- COPY_HISTORY_OVERRIDE_QUERY (
98- "snowflake.copy_history.query" , "Custom query for copy history dump" ),
99- DATABASE_REPLICATION_USAGE_HISTORY_OVERRIDE_QUERY (
100- "snowflake.database_replication_usage_history.query" ,
101- "Custom query for database replication usage history dump" ),
102- LOGIN_HISTORY_OVERRIDE_QUERY (
103- "snowflake.login_history.query" , "Custom query for login history dump" ),
104- METERING_DAILY_HISTORY_OVERRIDE_QUERY (
105- "snowflake.metering_daily_history.query" , "Custom query for metering daily history dump" ),
106- PIPE_USAGE_HISTORY_OVERRIDE_QUERY (
107- "snowflake.pipe_usage_history.query" , "Custom query for pipe usage history dump" ),
108- QUERY_ACCELERATION_HISTORY_OVERRIDE_QUERY (
109- "snowflake.query_acceleration_history.query" ,
110- "Custom query for query acceleration history dump" ),
111- REPLICATION_GROUP_USAGE_HISTORY_OVERRIDE_QUERY (
112- "snowflake.replication_group_usage_history.query" ,
113- "Custom query for replication group usage history dump" ),
114- SERVERLESS_TASK_HISTORY_OVERRIDE_QUERY (
115- "snowflake.serverless_task_history.query" , "Custom query for serverless task history dump" ),
116- TASK_HISTORY_OVERRIDE_QUERY (
117- "snowflake.task_history.query" , "Custom query for task history dump" ),
118- WAREHOUSE_LOAD_HISTORY_OVERRIDE_QUERY (
119- "snowflake.warehouse_load_history.query" , "Custom query for warehouse load history dump" ),
120- WAREHOUSE_METERING_HISTORY_OVERRIDE_QUERY (
121- "snowflake.warehouse_metering_history.query" ,
122- "Custom query for warehouse metering history dump" );
123-
124- private final String name ;
125- private final String description ;
126-
127- SnowflakeLogsConnectorProperty (String name , String description ) {
128- this .name = name ;
129- this .description = description ;
130- }
131-
132- @ Nonnull
133- public String getName () {
134- return name ;
135- }
136-
137- @ Nonnull
138- public String getDescription () {
139- return description ;
140- }
141- }
142-
14386 private static class TaskDescription {
14487 private final String zipPrefix ;
14588 private final String unformattedQuery ;
@@ -180,7 +123,7 @@ public String getDescription() {
180123 @ Override
181124 @ Nonnull
182125 public ImmutableList <ConnectorProperty > getPropertyConstants () {
183- return stream ( SnowflakeLogsConnectorProperty .values ()). collect ( toImmutableList () );
126+ return SnowflakeLogsConnectorProperty .getConstants ( );
184127 }
185128
186129 private String newQueryFormat (@ Nonnull ConnectorArguments arguments )
@@ -390,7 +333,7 @@ public final void addTasksTo(
390333 .map (
391334 item -> {
392335 String override = arguments .getDefinition (item .property );
393- String prefix = formatPrefix (item .headerClass , item .name ());
336+ String prefix = formatPrefix (item .headerClass , item .viewName ());
394337 String query = overrideableQuery (override , prefix , item .column .value );
395338 return new TaskDescription (item .zipPrefix , query , item .headerClass );
396339 })
@@ -547,6 +490,10 @@ enum TimeSeriesView {
547490 TASK_HISTORY ,
548491 WAREHOUSE_LOAD_HISTORY ,
549492 WAREHOUSE_METERING_HISTORY );
493+
494+ String viewName () {
495+ return name ();
496+ }
550497 }
551498
552499 @ Nonnull
0 commit comments