Broadleaf Commerce: No "Structured Content" admin menu item - broadleaf-commerce

I'm totally new to Broadleaf Commerce and trying to understand why I don't have any "Structured Content" menu item mentioned here
I figured out the sql data got moved to a folder called "old" which added the missing menu item: See here.
Still after running those SQL statements there's no Content > Structured Content menu item.
My guess was that it is only available in Enterprise Edition but can't find any article/doc/resources which clarifies my confusion.

Greeting,
Use this script
INSERT INTO BLC_ADMIN_SECTION (ADMIN_SECTION_ID, DISPLAY_ORDER, ADMIN_MODULE_ID, NAME, SECTION_KEY, URL, CEILING_ENTITY) VALUES (-22000, 2000, -2, 'Structured Content', 'StructuredContent', '/structured-content', 'org.broadleafcommerce.cms.structure.domain.StructuredContent');
INSERT INTO BLC_ADMIN_PERMISSION (ADMIN_PERMISSION_ID, DESCRIPTION, IS_FRIENDLY, NAME, PERMISSION_TYPE) VALUES (-22918, 'Maintain Structured Contents', 1, 'PERMISSION_STRUCTUREDCONTENT', 'ALL');
INSERT INTO BLC_ADMIN_PERMISSION (ADMIN_PERMISSION_ID, DESCRIPTION, IS_FRIENDLY, NAME, PERMISSION_TYPE) VALUES (-22917, 'View Structured Contents', 1, 'PERMISSION_STRUCTUREDCONTENT', 'READ');
INSERT INTO BLC_ADMIN_PERMISSION (ADMIN_PERMISSION_ID, DESCRIPTION, IS_FRIENDLY, NAME, PERMISSION_TYPE) VALUES (-22916, 'Read Structured Content Template', 0, 'PERMISSION_READ_STRUCTURED_CONTENT_TEMPLATE', 'READ');
INSERT INTO BLC_ADMIN_PERMISSION (ADMIN_PERMISSION_ID, DESCRIPTION, IS_FRIENDLY, NAME, PERMISSION_TYPE) VALUES (-22915, 'All Structured Content', 0, 'PERMISSION_ALL_STRUCTURED_CONTENT', 'ALL');
INSERT INTO BLC_ADMIN_PERMISSION (ADMIN_PERMISSION_ID, DESCRIPTION, IS_FRIENDLY, NAME, PERMISSION_TYPE) VALUES (-22914, 'Read Structured Content', 0, 'PERMISSION_READ_STRUCTURED_CONTENT', 'READ');
INSERT INTO BLC_ADMIN_PERMISSION_ENTITY (ADMIN_PERMISSION_ENTITY_ID, CEILING_ENTITY, ADMIN_PERMISSION_ID) VALUES (-22046, 'org.broadleafcommerce.cms.structure.domain.StructuredContent', -22914);
INSERT INTO BLC_ADMIN_PERMISSION_ENTITY (ADMIN_PERMISSION_ENTITY_ID, CEILING_ENTITY, ADMIN_PERMISSION_ID) VALUES (-22047, 'org.broadleafcommerce.cms.structure.domain.StructuredContent', -22915);
INSERT INTO BLC_ADMIN_PERMISSION_ENTITY (ADMIN_PERMISSION_ENTITY_ID, CEILING_ENTITY, ADMIN_PERMISSION_ID) VALUES (-22048, 'org.broadleafcommerce.cms.structure.domain.StructuredContentItemCriteria', -22914);
INSERT INTO BLC_ADMIN_PERMISSION_ENTITY (ADMIN_PERMISSION_ENTITY_ID, CEILING_ENTITY, ADMIN_PERMISSION_ID) VALUES (-22049, 'org.broadleafcommerce.cms.structure.domain.StructuredContentItemCriteria', -22915);
INSERT INTO BLC_ADMIN_PERMISSION_ENTITY (ADMIN_PERMISSION_ENTITY_ID, CEILING_ENTITY, ADMIN_PERMISSION_ID) VALUES (-22050, 'org.broadleafcommerce.common.locale.domain.Locale', -22914);
INSERT INTO BLC_ADMIN_PERMISSION_ENTITY (ADMIN_PERMISSION_ENTITY_ID, CEILING_ENTITY, ADMIN_PERMISSION_ID) VALUES (-22051, 'org.broadleafcommerce.common.locale.domain.Locale', -22915);
INSERT INTO BLC_ADMIN_PERMISSION_ENTITY (ADMIN_PERMISSION_ENTITY_ID, CEILING_ENTITY, ADMIN_PERMISSION_ID) VALUES (-22052, 'org.broadleafcommerce.cms.structure.domain.StructuredContentType', -22914);
INSERT INTO BLC_ADMIN_PERMISSION_ENTITY (ADMIN_PERMISSION_ENTITY_ID, CEILING_ENTITY, ADMIN_PERMISSION_ID) VALUES (-22054, 'org.broadleafcommerce.cms.structure.domain.StructuredContentType', -22915);
INSERT INTO BLC_ADMIN_PERMISSION_ENTITY (ADMIN_PERMISSION_ENTITY_ID, CEILING_ENTITY, ADMIN_PERMISSION_ID) VALUES (-22053, 'org.broadleafcommerce.cms.structure.domain.StructuredContentFieldTemplate', -22914);
INSERT INTO BLC_ADMIN_PERMISSION_ENTITY (ADMIN_PERMISSION_ENTITY_ID, CEILING_ENTITY, ADMIN_PERMISSION_ID) VALUES (-22055, 'org.broadleafcommerce.cms.structure.domain.StructuredContentFieldTemplate', -22915);
INSERT INTO BLC_ADMIN_PERMISSION_XREF (CHILD_PERMISSION_ID, ADMIN_PERMISSION_ID) VALUES (-22916, -22918);
INSERT INTO BLC_ADMIN_PERMISSION_XREF (CHILD_PERMISSION_ID, ADMIN_PERMISSION_ID) VALUES (-22915, -22918);
INSERT INTO BLC_ADMIN_PERMISSION_XREF (CHILD_PERMISSION_ID, ADMIN_PERMISSION_ID) VALUES (-22916, -22917);
INSERT INTO BLC_ADMIN_PERMISSION_XREF (CHILD_PERMISSION_ID, ADMIN_PERMISSION_ID) VALUES (-22914, -22917);
INSERT INTO BLC_ADMIN_SEC_PERM_XREF (ADMIN_SECTION_ID, ADMIN_PERMISSION_ID) VALUES (-22000, -22918);
INSERT INTO BLC_ADMIN_SEC_PERM_XREF (ADMIN_SECTION_ID, ADMIN_PERMISSION_ID) VALUES (-22000, -22917);
INSERT INTO blc_admin_role_permission_xref (ADMIN_ROLE_ID, ADMIN_PERMISSION_ID) VALUES (-1, -22918);
INSERT INTO blc_admin_role_permission_xref (ADMIN_ROLE_ID, ADMIN_PERMISSION_ID) VALUES (-1, -22917);

