Search in sources :

Example 16 with DataSource

use of com.google.cloud.bigquery.datatransfer.v1.DataSource in project atlasmap by atlasmap.

the class AtlasEndpointTest method testDocId.

@Test
public void testDocId() throws Exception {
    List<DataSource> ds = new ArrayList<>();
    DataSource source = new DataSource();
    source.setDataSourceType(DataSourceType.SOURCE);
    source.setId("my-source-doc");
    ds.add(source);
    DataSource target = new DataSource();
    target.setDataSourceType(DataSourceType.TARGET);
    target.setId("my-target-doc");
    ds.add(target);
    perform(ds, "my-source-doc", "my-target-doc", false);
}
Also used : ArrayList(java.util.ArrayList) DataSource(io.atlasmap.v2.DataSource) Test(org.junit.Test)

Example 17 with DataSource

use of com.google.cloud.bigquery.datatransfer.v1.DataSource in project atlasmap by atlasmap.

the class AtlasEndpointTest method noConversionIfJavaDataSource.

@Test(expected = ComparisonFailure.class)
public void noConversionIfJavaDataSource() throws Exception {
    final List<DataSource> dataSources = new ArrayList<>();
    final DataSource dataSource = new DataSource();
    dataSource.setDataSourceType(DataSourceType.SOURCE);
    dataSource.setUri("atlas:java:some.Type");
    dataSources.add(dataSource);
    perform(dataSources, null, null, true);
}
Also used : ArrayList(java.util.ArrayList) DataSource(io.atlasmap.v2.DataSource) Test(org.junit.Test)

Example 18 with DataSource

use of com.google.cloud.bigquery.datatransfer.v1.DataSource in project atlasmap by atlasmap.

the class JavaValidationServiceTest method generateDataSource.

protected DataSource generateDataSource(String uri, DataSourceType type, String docId) {
    DataSource ds = new DataSource();
    ds.setUri(uri);
    ds.setDataSourceType(type);
    ds.setId(docId);
    return ds;
}
Also used : DataSource(io.atlasmap.v2.DataSource)

Example 19 with DataSource

use of com.google.cloud.bigquery.datatransfer.v1.DataSource in project atlasmap by atlasmap.

the class BaseMarshallerTest method generateDataSource.

private DataSource generateDataSource(String id, String uri, DataSourceType type) {
    DataSource dataSource = new DataSource();
    dataSource.setId(id);
    dataSource.setUri(uri);
    dataSource.setDataSourceType(type);
    return dataSource;
}
Also used : DataSource(io.atlasmap.v2.DataSource)

Example 20 with DataSource

use of com.google.cloud.bigquery.datatransfer.v1.DataSource in project atlasmap by atlasmap.

the class JsonJsonFlatMappingTest method generateDataSource.

protected DataSource generateDataSource(String uri, DataSourceType type) {
    DataSource ds = new DataSource();
    ds.setUri(uri);
    ds.setDataSourceType(type);
    return ds;
}
Also used : DataSource(io.atlasmap.v2.DataSource)

Aggregations

DataSource (io.atlasmap.v2.DataSource)54 AtlasMapping (io.atlasmap.v2.AtlasMapping)15 ArrayList (java.util.ArrayList)14 Mapping (io.atlasmap.v2.Mapping)11 XmlDataSource (io.atlasmap.xml.v2.XmlDataSource)10 Mappings (io.atlasmap.v2.Mappings)8 JsonDataSource (io.atlasmap.json.v2.JsonDataSource)7 Test (org.junit.Test)7 File (java.io.File)6 JavaField (io.atlasmap.java.v2.JavaField)5 AtlasContext (io.atlasmap.api.AtlasContext)4 AtlasSession (io.atlasmap.api.AtlasSession)4 XmlNamespaces (io.atlasmap.xml.v2.XmlNamespaces)4 JsonProcessingException (com.fasterxml.jackson.core.JsonProcessingException)3 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)3 AtlasException (io.atlasmap.api.AtlasException)3 DataSourceType (io.atlasmap.v2.DataSourceType)3 HashMap (java.util.HashMap)3 AtlasContextFactory (io.atlasmap.api.AtlasContextFactory)2 ADM (io.atlasmap.api.AtlasContextFactory.Format.ADM)2