Giter Site home page Giter Site logo

mariodavid / cuba-component-data-import Goto Github PK

View Code? Open in Web Editor NEW
19.0 8.0 15.0 3.11 MB

CUBA component for easy data import

License: Apache License 2.0

Groovy 78.76% Java 19.35% Shell 1.89%
cuba-platform cuba-component data-import excel-import csv-import

cuba-component-data-import's People

Contributors

alex-haulmont avatar genthalili avatar glundy avatar mariodavid avatar morumbi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cuba-component-data-import's Issues

support N:1 associations by any attribute for import

MlbPlayer N:1 MlbTeam through the attribute team. Now MlbTeam has attributes name and code.

In the CSV file there is a reference to team and it contains the code of the MlbTeam entity.
The equivalent in Excel is vlookup :)

Here's the full example:

bildschirmfoto 2018-04-05 um 12 30 03

bildschirmfoto 2018-04-05 um 12 33 03

It should be possible to define in the wizard that the column team belongs to the entity attribute team.code and this leads to the correct import behavior as described in this example.

No valid Attribute binder for AttributeBindRequest

Testing the component by importing records that are related to another table generates the following error
java.lang.IllegalStateException: No valid Attribute binder for AttributeBindRequest: de.diedavids.cuba.dataimport.binding.AttributeBindRequest@3cc02566 found at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:83) at org.codehaus.groovy.reflection.CachedConstructor.doConstructorInvoke(CachedConstructor.java:77) at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrap.callConstructor(ConstructorSite.java:84) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:247) at de.diedavids.cuba.dataimport.binding.AttributeBinderFactory.createAttributeBinderFromBindingRequest(AttributeBinderFactory.groovy:40) at de.diedavids.cuba.dataimport.binding.AttributeBinderFactory$createAttributeBinderFromBindingRequest.call(Unknown Source) at de.diedavids.cuba.dataimport.binding.EntityBinderImpl.bindAttribute(EntityBinderImpl.groovy:37) at sun.reflect.GeneratedMethodAccessor259.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325) at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:384) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022) at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:69) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:190) at de.diedavids.cuba.dataimport.binding.EntityBinderImpl$_bindAttributes_closure1.doCall(EntityBinderImpl.groovy:28) at sun.reflect.GeneratedMethodAccessor258.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325) at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022) at groovy.lang.Closure.call(Closure.java:414) at groovy.lang.Closure.call(Closure.java:430) at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2040) at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2025) at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2066) at org.codehaus.groovy.runtime.dgm$163.invoke(Unknown Source) at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:274) at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:56) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125) at de.diedavids.cuba.dataimport.binding.EntityBinderImpl.bindAttributes(EntityBinderImpl.groovy:27) at de.diedavids.cuba.dataimport.binding.EntityBinder$bindAttributes.call(Unknown Source) at de.diedavids.cuba.dataimport.service.GenericDataImporterServiceBean.bindAttributes(GenericDataImporterServiceBean.groovy:232) at de.diedavids.cuba.dataimport.service.GenericDataImporterServiceBean$bindAttributes$0.callCurrent(Unknown Source) at de.diedavids.cuba.dataimport.service.GenericDataImporterServiceBean.createEntityFromRow(GenericDataImporterServiceBean.groovy:226) at sun.reflect.GeneratedMethodAccessor276.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325) at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:384) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022) at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:69) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:174) at de.diedavids.cuba.dataimport.service.GenericDataImporterServiceBean$_createEntities_closure5.doCall(GenericDataImporterServiceBean.groovy:218) at sun.reflect.GeneratedMethodAccessor275.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325) at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022) at groovy.lang.Closure.call(Closure.java:414) at groovy.lang.Closure.call(Closure.java:430) at org.codehaus.groovy.runtime.DefaultGroovyMethods.collect(DefaultGroovyMethods.java:3202) at org.codehaus.groovy.runtime.DefaultGroovyMethods.collect(DefaultGroovyMethods.java:3172) at org.codehaus.groovy.runtime.dgm$67.invoke(Unknown Source) at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:274) at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:56) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125) at de.diedavids.cuba.dataimport.service.GenericDataImporterServiceBean.createEntities(GenericDataImporterServiceBean.groovy:217) at de.diedavids.cuba.dataimport.service.GenericDataImporterServiceBean$createEntities.callCurrent(Unknown Source) at de.diedavids.cuba.dataimport.service.GenericDataImporterServiceBean.doDataImport(GenericDataImporterServiceBean.groovy:49) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:85) at com.haulmont.cuba.core.sys.ServiceInterceptor.aroundInvoke(ServiceInterceptor.java:117) at sun.reflect.GeneratedMethodAccessor147.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:629) at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:618) at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:70) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:168) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213) at com.sun.proxy.$Proxy147.doDataImport(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.haulmont.cuba.core.sys.remoting.LocalServiceInvokerImpl.invoke(LocalServiceInvokerImpl.java:94) at com.haulmont.cuba.web.sys.remoting.LocalServiceProxy$LocalServiceInvocationHandler.invoke(LocalServiceProxy.java:154) at com.sun.proxy.$Proxy298.doDataImport(Unknown Source) at de.diedavids.cuba.dataimport.service.GenericDataImporterService$doDataImport.call(Unknown Source) at de.diedavids.cuba.dataimport.web.importwizard.ImportWizard.startImport(ImportWizard.groovy:239) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.haulmont.cuba.gui.xml.DeclarativeAction.actionPerform(DeclarativeAction.java:92) at com.haulmont.cuba.web.gui.components.WebButton.performAction(WebButton.java:44) at com.haulmont.cuba.web.gui.components.WebButton.lambda$new$61446b05$1(WebButton.java:36) at sun.reflect.GeneratedMethodAccessor300.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:510) at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:200) at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:163) at com.vaadin.server.AbstractClientConnector.fireEvent(AbstractClientConnector.java:1037) at com.vaadin.ui.Button.fireClick(Button.java:377) at com.haulmont.cuba.web.toolkit.ui.CubaButton.fireClick(CubaButton.java:54) at com.vaadin.ui.Button$1.click(Button.java:54) at sun.reflect.GeneratedMethodAccessor299.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.vaadin.server.ServerRpcManager.applyInvocation(ServerRpcManager.java:158) at com.vaadin.server.ServerRpcManager.applyInvocation(ServerRpcManager.java:119) at com.vaadin.server.communication.ServerRpcHandler.handleInvocation(ServerRpcHandler.java:444) at com.vaadin.server.communication.ServerRpcHandler.handleInvocations(ServerRpcHandler.java:409) at com.vaadin.server.communication.ServerRpcHandler.handleRpc(ServerRpcHandler.java:274) at com.vaadin.server.communication.UidlRequestHandler.synchronizedHandleRequest(UidlRequestHandler.java:90) at com.vaadin.server.SynchronizedRequestHandler.handleRequest(SynchronizedRequestHandler.java:41) at com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1435) at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:361) at com.haulmont.cuba.web.sys.CubaApplicationServlet.serviceAppRequest(CubaApplicationServlet.java:300) at com.haulmont.cuba.web.sys.CubaApplicationServlet.service(CubaApplicationServlet.java:191) at javax.servlet.http.HttpServlet.service(HttpServlet.java:742) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.springframework.web.filter.CompositeFilter$VirtualFilterChain.doFilter(CompositeFilter.java:107) at org.springframework.web.filter.CompositeFilter.doFilter(CompositeFilter.java:73) at com.haulmont.cuba.web.sys.CubaHttpFilter.doFilter(CubaHttpFilter.java:107) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at com.haulmont.cuba.web.sys.singleapp.SingleAppWebContextLoader$SetClassLoaderFilter.doFilter(SingleAppWebContextLoader.java:277) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:496) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:650) at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:677) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:803) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:790) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1468) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748)
Entity
`@Entity(name = "mdsf$CtlGrupo")
public class CtlGrupo extends BaseStringIdEntity implements Updatable, Creatable {
private static final long serialVersionUID = -5560200675400158080L;

@Id
@Column(name = "ID", nullable = false, length = 3)
private String id;

@NotNull
@Column(name = "NOM_GRUPO", nullable = false, length = 200)
private String nombre;

@Lookup(type = LookupType.DROPDOWN)
@NotNull
@ManyToOne(fetch = FetchType.LAZY, optional = false)
@JoinColumn(name = "CAPITULO_ID")
private CtlCapitulo capitulo;

@Composition
@OnDeleteInverse(DeletePolicy.CASCADE)
@OneToMany(mappedBy = "grupo")
private List<CtlCategoria> categorias;

@Column(name = "FH_CREACION")
private Date createTs;

@Column(name = "CREADO_POR", length = 50)
private String createdBy;

@Column(name = "FH_MODIFICADO")
private Date updateTs;

@Column(name = "MODIFICADO_POR", length = 50)
private String updatedBy;`