Related

How do you specify column names with psycopg2

I have a SQL statement such as:
INSERT INTO my_table (col1, col2, col3) VALUES (1,2,3)
I am using psycopg2 to insert data as follows:
cur.execute(
sql.SQL("INSERT INTO{} VALUES (%s, %s, %s)").format(sql.Identifier('my_table')),[1, 2, 3]
)
I don't see how to specify column names into the insert statement though? The above sql.sql is "assuming" that 1,2,3 are in order of col1, col2 and col3. For instance, at times when I want to say insert only col3, how would I specify the column name with sql.sql?
The execute is just executing the SQL code, so you can just mention the columns as per standard PostgreSQL INSERT statement like
INSERT INTO TABLE_ABC (col_name_1,col_name_2,col_name_3) VALUES (1, 2, 3)"

SSRS How to change export Excel Tab Name (2) when ther is no group name

I am using "Break to new page" for every Group value in my report. And I set the TAB names of the excel export to be the Group-Value itself. This works fine for the data within a group.
But on the last TAB there is the overall "TOTAL" which is in no group.
So excel just takes the last groupname it finds and addes a "(2)" at the end of the TAB-name.
I tried to set a fixed name for ISNOTHING() or IIF(Value=""...) but it did not work.
Does anyone have an idea? Please let me know and thak you in advance!
Here is the data:
CREATE TABLE [dbo].[PerPage](
[VendorDim] [nchar](10) NULL,
[Amount] [int] NULL,
[SomeText] [nchar](10) NULL
) ON [PRIMARY]
INSERT [dbo].[PerPage] ([VendorDim], [Amount], [SomeText]) VALUES ('AR', 1, 'a')
INSERT [dbo].[PerPage] ([VendorDim], [Amount], [SomeText]) VALUES ('AR', 2, 's')
INSERT [dbo].[PerPage] ([VendorDim], [Amount], [SomeText]) VALUES ('BR', 3, 'f')
INSERT [dbo].[PerPage] ([VendorDim], [Amount], [SomeText]) VALUES ('BR', 4, 'g')
INSERT [dbo].[PerPage] ([VendorDim], [Amount], [SomeText]) VALUES ('AH', 5, 'h')
INSERT [dbo].[PerPage] ([VendorDim], [Amount], [SomeText]) VALUES ('AH', 6, 'j')
INSERT [dbo].[PerPage] ([VendorDim], [Amount], [SomeText]) VALUES ('AH', 7, 'k')
Here is how the Report is built:
When exporting to excel for every Tab it take the name of the Group VendorDIM. But the Total is not in any group.
You'll probably need to edit your question and show your report design along with details of your row groups and their relevant properties.
However, you said
"there is the overall "TOTAL" which is in no group"
Are you sure this is true? I would expect this to be in a parent group, in which case you can set the page name in the parent group's properties in the same way you have done for the other row group.
If this does not help, share the design, it's hard to help without more info.
I will remove the total from the grouped Tablix.
Add a new Tablix page with the summed up Totals.
And give it a "Total" Name.

