Search in sources :

Example 1 with FakeSnowflakeStreamingServiceImpl

use of org.apache.beam.sdk.io.snowflake.test.FakeSnowflakeStreamingServiceImpl in project beam by apache.

the class StreamingWriteTest method setup.

@BeforeClass
public static void setup() {
    snowflakeService = new FakeSnowflakeStreamingServiceImpl();
    PipelineOptionsFactory.register(TestSnowflakePipelineOptions.class);
    options = TestPipeline.testingPipelineOptions().as(TestSnowflakePipelineOptions.class);
    options.setUsername("username");
    options.setServerName("NULL.snowflakecomputing.com");
    testData = LongStream.range(0, 100).boxed().collect(Collectors.toList());
    FakeSnowflakeDatabase.createTable(FAKE_TABLE);
    dataSourceConfiguration = SnowflakeIO.DataSourceConfiguration.create(new FakeSnowflakeBasicDataSource()).withServerName(options.getServerName()).withSchema("PUBLIC").withDatabase("DATABASE").withWarehouse("WAREHOUSE");
}
Also used : FakeSnowflakeStreamingServiceImpl(org.apache.beam.sdk.io.snowflake.test.FakeSnowflakeStreamingServiceImpl) TestSnowflakePipelineOptions(org.apache.beam.sdk.io.snowflake.test.TestSnowflakePipelineOptions) FakeSnowflakeBasicDataSource(org.apache.beam.sdk.io.snowflake.test.FakeSnowflakeBasicDataSource) BeforeClass(org.junit.BeforeClass)

Aggregations

FakeSnowflakeBasicDataSource (org.apache.beam.sdk.io.snowflake.test.FakeSnowflakeBasicDataSource)1 FakeSnowflakeStreamingServiceImpl (org.apache.beam.sdk.io.snowflake.test.FakeSnowflakeStreamingServiceImpl)1 TestSnowflakePipelineOptions (org.apache.beam.sdk.io.snowflake.test.TestSnowflakePipelineOptions)1 BeforeClass (org.junit.BeforeClass)1