image

Nelson F.

Descope export

Lets try to make clear, that it is not about data export. CUBA already has capabilities for data export: Excel export, reports, Entity Inspector export.

We should get a clear idea about what this is and what it is not. From my point of view: it is only data import from files.

Idea of UI for importing

I imagine that something it is working in Excel could be some potential end goal:

Excel Import example

We could try to come up with UI sketches that will guide us on where the feature-set as well as the implementation should go.

release 0.1.0

  • create bintray component
  • deploy to bintray
  • create release notes

Oracle support

the app component should support Oracle out of the box.

TODO:

  • generate Oracle script through Studio

Define attribute path without Entity name

In the wizard when changing the entity attribute in the mapping there has to be the prefix of the Entity class (e.g. ddcdit$MlbTeam.code instead of just code). The latter would be better --> refactoring

Thinking about the API names

  • ImporterAPI
  • DataImportService

we should try to scope it to something that it definivitly is and descope something that it is not. Import is a very broad term. Webservice import, only File import, only CSV file import etc.?

Support for Dynamic Attributes

Mario,

Thank you for providing a valuable component to the community. I'm currently not able to set a category and dynamic attribute on an imported entity. Is this not supported and if not, do you plan to?

Thanks!

configure attribute(s) unique configurations in wizard

As a user of the wizard
When I try to import data via the wizard
And I configure a unique configuration for the column "customer.firstName"
And I configure the strategy "skip if found"
Then this item should not be imported
As a user of the wizard
When I try to import data via the wizard
And I configure a unique configuration for the column "customer.firstName"
And I configure the strategy "update if found"
Then this item should be imported and update the attributes of the existing entity instance