Insert Large JSON in a Cassandra Table

The image shows error detail- Please click Here
I am trying to Insert large JSON in a column of Cassandra Table.
Table Schema looks like :
Table1 (EmployeeName text, EmployeeID text, EmployeeJSON text )
INSERT INTO Table1 (EmployeeName, EmployeeID, EmployeeJSON)
VALUES ('Razzaq','234',"Jason String")
NOte : JSON string is huge one. It has size of 212k. How can I insert that into this table. Either Should I Use same method or something else?
You could insert it using fromJson() function for a single column value.
It may only be used in the VALUES clause of an INSERT statement or as one of the column values in an UPDATE, DELETE, or SELECT statement. For example, it cannot be used in the selection clause of a SELECT statement.
Example:
Table1 (EmployeeName text, EmployeeID text, EmployeeJSON text )
INSERT INTO Table1 (EmployeeName, EmployeeID, EmployeeJSON)
VALUES ('Razzaq','234',fromJson('{
"employeeCompany" : "Acme Corp",
"employeeCountry" : "Egypt",
"employeeSalary" : [{
"currency" : "Dollar",
"salaryVariance" : { "cashPay" : 90%, "equity" : 10% }
}]
}'))
Json Support in Cassandra

Python and SQLite3: how to write less values than a table has colums

I am using Python3 and SQLite3. I have a table with 6 columns, but I am only inserting values to 4 of the columns.
execute("INSERT INTO VALUES (?, ?, ?, ?)", [list_name])
The error I get:
ERROR: table blacklisted_ips has 6 columns but 4 values were supplied
list_name = [(24, 'somestring', '2018/05/06', '2018-05-13 10:16:34'), (24, 'somestring', '2018/05/06', '2018-05-13 10:16:34')]
So the question is how do I write to only 4 of the columns?
Specify the columns you care about.
INSERT INTO sometable
(foo, bar, baz, quux)
VALUES
(42, 420, 3.14, 0)
The SQLite page for INSERT operation specifies:
If a column-name list is specified, then the number of values in each
term of the VALUE list must match the number of specified columns.
Each of the named columns of the new row is populated with the
results of evaluating the corresponding VALUES expression.
What you want would be:
INSERT INTO blacklisted_ips (col1, col2, col3, col4) VALUES (?, ?, ?, ?)

Group By using date, name and amount in Cassandra

I'm new in using Cassandra and I can't use the Group By, is there a way that I can use the GROUP BY in Cassandra like in SQL? I want to group my data by date and also by the name of the user, and I want to sum all the amount in a specific date. I still don't have a code for this because I don't know how to start and I also aware that the group by is not supported by cassandra
You can't use group by without materialized view
But if you want to find the sum of amount for a specific date and name you can get easily.
Using Apache Cassandra 3.x
1.Create a table
CREATE TABLE data (
date bigint,
name text,
amount double,
PRIMARY KEY (date, name, amount)
);
2.Insert dummy Some data
INSERT INTO data (date , name , amount) VALUES ( 1, 'a1', 10);
INSERT INTO data (date , name , amount) VALUES ( 1, 'a1', 20);
INSERT INTO data (date , name , amount) VALUES ( 1, 'a1', 30);
INSERT INTO data (date , name , amount) VALUES ( 1, 'a1', 40);
INSERT INTO data (date , name , amount) VALUES ( 1, 'a2', 50);
INSERT INTO data (date , name , amount) VALUES ( 1, 'a2', 60);
3.Now you can find the sum of amount in a specific date and name
SELECT sum(amount) FROM data WHERE date = 1 AND name = 'a1' ;

Resources