How can i import a son model with relation to a father model? - import

i've a application with 2 Google Drive Tables (FatherM & SonM models)
and with a many to one relation
i'm able to export the data in a spreadsheet
in the SonM model at export an extra column is created automaticaly by the export with the name of the relation (FatherM) and containing all the Keys of the fathers records
when i import the single model data Son spreadsheet i've an error :
V:1 Field names "FatherM" in the spreadsheet can't be found in the corresponding model.
yes it doesn't exist in the model but is created by the relation
how can i import SonM datas ?

The difference between "import single model" and "import all models and relations" modes that "import single model" doesn't import relations, instead it expects that all columns in your spreadsheet are fields of a model. You can try to use "import all models and relations" mode with a spreadsheet where is all other (except of SonM) spreadsheets tabs don't contain data.

Thanks very much for your answer
I’m now using the all models to import relation too.
Her are some comments. if you have any information to give me, don’t hesitate to tell me
My goal is to export all the models from a test environment in a spreadsheet, add row manually or modify, then later on I will import all the data on a prod environment
1) I’ve exported all the data OK
2) I’ve re imported all the data :
First remark : if one of the spread sheet tab is empty (only one line with the title column)
I’ve got an error at import : Cannot read property "length" from null. 0 records imported
I’ve deleted all the tabs that don’t have data, and now not any more this error
Second remark: I’ve another import message from google import
Value error at cell "V:6": Can't import association: "Invit - Event", because record key is not defined. 0 records imported
Event is my father model and Invit is my son model. (for One Event I’ve many Invitation)
About V:6 , in Invit tab V is the relation column to the Event. (it contains all the key that are link with the main _Key of the Event model, the name of this column is the name of the relation I’ve created)
The first 5 lines of this tab are the invitation I’ve made manually using the my appmaker application, (and each of these line have a _Key value on column A) the line 6 and after are invitation I’ve added manually (coming from another tool, theses are old invitations I need to import)
On line 6 and after the column A (_key) is empty
The cell value in V:6 is an Event(_Key) ant it exist. So I don’t understand the import error message from Google. (do you understand this message?)
Third remarks
I’ve jus done this test:
Create a new son relation using the appmaker tool
Export all the data
Re -import exactly the same data
And I’ve got this error
Drive Table internal error. Record not found. 0 associations imported
Do you know where I can find information about importing relation, on this page https://developers.google.com/appmaker/models/import-export nothing about relation
Thanks
Stéphane

Related

Magento 2.3.2 Import only images for multiple products

I want to import images for multiple products. I read many questions and I tried the answer but with no luck.
I want to import images from external server. For that I created CSV with sku, base_image, small_image, thumbnail_image column.
The value in all field is like :
htts://external.com/imgae_name
I selected "Product" in Entity Type, Import Behaviour is Add/ Update. I skip Image file directory.
When I click on "check data" button I am getting following error.
Product Type is invalid or not supported in row(s): 1
If I add Product type column then I am getting attribute set error. Can anybody help me on that ?
Even when I import custom attribute I am getting same error. For that I created csv with sku and cost.
Here cost is my product attribute.
Try setting your Product type as = 'Default' that should stop the error when you click 'check data' when uploading your csv.

Case-insensitive column names breaks the Data Preview mode in Data Flow of Data Factory