create groovy script per import attribute

In order to enable an escape mode for more complex situations, there should be a way for the user to define for every attribute how the mapping from the CSV / Excel value to the entity attribute should happen.

This will be an alternative to the already implemented "easy" cases, like N:1 association lookup, Enum parsing etc.

Issue importing field/column using BigDecimal format

Hello Mario,

Neat tool - thanks for your contribution.

I'm unable to import a BigDecimal-formatted field. Please take a look if you have time, I have some info below that could help you fix this:

It appears BigDecimal format is not handled in the getValue method for the DatatypeAttributeBinder.groovy file (dataimport-core-0.2.0.jar/de.diedavids.cuba.dataimport/binding/DataTypeAttributeBinder.groovy):

private getValue(AttributeBindRequest bindRequest) {
        switch (bindRequest.metaProperty.javaType) {
            case Integer: return getIntegerValue(bindRequest.rawValue, bindRequest.dataRow)
            case Double: return getDoubleValue(bindRequest.rawValue, bindRequest.dataRow)
            case Date: return getDateValue(bindRequest.importConfiguration, bindRequest.rawValue)
            case Boolean: return getBooleanValue(bindRequest.importConfiguration, bindRequest.rawValue, bindRequest.dataRow)
            case String: return getStringValue(bindRequest.rawValue)
        }
    }

PostgreSQL support

the app component should support PostgreSQL out of the box.

TODO:

  • generate PostgreSQL script through Studio

different import strategies: single-transaction, transaction-per-entity

