Error during generating update maql #107

Open
fluke777 opened this Issue Apr 27, 2011 · 1 comment

2 participants

@fluke777
GoodData member

I have XML schema defined like this

<schema>
  <name>OrderDetails</name>
  <columns>
    <column>
      <name>id</name>
      <title>Order Detail ID</title>
      <ldmType>CONNECTION_POINT</ldmType>
      <transformation>IDENTITY</transformation>
      <folder>Order Detail</folder>
    </column>
    <column>
      <name>odpoid</name>
      <title>Order</title>
      <ldmType>REFERENCE</ldmType>
      <schemaReference>OrderHeaders</schemaReference>
      <reference>id</reference>
      <folder>Order Detail</folder>
    </column>
    <column>
      <name>odplno</name>
      <title>Line</title>
      <ldmType>ATTRIBUTE</ldmType>
      <isDateFact>false</isDateFact>
      <isTimeFact>false</isTimeFact>
      <folder>Order Detail</folder>
    </column>
    <column>
      <name>odpcid</name>
      <title>Customer</title>
      <ldmType>REFERENCE</ldmType>
      <schemaReference>Customers</schemaReference>
      <reference>id</reference>
      <folder>Order Detail</folder>
    </column>
    <column>
      <name>odptyp</name>
      <title>Type</title>
      <ldmType>ATTRIBUTE</ldmType>
      <isDateFact>false</isDateFact>
      <isTimeFact>false</isTimeFact>
      <folder>Order Detail</folder>
    </column>
    <column>
      <name>odpiid</name>
      <title>Item</title>
      <ldmType>REFERENCE</ldmType>
      <schemaReference>Items</schemaReference>
      <reference>Id</reference>
      <folder>Order Detail</folder>
    </column>
    <column>
      <name>odplot</name>
      <title>LOT</title>
      <ldmType>ATTRIBUTE</ldmType>
      <isDateFact>false</isDateFact>
      <isTimeFact>false</isTimeFact>
      <folder>Order Detail</folder>
    </column>
    <column>
      <name>odpqor</name>
      <title>Qty Ordered</title>
      <ldmType>FACT</ldmType>
      <isDateFact>false</isDateFact>
      <isTimeFact>false</isTimeFact>
      <folder>Order Detail</folder>
    </column>
    <column>
      <name>odpqdu</name>
      <title>Qty Due</title>
      <ldmType>FACT</ldmType>
      <isDateFact>false</isDateFact>
      <isTimeFact>false</isTimeFact>
      <folder>Order Detail</folder>
    </column>
    <column>
      <name>odpqsh</name>
      <title>Qty Shipped</title>
      <ldmType>FACT</ldmType>
      <isDateFact>false</isDateFact>
      <isTimeFact>false</isTimeFact>
      <folder>Order Detail</folder>
    </column>
    <column>
      <name>odpqbo</name>
      <title>Qty B/O</title>
      <ldmType>FACT</ldmType>
      <isDateFact>false</isDateFact>
      <isTimeFact>false</isTimeFact>
      <folder>Order Detail</folder>
    </column>
    <column>
      <name>odpprc</name>
      <title>Unit Price</title>
      <ldmType>FACT</ldmType>
      <isDateFact>false</isDateFact>
      <isTimeFact>false</isTimeFact>
      <folder>Order Detail</folder>
    </column>
    <column>
      <name>odpcom</name>
      <title>Comm %</title>
      <ldmType>FACT</ldmType>
      <isDateFact>false</isDateFact>
      <isTimeFact>false</isTimeFact>
      <folder>Order Detail</folder>
    </column>
    <column>
      <name>odpdsc</name>
      <title>Disc %</title>
      <ldmType>FACT</ldmType>
      <isDateFact>false</isDateFact>
      <isTimeFact>false</isTimeFact>
      <folder>Order Detail</folder>
    </column>
    <column>
      <name>odpcst</name>
      <title>Cost</title>
      <ldmType>FACT</ldmType>
      <isDateFact>false</isDateFact>
      <isTimeFact>false</isTimeFact>
      <folder>Order Detail</folder>
    </column>
    <column>
      <name>odpdam</name>
      <title>Disc. Amount</title>
      <ldmType>FACT</ldmType>
      <isDateFact>false</isDateFact>
      <isTimeFact>false</isTimeFact>
      <folder>Order Detail</folder>
    </column>
    <column>
      <name>odpino</name>
      <title>Invoice #</title>
      <ldmType>FACT</ldmType>
      <isDateFact>false</isDateFact>
      <isTimeFact>false</isTimeFact>
      <folder>Order Detail</folder>
    </column>
    <column>
      <name>odpqrt</name>
      <title>Qty Returned</title>
      <ldmType>FACT</ldmType>
      <isDateFact>false</isDateFact>
      <isTimeFact>false</isTimeFact>
      <folder>Order Detail</folder>
    </column>
    <column>
      <name>odpdts</name>
      <title>Date Last Changed</title>
      <ldmType>FACT</ldmType>
      <isDateFact>false</isDateFact>
      <isTimeFact>false</isTimeFact>
      <folder>Order Detail</folder>
    </column>
    <column>
      <name>citcst</name>
      <title>Total Cost</title>
      <ldmType>FACT</ldmType>
      <folder>Order Detail</folder>
    </column>
    <column>
      <name>ohpsid</name>
      <title>Sales Rep</title>
      <ldmType>REFERENCE</ldmType>
      <schemaReference>SalesReps</schemaReference>
      <reference>id</reference>
      <folder>Order Detail</folder>
    </column>
    <column>
      <name>citamt</name>
      <title>Total Sales</title>
      <ldmType>FACT</ldmType>
      <folder>Order Detail</folder>
    </column>
  </columns>
</schema>

I would like to change the schema by CL tool command generate update maql, but I cannot. It always ends with an error like this.

If I use script like this

UseProject(fileName="pid");
UseCsv(csvDataFile="order_details.csv",hasHeader="true",configFile="order_details.xml");
GenerateUpdateMaql(maqlFile="maql/update_order_details.maql");

I end up with error

Exception in thread "main" java.lang.UnsupportedOperationException: Generate MAQL Drop is not supported for CONNECTION_POINTS yet
    at com.gooddata.modeling.generator.MaqlGenerator$State$ConnectionPoint.generateMaqlDdlDrop(MaqlGenerator.java:689)
    at com.gooddata.modeling.generator.MaqlGenerator.generateMaqlDrop(MaqlGenerator.java:128)
    at com.gooddata.connector.AbstractConnector.generateUpdateMaql(AbstractConnector.java:562)
    at com.gooddata.connector.AbstractConnector.processCommand(AbstractConnector.java:240)
    at com.gooddata.connector.CsvConnector.processCommand(CsvConnector.java:247)
    at com.gooddata.processor.GdcDI.execute(GdcDI.java:421)
    at com.gooddata.processor.GdcDI.<init>(GdcDI.java:148)
    at com.gooddata.processor.GdcDI.main(GdcDI.java:477)

Weird thing is, that this error occurs even if I do not change the XML schema (so the resulting update maql file should be empty).

@koles
GoodData member

Caused by including transformation in SourceColumn#hashCode. Should be fixed in upcoming 1.2.22

@koles koles was assigned Apr 27, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment