Incremental file for DBInputTable - how to create? - etl

I have just read http://developer.gooddata.com/cloudconnect/manual/incremental-reading.html about incremental reading but I don't know still how to create the required incremental file. I am able to set incremental key, but where is the incremental file, how to create it?
Thank you very much!
Petr

Just create a new file like "key.txt" in your Project folder and then go to the Reader component settings and select this file to be Incremental File. You have to first fill in the initial value, for example:
'IncrementalFile.txt' content:
key = -1
Then you are able to setup the Reader Component to following:
incrementalFile="IncrementalFile.txt"
incrementalKey="key=max(employee_id)"
sqlQuery="select * from employee where employee_id>#key"
Let me know if you have any problem with it. Once set up the Incremental key should be automatically updated after each run.
Thanks,
JT

Related

Yeoman generator : Copy directories and renaming them

I am new with Yeoman generator and manage to create a generator that generates a project from a template. However, my template folder contains directories and is it possible to rename the directory based on certain input or template pattern just like the file content ?
Following are my template directories.
dc_compid_sid
- db
- tool_compid_sid
- js_compid_sid
I would like to rename compid and sid when copy is done with the input values.
Following is my write code.
this.fs.copyTpl(
this.templatePath(),
this.destinationPath(),
{
compid : this.answers.compid,
sid : this.answers.sid
}
);
I read the documentation in Yeoman, mem-fs that allows copy options that eludes, this is possible with arguments passing in. However, I am new in nodejs/javascript coding and there is not many examples that I can rely on.
Hope somebody can help and guide.
Thanks.
Anand Muthu

Create Parent and Child Records Through Dialogs

I'm trying to create a dialog that do the following:
The dialog will run when I want to copy an entity (Submission). So, the first step is to copy the parent record (Submission);
After that, I want to copy as well the child records (Claims) and associate those children to the copied entity (Submission).
So far I can copy the Submission, but I can't copy the Claims and associate them to the new Submission.
Do you guys know how can I do that? Thank you!!!
You will need to write code to do this, a custom workflow activity would be probably be a good option.

Magento Dataflow (Advanced) Profile, default values

I want to create an import from a CSV but i can't modify the CSV file.
So i need to define default values for a couple required fields in Magento (like "type" ( > Simple Product ) etc.
I'm looking at https://stackoverflow.com/a/7319214/2252078 to make a custom Adapter and that inject the missing required values in the array before saving.
But i already get an error that says:
Method "parse" not defined in adapter spaanproductions_basics/convert_adapter_product
So i can't even begin with my custom code.
Maybe someone has a beter idea how to create some default values, or how to fix this issue.
Magento version: 1.9.1.1
Thanks in advance.
Kind regards,
Sonny
Not sure what the problem is, your code does seem to be valid. You could try http://pastebin.com/vxewc0Zt . OR temporarily rename your app/code/local/Spaanproductions/Basics/Model/Covert/Adapter/Product.php to verify wetter the right class is actually being loaded although I highly doubt that's the problem
-- Edit (See comments) --
try changing spaanproductions_basics/convert_adapter_product to basics/convert_adapter_product your models are defined under basics, not under spaanproductions"
At the first you have to export products as a csv file to catch the structure and then modify that as you need.
Take a look at this answer, it could be useful:
Update Magento products with multiple images

distinguish use cases in NSAutosaveElsewhereOperation

I try to add AutoSave support to the Core Data File Wrapper example
Now if i have a new/untitled document writeSafelyToURL is called with the NSAutosaveElsewhereOperation type.
The bad thing is, I get this type in both typical use cases
- new file: which store a complete new document by creating the file wrapper and the persistent store file
- save diff: where the file wrapper already exists and only an update is required.
Does somebody else already handled this topic or did somebody already migrated this?
The original sample use the originalStoreURL to distinguish those two use cases, which solution worked best for you?
Thanks

What is the correct way to add new generated model file? in VS 2010 EF

I am using the EF in VS2010. I first created a DB and then choose create model from DB.. Then I go and choose Add Code Generation item.. everything looks good so far. Now I added a new table in my DB, I then choose update model from DB. This is still OK. How do I tell VS 2010 to generate a model file for that new table?
I end up deleting everything and and repeating the step over and over for every time I make a change to the database. ANy suggestions?
When you click on Add Code Generation item inside *.edmx it will create two files:
YourModel.Context.tt (produces a strongly typed ObjectContext for the YourModel.edmx)
YourModel.tt (responsible for generating a file for each EntityType and ComplexType in the YourModel.Context.tt)
When you update your *.edmx you just need to right click on YourModel.tt and choose Run Custom Tool.
More info:
Because you're using such approach i would recommend that you move the YourModel.tt file into the separate Class Library project (hold the Shift key and drag and move it)
Modify:
string inputFile = # "YourModel.edmx"; to
string inputFile = # "..\YourNamespaceWhereEdmxIS\YourModel.edmx";
in your YourModel.tt.
Change Custom Tool Namespace for your YourModel.Context.tt in the properties browser to match YourClassLibraryName
Regards.

Resources