There are cases where either a single-transaction mode makes sense. All Entities are processed by a single transaction. If any of the entities have validation errors or unique constraints, none of the entities should be processes.
But there is also the case, where the user only wants to see which rows were not processed because of the failure, but for all other entities, they should have imported (transaction-per-entity).

The ImportConfiguration should allow to define, for which configuration which import strategy is used.

N:1 association binding throws error in case there is no result in the query

Currently when an N:1 association is configured in the import mapper and the imported is started with a data row that has a reference to a non-existing enity reference, then an exception is thrown:

NoSuchElementException: Cannot access first() element from an empty List

instead it should just not get bound.

make entity attribute selectable via tree selection

As a user of the wizard
When I configure the entity attribute mapper configuration for "Customer.firstName"
Then I want to select the entity attribute via a tree selection just like in the "generic filter > add filter condition dialog"
As a user of the wizard
When I configure the entity attribute mapper configuration for "MlbPlayer.team.code"
Then I want to select the entity attribute via a tree selection just like in the "generic filter > add filter condition dialog"

support back option in import wizard

As a user of the import wizard
When I have made a mistake in a previous step
Then I would like to have the ability to go one step back in the wizard so that I can correct my mistake

Select existing import configuration in Import wizard

As a user of the import system
When I open the import wizard and uploaded a file
Then I want to be able to select an existing import configuration after selecting a entity class
So that I don't need to define the different configurations every time I want to import the same kind of file

Import of inherited entities

Hi,
There seems to be a bug on import of inherited entities. The importer picks the class for the parent entity instead of the entity i am trying to import, when i change the mapping to be the inherited, i get 0 imports.
Is it possible to cast the entity to the type on the dropdown?

exclude columns from import in wizard

It should be possible to exclude columns from the import process. One candidate in the example would be the position column, that is available in the CSV file, but not included in the domain model.

create README

topics:

  • using wizard
  • describing options of import configuration
  • format supported

0.3.0 AttributeBindRequest not found

IllegalStateException: No valid Attribute binder for AttributeBindRequest: de.diedavids.cuba.dataimport.binding.AttributeBindRequest@1ffc1404 found
Since I upgraded to 0.3.0

Support for XML files

As a user of the wizard
When I start the Import wizard
Then I want to import a XML file and map the attributes of the file to the entity attributes as with CSV files

Support default values for Strings in Entity mapping

As a User of the wizard
When I configure the entity attribute mapping for a String attribute in the import configuration
Then I want to configure a default value in case there is no value defined in the import file

Support for JSON files

As a user of the wizard
When I start the Import wizard
Then I want to import a JSON file and map the attributes of the file to the entity attributes as with CSV files

MySQL support

the app component should support MySQL out of the box.

TODO:

  • generate MySQL script through Studio

Custom preCommit Import script

As a development / development alike user of the system
When I create an import configuration
Then I want to configure a custom "preCommit" groovy script, which will be executed right before the the import is started (and bean validation is executed)
So that I can programmatically define certain behavior on a per entity basis

Different improvement ideas

Hi Mario,
Grate add-on! I remember proposed to cuba forum for a such module, and finally you did it, really great! ๐Ÿ‘

However, I'm getting an error when starting to upload the data :
NullPointerException: Cannot get property 'metaProperties' on null object

Do you have any idea why this property is null?

Abstraction for CSV import

Besides the already existing excel import we should try to come up with a similar thing that can import CSV files. It should in the first phase be at the same abstraction level as the excel import.

Then we can create abstractions in form of configurations which allow to more easily define the import.

  • choose CSV library
  • build abstract superclass for CSVImports
  • build a concrete CustomerCSVImporter as an example

Start import process from any browse screen

As a user of the import system
When I open a browse screen of an entity which is importable
Then I want to be able to trigger an import and only configure the import configuration as well as the upload file as the only parameter

support boolean type in import

it should be possible to parse a boolean value in the import process. The already existing global configuration options for booleanTrueValue and booleanFalseValue can be used.

What happens in case of: True --> "X", False --> ""? That should be supported as well (false as no value)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.