@@ -149,18 +149,15 @@ public void testSimpleInsertWithPartitionedFields() throws Exception {
149149 + "' \n "
150150 + "TBLPROPERTIES '{ \" timestampAttributeKey\" : \" ts\" }'" ;
151151 String icebergTableString =
152- "CREATE EXTERNAL TABLE iceberg_table ( \n "
152+ format ( "CREATE EXTERNAL TABLE %s ( \n " , tableIdentifier )
153153 + " id BIGINT, \n "
154154 + " name VARCHAR \n "
155155 + ") \n "
156156 + "TYPE 'iceberg' \n "
157157 + "PARTITIONED BY('id', 'truncate(name, 3)') \n "
158- + "LOCATION '"
159- + tableIdentifier
160- + "' \n "
161158 + "TBLPROPERTIES '{ \" triggering_frequency_seconds\" : 10 }'" ;
162159 String insertStatement =
163- "INSERT INTO iceberg_table \n "
160+ format ( "INSERT INTO %s \n " , tableIdentifier )
164161 + "SELECT \n "
165162 + " pubsub_topic.payload.id, \n "
166163 + " pubsub_topic.payload.name \n "
@@ -207,18 +204,15 @@ public void testSimpleInsertFlat() throws Exception {
207204 + pubsub .topicPath ()
208205 + "' \n "
209206 + "TBLPROPERTIES '{ \" timestampAttributeKey\" : \" ts\" }'" ;
210- String bqTableString =
211- "CREATE EXTERNAL TABLE iceberg_table ( \n "
207+ String icebergTableString =
208+ format ( "CREATE EXTERNAL TABLE %s ( \n " , tableIdentifier )
212209 + " id BIGINT, \n "
213210 + " name VARCHAR \n "
214211 + ") \n "
215212 + "TYPE 'iceberg' \n "
216- + "LOCATION '"
217- + tableIdentifier
218- + "' \n "
219213 + "TBLPROPERTIES '{ \" triggering_frequency_seconds\" : 10 }'" ;
220214 String insertStatement =
221- "INSERT INTO iceberg_table \n "
215+ format ( "INSERT INTO %s \n " , tableIdentifier )
222216 + "SELECT \n "
223217 + " id, \n "
224218 + " name \n "
@@ -229,7 +223,7 @@ public void testSimpleInsertFlat() throws Exception {
229223 .withDdlString (createCatalogDdl )
230224 .withDdlString (setCatalogDdl )
231225 .withDdlString (pubsubTableString )
232- .withDdlString (bqTableString ));
226+ .withDdlString (icebergTableString ));
233227 pipeline .run ();
234228
235229 // Block until a subscription for this topic exists
0 commit comments