I am using Kentico v10.0, I have 400+ records that needed to be enter.
Currently the data was stored using custom table. Is that a way for me to import all the data from an excel file? I think no one likes to do data entry jobs...
So by using the Kentico Import Toolkit is able to achieve what I request.
But I found another problems which there are many empty fields like the picture below:
I have no idea what to put as the default value while importing, so i decided to leave it empty.
Will it affect anythings in the future if these fields are NULL?
Or there is a way to set the default value from the kentico itself? So I don't need to bother the default value while importing.
Use the Kentico Import Toolkit. You can import into your site directly from the Excel sheet. You can also use SQL Server Management Studio to import the custom table data. I'd not recommend using SSMS for anything other than custom table data though.
I would suggest in this order.
Kentico import Toolkit. Very versatile and can be used for other things too. You don't have to worry about those null values unless those values are supposed to be mandatory non-null values.
Second option would be to connect to Kentico's DB using SSMS and import the data in the desired table.
Related
We use RICS that auto import our product information into Akeneo. Every time there is a new COLOR, I get an error for example: Property "color" expects a valid reference data code. The code "BALTIK/LAKE" of the reference data "color" does not exist under CONNECT/CONNECTION SETTINGS/ERROR MONITORING, so I then manually add each color under REFERENCE DATA/(_T) SIMPLE ASSETS. Is there a way Akeneo can be set up to auto add these new colors in the REFERENCE DATA as there are hundreds of new colors needing to be added frequently?
It depends on which type of attribute do you have.
If you have attribute type Reference entity simple link there is no job to import the records. You can do this by writing a simple script using REST API.
If you have attribute type Simple select there is dedicated import job, and you can prepare CSV or XLSX with all possible values. Then you can import it to PIM. You can do this via API too.
Additionally, there is no possibility to new option/record on the go while importing the product. There are a couple of plugins in marketplace which does that, but it's really bad for catalog hygiene and can cause a lot of problems for system operators.
I'm migrating an ancient blog from PostgreSQL to Contentful. I'd like to use data from the old blog posts to fill in Contentful entries' sys.createdAt, sys.updatedAt, sys.publishedAt, and sys.firstPublishedAt.
I've read through:
the Content Management API docs
the contentful-migration docs
this page on scripting migrations with Contentful
this article on the same topic.
Didn't find anything.
I've read a couple of examples where people create their own publishedAt field in a content type rather than add to sys date properties.
I tried to replicate the data structure of exported content as exported by contentful-cli and filled in the date properties with my own data:
// I edited these dates
"createdAt": "2020-09-05T13:14:00.768Z",
"updatedAt": "2021-06-05T13:14:20.303Z",
...
"publishedAt": "2021-06-05T13:14:20.303Z",
"firstPublishedAt": "2020-10-05T13:14:20.303Z",
Then I imported the JSON file with the same CLI. This did not work.
I also tried importing a file exported with contentful space export with no custom edits in it. It turns out, Contentful always uses the time of import for all entry date properties regardless of the dates in the exported file.
It says somewhere in relation to the Content Delivery API that we can't edit sys. But I've not seen it explicitly stated that we can't do it with the CMA or the migration tools. Is it really not possible to add those details for the purpose of migration?
Contentful DevRel here. 👋
You're correct. The sys object contains system-managed metadata and its fields can not be changed programmatically. It doesn't matter if you use the official tooling.
(The only exception is that you can specify sys.id on entry creation.)
I've read a couple of examples where people create their own publishedAt field in a content type rather than add to sys date properties.
👆 That is the recommended way to go. For any data you want to control, create new fields and manage them however you like.
Also posted on super users:
I'm a spotfire novice trying to create a parameterized info link. Ultimate goal is to create a default template that may be customized to return specific rows in a very large table. I've not been able to cobble together enough information from online searches to get me from point A to Z.
Spotfire version is 7.11 on an Oracle 11.2 SE DB.
Currently I've got a date/time prompt in the info link that will be global to all users. What I need is to be able to further filter to 1 of 2 columns (one is real, the other a string) in order to minimize loading times. There are 17 other on-demand tables that are related to the main one. Limiting the initial query will greatly speed up performance.
In information designer for the information link, if I edit the SQL in the WHERE and explicitly define the value or string for the column, I get the rows I want. When I try to define it using an input parameter (?ParamName), I either get nothing when I reload or get asked to input a parameter "for testing".
Q1: In the document properties for the analysis, I've been adding in properties that I assume is supposed to get picked up by the query.
- What part do scripts play in passing this variable to the SQL?
- Do I just need to define a value for a property name or include a IronPython script? - If script is required, can I just define the parameter to pass?
Q2: In the info link SQL, what is the correct syntax for defining the parameter variable depending on the type (real v string)? If I use a string, I need to include LIKE in order to pick up the desired rows. If I use a real, is it possible to define it as a list of values?
Thanks in advance.
Though not exactly clear from your description, I think you should be able to accomplish your goals using the "Load on demand" dialog that is accessed either when you add your data table to your analysis, or subsequently using the Data Table Properties>Type of Data>Settings dialog.
Spotfire uses this dialog to dynamically modify your SQL. Thus, you do not need to explicitly include the LIKE statement in your SQL. Spotfire will add it in based on what you define in the On-Demand settings. For example, you could have an Input Field where you type a constraint that will be stored as a Document Property and then refer to that Document Property in your On-Demand settings to control the table loading.
My question is pretty simple. I am working on Kentico 9 with its SQL Server database which contains several tables which had been added directly from the SQL Management Studio by an external contractor. The fact is that those tables are being used to store custom content which will be displayed for a site, but, in the code they don't have the code for making queries. I mean, they don't have Info and Provider classes.
https://docs.kentico.com/display/K82/Retrieving+database+data+using+ObjectQuery+API
According with this, all tables into the Kentico database can be accessed by invoking methods on these classes, but I don't have it this time.
Something like this, it will not work if I use my table name:
var user = UserInfoProvider.GetUserInfo("administrator");
var items = CustomTableItemProvider.GetItems("MyTable")
.TopN(10)
.WhereEquals("ItemCreatedBy", user.UserID)
.OrderBy("ItemCreatedWhen");
My question is:
can I query any table by its name?
One last thing:
I cannot declared those table as "custom table" because it seems to be a bug in the CMS.
Or you can pull data using your own SQL query:
var ds = ConnectionHelper.ExecuteQuery("select ....", null, QueryTypeEnum.SQLQuery);
Nevertheless I would recommend to create a custom class inside a custom module (much more robust than custom tables) instead and use the generated Info and InfoProvider classes to get and manipulate data.
I think an object has to be registered within the system (created through Kentico UI or API) in order to be pulled from DB with object query.
So I'd choose one of the following options:
Use Entity Framework or something similar to work with that data
Create appropriate custom tables or even custom module and push data there. Not sure why you can't create a custom table... What is an error you're getting?
If you need to present data on the UI only (without processing on the back end) - use just custom queries
Hope this helps.
If you are accessing in code then you could do it the good old fashioned way. If you want to pull data from the database to display on the website you could also do so by creating a custom query and using a transformation to display the fields, then use a repeater on the page to display the transformed data. Alternatively you can use a SQL datasource with a basic repeater, but you still have to create a transformation to display the data. Both methods allow you to access the data in the tables from within the CMS UI, no need to touch any code behind.
If your objective is to read data from these database tables to transform on webpage e.g. using CMS Repeater webpart, you can simply create custom query(s) in Kentico itself and load data using it. You can find the detail here on how to create custom custom queries and load data using it.
On the other hand you can also write your custom classes and define the custom methods where you can pull data using your own SQL query like this:
var ds = ConnectionHelper.ExecuteQuery("select ....", null, QueryTypeEnum.SQLQuery);
Lastly I don't think there should be any issue to create custom table instead of those direct DB tables, only thing we have to ensure code name of custom table should be unique means don't try to use exact same name because it'll cause exception due to same table name already exist in DB. You can please share exception you getting while creating custom table so that I can help you out further.
Has anyone been able to use a SubSonic generated collection as a "business object datasource" with Microsoft report (rdlc)? I have generated the SubSonic class code but for some reason the report datasource window is not seeing the class as a potential object collection datasource.
Is there something I need to do for this to work?
Thanks in advance...vsdotnetguy
I have loaded Reporting Service reports from business objects before (loaded via NHibernate -- which isn't exact but close enough for argument sake).
Couple of key points:
1. return your objects in List, even if you are only returning one object.
2. You want FLAT business objects. You might have to go thru a DTO transformation to get that. By flat, I mean the most complex property you can have in a business object is a string and a number (int, decimal, double). If you are expecting to grab a value like this:
myObject.Customer.Name, forget it. Create a CustomerName property.
3. If you need data from multiple places try to break up your reports into subreports. You key off of the datasource key to figure out what data to return to the report.
I'll add more as I remember, it has been a few months since I've done this.
Yes I've done it, you should only need to make sure the project containing your reports references your SubSonic project (obviously :).
Sometimes I've also found that Visual Studio can get a little borked and require a restart before repopulating the datasource window with SubSonic generated objects.
Thx Chris and Adam,
Here is the answer I found.
In my case I wanted to dynamically set the main and subreport datasources at run time using the SubSonic object collections. However, I also wanted to design the report layout using drag and drop of the datasource columns.
But I was unable to design the report using drag&drop because none of my SubSonic collections were showing up in the Website Data Sources.
However, later while I was doing some control binding using the ObjectDataSource control, I noticed that NOW my SubSonic collections were showing up in the Website DataSources window and I could drag and drop the report layout.
So if you are dynamically setting the report datasources at run time and ARE NOT using the ObjectDataSource control already in your project, you MUST add a dummy ObjectDataSource control to one of your aspx pages. This will then make the business object datasources show up in the report designer.