I have a csv file in my ADLS:
a,A,b
1,1,1
2,2,2
3,3,3
When I load this data into a delimited text Dataset in ADF with first row as header the data preview seems correct (see picture below). The schema has the names a, A and b for columns.
However, now I want to use this dataset in Mapping Data Flow and here does the Data Preview mode break. The second column name (A) is seen as duplicate and no preview can be loaded.
All other functionality in Data Flow keeps on working fine, it is only the Data Preview tab that gives an error. All consequent transformation nodes also gives this error in the Data Preview.
Moreover, if the data contains two "exact" same column names (e.g. a, a, b), then the Dataset recognizes the columns as duplicates and puts a "1" and "2" after each name. It is only when they are case-sensitive unequal and case-insensitive equal that the Dataset doesn't get an error and Data Flow does.
Is this a known error? Is it possible to change a specific column name in the dataset before loading into Data Flow? Or is there just something I'am missing?
I testes it and get the error in source Data Preview:
I ask Azure support for help and they are testing now. Please wait my update.
Update:
I sent Azure Support the test.csv file. They tested and replied me. If you insist to use " first row as header", Data Factory can not solve the error. The solution is that re-edit the csv file. Even in Azure SQL database, it doesn't support we create a table with same column name. Column names are case-insensitive.
For example, this code is not supported:
Here's the full email message:
Hi Leon,
Good morning! Thanks for your information.
I have tested the sample file you share with me and reproduce the issue. The data preview is alright by default when I connect to your sample file.
But I noticed when we do the trouble shooting session – a, A, b are column name, so you have checked the first row as header your source connection. Please confirm it’s alright and you want to use a, A, b as column headers. If so, it should be a error because there’s no text- transform for “A” in schema.
Hope you can understand the column name doesn’t influence the data transform and it’s okay to change it to make sure no errors block the data flow.
There’re two tips for you to remove block, one is change the column name from your source csv directly or you can click the import schema button ( in the blow screen shot) in schema tab, and you can choose a sample file to redefine the schema which also allows you to change column name.
Hope this helps.

missing data for column xxx

I've downloaded multiple metro extracts from openstreetmap as PBF files when i try to import them with osm2pgsql it works for the first and creates the tables. I then want to add a column in the planet_osm_ways with a cityID to know which "way id" belonged to which city after i then try to import another city it says 'ERROR: Missing data for column "city_id". is there a way to modify the planet_osm_ways table without breaking the script? I really need to know which id belonged to which metro extract.
You need to edit the style file (default.style, possibly in osm2pgsql-bin directory) used by osm2pgsql.
You can then add the instruction
#Add custom column
node,way citiid int4 linear
The column will be created, and - provided no tag has this name - will not be populated. You are then free to populate it as you want.

magento 2.1 - Automatic Creation of Categories During Product Import

I am trying to import 5000 products into magento 2.1 backend using a CSV file. The file also contains categories for the products and I aim to import the categories of the product as well.
During the import when categories are being created, the url-key assigned to them is blank. So when it goes to the next record and tries to create new categories, there is an error :
"Category "A/B/C/" has not been created. URL key for specified store already exists".
My understanding is that since the import mechanism is unable to create proper url-key based on category name, then a blank entry is put as url-key and the next category to import which also has a blank url-key identifies a duplicate and throws an exception.
Does anyone know a way to set a default mechanism, to generate url-key based on category name during import process?
Thanks!

Filemaker Pro 14 History tables

With a few solutions Ive worked with I've created temp table's or history tables. Normally I script it to take a handful of fields needed from a main table and copy it over to the other table by
Setting a variable then setting field to the variable for each field in the new table / new record.
I have a situation now, where Im building a history table that needs to copy the current record as is. A snapshot where all fields from that instance of the record are copied to the history table.
Rather then setting a variable then set field to the variable, Id like to get some input on a quicker way to get this done where I can do this on a record level and not type out field by field to get it done. Also if fields are added to both tables then I have to make sure my script gets updated.
Ill keep hunting around.. appreciate any help.
-Rich
Do you have a sample of copying a record from 1 table to another
including all fields and setting some fields?
As I suggested in comments, use the Import Records[] script step, and select the same file as the source. If you choose Arrange by: [ matching names ] in the Import Field Mapping dialog, it will automatically map all source fields to their similarly named counterparts.
Note that you must establish a found set in the source table before importing.
For "setting some fields", you can define auto-enter options and activate them during the import, or run Replace Field Contents[] immediately after the import.