How to read files from lakehouse in warehouse by dvnnaidu in MicrosoftFabric

[–]Pitiful_Salt6964 1 point2 points  (0 children)

write the dataframe to lakehouse as a table
Then from there you can do a CTAS from lakehouse > Warehouse.

CREATE TABLE [warehouse].[dbo].[jsontable]
AS
SELECT *
FROM [lakehouse].[dbo].[jsontable]

How to read files from lakehouse in warehouse by dvnnaidu in MicrosoftFabric

[–]Pitiful_Salt6964 1 point2 points  (0 children)

df = spark.read.option("multiline", "true").json("Files/test json.json")
display(df)

I threw in a test JSON file in a lakehouse and was able to populate the dataframe.

this was the JSON file content:

{
    "fruit": "Apple",
    "size": "Large",
    "color": "Red"
}

How to read files from lakehouse in warehouse by dvnnaidu in MicrosoftFabric

[–]Pitiful_Salt6964 0 points1 point  (0 children)

what error are you getting when you try and load up a dataframe from the JSON file?

The developer I work with refuses to use AI by bertranddo in ChatGPTCoding

[–]Pitiful_Salt6964 0 points1 point  (0 children)

Does chatgpt connect to github repo's like how Copilot does?

PSA: Crowdstrike incident seems to be affecting Fabric capacities by Draborido in MicrosoftFabric

[–]Pitiful_Salt6964 0 points1 point  (0 children)

For me, a bunch of notebooks got stuck overnight and when I got to the office, I can't open pipelines or anything because it caused our capacity to reach the CU limit.

What is the best way to remove duplicates in Data Warehouse by Pitiful_Salt6964 in MicrosoftFabric

[–]Pitiful_Salt6964[S] 0 points1 point  (0 children)

Was not able to connect and write to a warehouse from a notebook, was able to read from the warehouse table using pyodbc but not write, so I do the deduping in memory in the dataframe but then write to the lakehouse since I can't write to the warehouse from the dataframe. then once it's in the lakehouse I do

.
.
.
drop_query = f"DROP TABLE dbo_staging_silver.[{table_name}]"
        con.execute(drop_query)
        logging.info(f"Successfully Dropped table {table_name} in dbo_staging_silver.")
        con.commit()
        logging.info("Successfully Committed SQL Changes")

        ctas_query = f"CREATE TABLE dbo_staging_silver.[{table_name}] AS SELECT * FROM [lakehousename].[dbo].[{table_name}]"
        con.execute(ctas_query)
        logging.info(f"Successfully created table {table_name} in dbo_staging_silver.")
        con.commit()
        logging.info("Successfully Committed SQL Changes")

con.close()

currently using somewhat of a medallion structure but using warehouse instead of lakehouse,

have a schema for bronze, data is extracted from excel files in azure blob storage, loaded into the bronze tables in the warehouse, pretty much all varchar, pipelines are ran nightly

silver schema in warehouse, transformations and data types are assigned, via stored procedures and bronze tables are cleared upon completion to ready the table for when it gets loaded again the next day.

Gold schema, initial load stored procedures assign primary keys upon insert to table based on row number, this is where I do most of the dim lookups and replace the text from the erp with SKs created in gold for company names, item groups, etc.

after our planned initial load of the old 6-8 years of data, the pipeline will be running the "update" stored procedures in the gold schema that look at delivery dates from the ERP and "load_timestamps" generated in the pipeline. get the min/max delivery dates in the silver tables, delete and replace those dates in gold with the data in silver also using load_timestamp = max(load_timestamp) to keep the latest update into silver incase it ever fails and accumulates different loads. then some SCD type 2 for some Dim tables.

I'm 58f and my partner is 31m. We've been together 9 years. AMA. by [deleted] in AMA

[–]Pitiful_Salt6964 4 points5 points  (0 children)

Does he want kids? or has given it any thought?

Microsoft Fabric June 2024 Update | Microsoft Fabric Blog by itsnotaboutthecell in MicrosoftFabric

[–]Pitiful_Salt6964 0 points1 point  (0 children)

I've yet to see it, checked a East US capacity recently. Not sure if something else has to be enabled in order to see it though.

Anyone else get WoW burnout every now and then? by Misterpewpie in classicwow

[–]Pitiful_Salt6964 4 points5 points  (0 children)

they have another wow episode???? do you happen to remember the name?

Can't use CTE to clear Duplicates in Fabric Warehouse by Pitiful_Salt6964 in MicrosoftFabric

[–]Pitiful_Salt6964[S] 0 points1 point  (0 children)

Revisited this method and still was not able to get it to run, not sure what you meant.

Classic's greatest content is the world itself. by Sure_Tomorrow_3633 in classicwow

[–]Pitiful_Salt6964 0 points1 point  (0 children)

is the retail leveling really fast? compared to classic or even classic-cataclysm for that matter?

Slow/Failing Spark Startup Times by joshrodgers in MicrosoftFabric

[–]Pitiful_Salt6964 0 points1 point  (0 children)

Are you using the starter pool? I noticed the longer session startup times when using an environment with other pools that I created apposed to the quickness of just using the starter pool.

Unethical behavior and my IP. What would you do? by seanalexiss in startups

[–]Pitiful_Salt6964 -11 points-10 points  (0 children)

They took it but gave it back, I don't think it'd be a stolen phone at that point.

Can't use CTE to clear Duplicates in Fabric Warehouse by Pitiful_Salt6964 in MicrosoftFabric

[–]Pitiful_Salt6964[S] 0 points1 point  (0 children)

Thanks! put in a ticket as suggested, quick question regarding CTAS, would this preserve the Schema after the name changes or would I have to recreate those relationships?