Python and SQLAlchemy insert data from API (one to many relationship and more 1000 rows)

Advertisements I’m have a problem with method insert from SQLAlchemy. When i want to insert data in my ORM model tabel i get next problem: ORM models tabel with one to many relationship: class OzonProductPrice(Base): __tablename__ = "ozon_product_price" id: Mapped[int] = mapped_column(primary_key=True, autoincrement=True) articul: Mapped[str] = mapped_column(String(120)) brand: Mapped[str] = mapped_column(String(50)) product_price: Mapped[float] product_price_plus_invest: Mapped[float]… Read More Python and SQLAlchemy insert data from API (one to many relationship and more 1000 rows)

Knowing a column of indexes how to get column of their values in Dataframe?

Advertisements I have a DataFramedf = pd.DataFrame(np.random.randint(-100, 100, 100).reshape(10, -1), columns=list(range(10)), index=list(‘abcdefghij’)) and I found some indexes using method .idxmin(axis=1) and getting Seriesdf_ind = a 5 b 8 c 2 d 0 e 7 f 0 g 4 h 6 i 5 j 2 How to get column of their values and than add (insert)… Read More Knowing a column of indexes how to get column of their values in Dataframe?

What is the maximum number of concurrent INSERT queries for Microsoft SQL Server?

Advertisements If multiple different services send INSERT queries for the same table simultaneously to SQL Server, using their own connections, how many INSERTS can be committed by SQL Server in parallel? Or SQL Server can only process them sequentially? >Solution : You can have up to 32,767 user connections. The INSERT behavior depends on factors… Read More What is the maximum number of concurrent INSERT queries for Microsoft SQL Server?

How to prevent entering the same value second time in sql?

Advertisements I have the following problem: I have to create table with projects and employees. Employee can be assigned to few projects, but he cannot be assigned twice to the same projects. How can I prevent doing that? My tables: use projprac create table dbo.employees ( [idEmployee][int] PRIMARY KEY, [name][varchar](50) NOT NULL, [lastname][varchar](50) NOT NULL,… Read More How to prevent entering the same value second time in sql?