I had a lot of open worksheets in the snowflake datawarehouse but now I don't see any.
How do I recover those worksheets?
I'm hoping there would be a provision folder for the same on the local computer.
Try clicking on the small arrow on the top left and check under Recent worksheets
Also, your worksheets should be stored under worksheet_data (run ls #~/worksheet_data to list them).
worksheets are actually stored in the user stage, and users can directly modify this stage, so this scenario is possible where users have actually deleted the contents of their user stage and lost worksheets that way.
In order to check if there are worksheets in the user stage, run the below in a new worksheet.
ls #~
If you see the worksheets, then open a new case to the support to get the scripts that can be run to view the contents of the worksheet and copy them to a new one.
I had this happen once, if you contact Snowflake support they will link you to a document which describes how to recover the workbooks.
Related
I want to use a fusion sheet for ultimately creating a dictionary in foundry repository.
I want to have a fusion sheet as a input, so that users would enter the values in the fusion sheet, I would then sync the fusion sheet to a data set. How do I do that?
Additionally, after the data set is created, I would want use it to create a dictionary out of that data set. Can anyone help in using the data set to create the dictionary in the repository. any help is highly appreciated.
I see two questions here:
Q1 - How do I create a dataset from a fusion sheet, so that a user can use a fusion sheet as input?
Q2 - How do I transform the dataset into a dictionary inside the repo.
Question 2 is very dependent on the technologies that you are using within foundry (PySpark, SQL, etc...) So I would recommend opening a separate question for that in particular with more focused details. I Will answer Question 1.
How do I create a dataset from a fusion sheet, so that a user can use a fusion sheet as input?
To create a dataset out of a fusion sheet, you'll need to have your fusion have a tabular layout. I.e.: Each column representing one of the inputs. Something like the screenshot below.
Then click the tab that says Data and below you'll find "Sync To Dataset". Click on it and select the range you want in the popup. In this example we want A1:C2. I'm giving it the name "user_input_dataset"
Hit add new table and if you have permissions for this, you should get a toaster popup confirming it got created.
Go back into your folder and next to your spreadsheet you should now have a dataset with the contents of your fusion sheet.
You can now read this dataset from your repository and do whatever logic you want with it.
p.s.:
I don't like to add screenshots because they go out of date as products evolve, but this is hard to answer without them, so I added some. This was correct at time of answering.
In the Snowflake Web UI, you have the option to rename and/or save worksheet "code". Where is this code stored? Is it local to the machine, in a table on snowflake, or out in the ether of the web?
Example below: Tab named "DEV Acct Perf CE" contains a series of SQL statements. Where are those statements stored?
They are stored in S3, Azure BLOB, or Google Cloud Storage depending on where you're running Snowflake. It's stored to Snowflake-managed storage, so the only place you can access it is through the web UI. The newer UI in preview allows sharing between users. The current UI is single-user, so you'd need to copy & paste any statements.
Edit: You can see where they're stored, but I think the body of the worksheet is encrypted.
You can see where they're stored by doing this:
ls #~/worksheet_data/;
I downloaded mine and tried gunzip on the body, but that didn't work. I also tried selecting it in Snowflake using the JSON file format, but that didn't work either. I think the body field may be encrypted in addition to being compressed.
Last I checked they were stored in your personal internal stage.
Try this:
list #~;
There should be a folder there called worksheets if I recall correctly. I never tried to open them to see what the files look like, but I did move the files from one user to another successfully when I had to recreate a user for one of my users.
https://docs.snowflake.com/en/user-guide/data-load-local-file-system-create-stage.html#user-stages
I am trying to split an Access database where I work but I have encountered a few issues that I am struggling to resolve. If I can first explain the problem.
I work for a large multi-national company that has on-site IT support but does not support Access (so no help there)
There are 12 of us working in our section, we have an old and badly designed StockMaster database on the networked F drive. The problem is that it is only set up for single users, we have to take turns using it. We aren't a computer savvy bunch, we tend to run the same named queries on a daily basis
The database is only updated once per day, every morning we get a download from our colleagues in Amsterdam. I do not want to play around with this database as first of all I'm no expert and secondly if I break it, no one will fix it.
My plan is this;
I have created a new Access database StockMaster2 that imports the required tables. Using VB coded modules, is deletes the old then imports the new. Therefore every morning it replicates what is in the original database and it works fine.
My next step is to split the database, create the front end and distribute. This is where I'm having problems.
I created the original front end StockMaster2_fe.accde and placed it in the database folder on the F:\ drive. Does every user get their own copy of the front end? I copied and saved two more front ends (copy and paste in the same folder -> rename) namely StockMaster2_alan_fe and StockMaster2_ryan_fe and tested it. I told Ryan (who sits next to me) to find the front end named after him on the F:\ drive and open it whilst I was in ...alan_fe. We both went to run macros at the same time but he was kicked out as it gave me exclusive access.
What am i doing wrong? Why is it not allowing multiple access?
My problem is that due to strict administrator privileges I cannot download any software or access the command line, so anything that I do must be done in Access itself
I apologize for not seeing this post sooner to end your agony. There are two absolute main issues that must be resolved to get you on the right track. First, and perhaps the most important, is that your file has the name of StockMaster2_fe.accde. The extension, the accde, is the executable version. Design changes cannot be made to that version. The extension should say .accdb to provide you with all the flexibility to alter the database, create one database for back-end tables, and a second database for front-end objects to include queries, forms, reports, macros and modules. If you have the accdb version, then your work will start to get much easier.
Issue number two, if your team is not able to share the database, then that is a sign that the database, when first opening, is opening in Exclusive mode. This option can be changed in the Access Options, in the Advance menu, under Advanced section. Look for Default open mode. It should say Shared to have multiple users operating all at once.
A possible hidden issue that can be happening, is that the database has VBA code which informs the database to open exclusively. With your version of the accde, you will not be able to access that code or change how the database opens.
Let's break this down (only because I finished all my work already...):
My next step is to split the database, create the front end and distribute. This is where i'm having problems. I created the original front end StockMaster2_fe.accde and placed it in the database folder on the F drive. Does every user get their own copy of the front end?
Yes
I copied and saved two more front ends (copy and paste in the same folder -> rename) namely StockMaster2_alan_fe and StockMaster2_ryan_fe and tested it. I told Ryan (who sits next to me) to find the front end named after him on the F drive and open it whilst i was in ...alan_fe. We both went to run macros at the same time but he was kicked out as it gave me exclusive access. What am i doing wrong?
Ensure your back end contains only tables. Access is a "client-centric" database, which means when a query is run it pulls all of the data over the pipe to your local computer, does what it does, and then sends it back. So, make sure the back end has only tables and all the other jazz (macros, queries, etc...) are in the front end. Also, the front end will contain links to the back-end tables. All of your queries/macros/etc.. will reference these links, and not the tables in the back-end DB directly.
Why is it not allowing multiple access?
Also, make sure your table-locking scheme is multi-user friendly. If you're doing table locking, it will cause errors. If you're doing record locking, it probably won't.
My problem is that due to strict administrator privileges i cannot download any software or access the command line, so anything that i do must be done in Access itself.
Shouldn't be a problem at all.
I have a database that i have split into 3 pieces: a Front End, and two back ends that contain tables. Copying the front end to a users desktop cuts the runtime from 90 minutes to 30 minutes. However, when I move the back end to the desktop as well, the runtime is less than 8 minutes. The problem I am facing doing this is that I had to manually update the table links.
Is there a way to make it so that Access automatically updates the links based on what users computer it is on?
For example, I created a batch file to move the database files from the shared drive to a folder on the users destop using:
"%userprofile%\Desktop\Folder1\"
as the location to move the files to. "The "%userprofile%" automatically identifies the user and route the files properly. I didn't know if there was something similar to automatically update the links in Access.
Please let me know if you don't understand what I am trying to ask.
Assuming the 1st backend is on the user computer, and the 2nd backend is on the shared network, I think what you can do is create a qry upon opening the database to update the user's table, then after exiting, a 2nd qry that will export user's table back to the 2nd backend on the shared network. You'll have to add a field in the table so that your database knows which record to be added or to be exported.
I want to export all my queries as individual files for purposes of putting them into mercurial source control, but I don't know how to export the individual queries as individual files without having to open each one, then save to the folder, then add into the project, or some equally convoluted process.
I wouldn't mind having to add each one individually, but how do I get them out of the database as individual files without opening them all and doing each one save as? Ostensibly I would like them named with the name they have in the database right now.
I could easily dump the whole lot into one long file using database tasks, but that's not really super helpful is it?
I have SSMS 2k5 and 2k8 (and VS 2k5, 2k8, 2010 to boot) to work with, any thoughts?
Right click on the database. Select Generate Script. On the last page. Script To file you can choose single file or file per object
When you script a database in SSMS you have the option of one file per objects.
SMO is useful with a small app to iterate through
Third party tools like Red Gate SQL Compare (there are other free tools) can script too
I would write a small C# program which extracts your database object via SMO and stores them in your filesystem the way you want.
It is rather easy to write stored procedures which fetches the definition into the result as text. sp_helptext could be used as start.
Than you can use PowerShell to write the Output to the file system.
It sounds as if this would fit rather good into the Really Simple Data Dictionary codeplex project. link text