1515# limitations under the License.
1616#
1717
18+ import datetime
1819import os
1920import unittest
2021import uuid
3334 "EXPANSION_JARS environment var is not provided, "
3435 "indicating that jars have not been built" )
3536class ManagedIcebergIT (unittest .TestCase ):
36- WAREHOUSE = "gs://temp-storage-for-end-to-end-tests/xlang-python-using-java "
37+ WAREHOUSE = "gs://temp-storage-for-end-to-end-tests"
3738
3839 def setUp (self ):
3940 self .test_pipeline = TestPipeline (is_integration_test = True )
4041 self .args = self .test_pipeline .get_full_options_as_args ()
4142 self .args .extend ([
42- '--experiments=enable_managed_transforms' ,
43+ # '--experiments=enable_managed_transforms',
4344 ])
4445
4546 def _create_row (self , num : int ):
@@ -49,16 +50,24 @@ def _create_row(self, num: int):
4950 bytes_ = bytes (num ),
5051 bool_ = (num % 2 == 0 ),
5152 float_ = (num + float (num ) / 100 ),
52- arr_ = [num , num , num ])
53+ arr_ = [num , num , num ],
54+ date_ = datetime .date .today () - datetime .timedelta (days = num ))
5355
5456 def test_write_read_pipeline (self ):
57+ biglake_catalog_props = {
58+ 'type' : 'rest' ,
59+ 'uri' : 'https://biglake.googleapis.com/iceberg/v1/restcatalog' ,
60+ 'warehouse' : self .WAREHOUSE ,
61+ 'header.x-goog-user-project' : 'apache-beam-testing' ,
62+ 'rest.auth.type' : 'google' ,
63+ 'io-impl' : 'org.apache.iceberg.gcp.gcs.GCSFileIO' ,
64+ 'header.X-Iceberg-Access-Delegation' : 'vended-credentials' ,
65+ 'rest-metrics-reporting-enabled' : 'false'
66+ }
5567 iceberg_config = {
5668 "table" : "test_iceberg_write_read.test_" + uuid .uuid4 ().hex ,
5769 "catalog_name" : "default" ,
58- "catalog_properties" : {
59- "type" : "hadoop" ,
60- "warehouse" : self .WAREHOUSE ,
61- }
70+ "catalog_properties" : biglake_catalog_props
6271 }
6372
6473 rows = [self ._create_row (i ) for i in range (100 )]
0 commit comments